List of usage examples for android.view ViewGroup removeView
@Override public void removeView(View view)
Note: do not invoke this method from #draw(android.graphics.Canvas) , #onDraw(android.graphics.Canvas) , #dispatchDraw(android.graphics.Canvas) or any related method.
From source file:at.alladin.rmbt.android.adapter.result.QoSCategoryPagerAdapter.java
@Override public void destroyItem(ViewGroup container, int position, Object object) { final View view = (View) object; container.removeView(view); }
From source file:com.android.gallery3d.ingest.adapter.MtpPagerAdapter.java
@Override public void destroyItem(ViewGroup container, int position, Object object) { MtpFullscreenView v = (MtpFullscreenView) object; container.removeView(v); mBroker.unregisterOnCheckedChangeListener(v); mReusableView = v;/*from w w w. ja v a 2 s .c om*/ }
From source file:com.barcamppenang2014.tabfragment.MapFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // View v = inflater.inflate(R.layout.info_page, container, false); // return v;// ww w . j a v a2 s .c o m if (view != null) { ViewGroup parent = (ViewGroup) view.getParent(); if (parent != null) parent.removeView(view); } try { view = inflater.inflate(R.layout.map_layout, container, false); mMap = ((SupportMapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap(); Marker marker = mMap.addMarker(new MarkerOptions().position(INTI) .title("INTI International College Penang").snippet("Bukit Jambul, Penang. +60 4-631 0138")); /* mMap.setOnInfoWindowClickListener(new OnInfoWindowClickListener() { public void onInfoWindowClick(Marker marker) { if (getActivity() == null) return; MainActivity fca = (MainActivity) getActivity(); fca.switchContent(new IndoorMapFragment()); } });*/ marker.showInfoWindow(); mMap.getUiSettings().setZoomControlsEnabled(false); CameraPosition cameraPosition = new CameraPosition.Builder().target(new LatLng(5.36, 100.281334)) // Sets the center // of the map to // Mountain View .zoom(12) // Sets the zoom .build(); // Creates a CameraPosition from the builder mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition)); } catch (InflateException e) { // map is already there, just return view as it is } return view; }
From source file:com.johnny.gank.ui.adapter.PicturePagerAdapter.java
@Override public void destroyItem(ViewGroup container, int position, Object object) { if (object instanceof View) { container.removeView((View) object); }//from www . jav a2s . c o m }
From source file:com.jakewharton.utils.RecyclingPagerAdapter.java
@Override public final void destroyItem(ViewGroup container, int position, Object object) { View view = (View) object; container.removeView(view); int viewType = getItemViewType(position); if (viewType != IGNORE_ITEM_VIEW_TYPE) { recycleBin.addScrapView(view, position, viewType); }/* w w w. j av a2s. co m*/ }
From source file:com.mikimedia.android.view.ObjectPageAdapter.java
@Override public void destroyItem(ViewGroup container, int position, Object object) { View view = (View) object; if (view != null) { recycler.add(view);/*from ww w. j av a2 s. c om*/ container.removeView(view); } }
From source file:ca.appvelopers.mcgillmobile.ui.walkthrough.WalkthroughAdapter.java
@Override public void destroyItem(ViewGroup collection, int position, Object view) { collection.removeView((View) view); }
From source file:cn.whereyougo.framework.base.WYGBaseFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { Log.d(TAG, TAG + "-->onCreateView()"); // View(??View) if (null != mContentView) { ViewGroup parent = (ViewGroup) mContentView.getParent(); if (null != parent) { parent.removeView(mContentView); }//from w w w .j a v a 2s . c o m } else { mContentView = inflater.inflate(bindLayout(), container); findView(mContentView);// ? } return mContentView; }
From source file:com.wstrong.mygank.base.BaseFragment.java
@Override public void onDestroyView() { super.onDestroyView(); ButterKnife.unbind(this); if (this.rootView.getParent() != null) { ViewGroup parent = (ViewGroup) this.rootView.getParent(); parent.removeView(this.rootView); }/*from ww w . ja v a 2 s . c om*/ }
From source file:com.fuzz.emptyhusk.SimplePagerAdapter.java
@Override public void destroyItem(ViewGroup container, int position, Object object) { View view = viewCache.get(object.toString()); if (view != null) { container.removeView(view); }// w ww . j a va2s .c o m }