List of usage examples for android.view ViewGroup requestTransparentRegion
@Override public void requestTransparentRegion(View child)
From source file:com.keysolutions.meteorparties.PartyMapActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_party_map); //NOTE: activity_party_map layout is aliased in res/values-large/refs.xml // and res/values-sw600dp/refs.xml to switch to activity_party_twopane.xml // workaround for black map...see http://code.google.com/p/gmaps-api-issues/issues/detail?id=4639 ViewGroup topLayout = (ViewGroup) findViewById(R.id.party_map); topLayout.requestTransparentRegion(topLayout); if (findViewById(R.id.party_detail_container) != null) { // The detail container view will be present only in the // large-screen layouts (res/values-large and // res/values-sw600dp). If this view is present, then the // activity should be in two-pane mode. mTwoPane = true;/*from w w w.j a v a 2 s . c o m*/ } }
From source file:com.tdispatch.passenger.fragment.ControlCenterFragment.java
@Override protected void onPostCreateView() { initBusyIndicators();/*from w w w . java 2 s. c o m*/ showAimPoint(true); // try to fix another GMaps v2 related issue // http://code.google.com/p/gmaps-api-issues/issues/detail?id=4639 ViewGroup mapHost = (ViewGroup) mFragmentView.findViewById(R.id.map_container); mapHost.requestTransparentRegion(mapHost); updateAddresses(); setUIControlsVisibility(true); // disable debug controls WebnetTools.setVisibility(mFragmentView, R.id.debug_container, TDApplication.isDebuggable() ? View.INVISIBLE : View.INVISIBLE); MapFragment mapFragment = (MapFragment) mFragmentManager.findFragmentById(R.id.map_fragment); if (mapFragment != null) { CameraUpdate cameraUpdate = CameraUpdateFactory.zoomTo(15f); GoogleMap map = mapFragment.getMap(); Location currentPosition = map.getMyLocation(); if (currentPosition != null) { LatLng latLng = new LatLng(currentPosition.getLatitude(), currentPosition.getLongitude()); cameraUpdate = CameraUpdateFactory.newLatLngZoom(latLng, 15f); } map.moveCamera(cameraUpdate); map.setOnCameraChangeListener(mMapCameraListener); map.setOnMapClickListener(mOnMapClickListener); map.setOnMyLocationChangeListener(mOnMyLocationChangeListener); } else { throw new IllegalStateException("Map is not ready"); } WebnetTools.setVisibility(mFragmentView, R.id.price_box_container, View.INVISIBLE); int ids[] = { R.id.pickup_location, R.id.dropoff_location, R.id.button_mylocation, R.id.button_book, R.id.button_start_new_booking, R.id.left_menu_drag_handle, R.id.right_menu_drag_handle, R.id.button_set_as_pickup, R.id.button_set_as_dropoff, }; for (int id : ids) { View v = mFragmentView.findViewById(id); if (v != null) { v.setOnClickListener(mOnClickListener); } } ids = new int[] { R.id.button_set_as_pickup, R.id.button_set_as_dropoff, R.id.button_mylocation }; for (int id : ids) { View v = mFragmentView.findViewById(id); if (v != null) { v.setOnLongClickListener(mOnLongClickListener); } } // unveil map View mapCurtain = mFragmentView.findViewById(R.id.map_curtain); mapCurtain.startAnimation( AnimationUtils.loadAnimation(TDApplication.getAppContext(), R.anim.map_curtain_fade_out)); }