类android.view.ViewManager源码实例Demo

下面列出了怎么用android.view.ViewManager的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: react-native-navigation   文件: ViewController.java
@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;
    }
}
 
源代码2 项目: styT   文件: ViewUtil.java
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
    }
}
 
@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;
}
 
@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;
}
 
源代码5 项目: TapTargetView   文件: ViewUtil.java
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
  }
}
 
源代码6 项目: react-native-navigation   文件: ViewUtils.java
public static void removeFromParent(View view) {
    ViewParent parent = view.getParent();
    if (parent != null) {
        ((ViewManager) parent).removeView(view);
    }
}
 
源代码7 项目: react-native-navigation   文件: ViewController.java
public void detachView() {
    if (view == null || view.getParent() == null) return;
    ((ViewManager) view.getParent()).removeView(view);
}
 
源代码8 项目: c3nav-android   文件: MainActivity.java
protected void unloadSplashVideo() {
    if (logoAnimView != null) {
        ((ViewManager) logoAnimView.getParent()).removeView(logoAnimView);
        logoAnimView = null;
    }
}
 
源代码9 项目: droid-stealth   文件: Utils.java
/**
 * 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);
	}
}
 
/**
 * 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);
}
 
 类所在包
 同包方法