Example usage for android.widget FrameLayout getParent

List of usage examples for android.widget FrameLayout getParent

Introduction

In this page you can find the example usage for android.widget FrameLayout getParent.

Prototype

public final ViewParent getParent() 

Source Link

Document

Gets the parent of this view.

Usage

From source file:com.community.yuequ.bottombar.BottomBarBadge.java

void removeFromTab(BottomBarTab tab) {
    FrameLayout badgeAndTabContainer = (FrameLayout) getParent();
    ViewGroup originalTabContainer = (ViewGroup) badgeAndTabContainer.getParent();

    badgeAndTabContainer.removeView(tab);
    originalTabContainer.removeView(badgeAndTabContainer);
    originalTabContainer.addView(tab, tab.getIndexInTabContainer());
}