android.view.ViewManager Java Examples
The following examples show how to use
android.view.ViewManager.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ViewController.java From react-native-navigation with MIT License | 6 votes |
@CallSuper public void destroy() { if (isShown) { isShown = false; onViewDisappear(); } yellowBoxDelegate.destroy(); if (view instanceof Destroyable) { ((Destroyable) view).destroy(); } if (view != null) { view.getViewTreeObserver().removeOnGlobalLayoutListener(this); view.setOnHierarchyChangeListener(null); if (view.getParent() instanceof ViewGroup) { ((ViewManager) view.getParent()).removeView(view); } view = null; isDestroyed = true; } }
Example #2
Source File: ViewUtil.java From styT with Apache License 2.0 | 5 votes |
static void removeView(ViewManager parent, View child) { if (parent == null || child == null) { return; } try { parent.removeView(child); } catch (NullPointerException ignored) { // This catch exists for modified versions of Android that have a buggy ViewGroup // implementation. See b.android.com/77639, #121 and #49 } }
Example #3
Source File: RNDownloadButtonPackage.java From react-native-download-button with MIT License | 5 votes |
@Override public List<com.facebook.react.uimanager.ViewManager> createViewManagers(ReactApplicationContext reactContext) { List<com.facebook.react.uimanager.ViewManager> modules = new ArrayList<>(); modules.add(new RNDownloadButton()); return modules; }
Example #4
Source File: RNDownloadButtonPackage.java From react-native-download-button with MIT License | 5 votes |
@Override public List<com.facebook.react.uimanager.ViewManager> createViewManagers(ReactApplicationContext reactContext) { List<com.facebook.react.uimanager.ViewManager> modules = new ArrayList<>(); modules.add(new RNDownloadButton()); return modules; }
Example #5
Source File: ViewUtil.java From TapTargetView with Apache License 2.0 | 5 votes |
static void removeView(ViewManager parent, View child) { if (parent == null || child == null) { return; } try { parent.removeView(child); } catch (Exception ignored) { // This catch exists for modified versions of Android that have a buggy ViewGroup // implementation. See b.android.com/77639, #121 and #49 } }
Example #6
Source File: ViewUtils.java From react-native-navigation with MIT License | 4 votes |
public static void removeFromParent(View view) { ViewParent parent = view.getParent(); if (parent != null) { ((ViewManager) parent).removeView(view); } }
Example #7
Source File: ViewController.java From react-native-navigation with MIT License | 4 votes |
public void detachView() { if (view == null || view.getParent() == null) return; ((ViewManager) view.getParent()).removeView(view); }
Example #8
Source File: MainActivity.java From c3nav-android with Apache License 2.0 | 4 votes |
protected void unloadSplashVideo() { if (logoAnimView != null) { ((ViewManager) logoAnimView.getParent()).removeView(logoAnimView); logoAnimView = null; } }
Example #9
Source File: Utils.java From droid-stealth with GNU General Public License v2.0 | 4 votes |
/** * Remove a view from a layout * * @param v the view to remove */ public static void remove(View v) { if (v.getParent() != null) { ((ViewManager) v.getParent()).removeView(v); } }
Example #10
Source File: TileUrlFragment.java From geopackage-mapcache-android with MIT License | 2 votes |
/** * Delete a row from shared prefs and the Linear Layout * @param itemRow LinearLayout of the row to be deleted */ private void deleteRow(View itemRow){ ((ViewManager)itemRow.getParent()).removeView(itemRow); }