Example usage for android.widget FrameLayout findViewWithTag

List of usage examples for android.widget FrameLayout findViewWithTag

Introduction

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

Prototype

public final <T extends View> T findViewWithTag(Object tag) 

Source Link

Document

Look for a child view with the given tag.

Usage

From source file:com.ndn.menurandom.ImageDownloader.java

private void hideLoadingProgress(ImageView imageView) {
    FrameLayout frameLayout = (FrameLayout) imageView.getParent();
    ProgressBar progressBar = (ProgressBar) frameLayout.findViewWithTag("pb_imagedownloader");
    progressBar.setVisibility(View.INVISIBLE);
}

From source file:com.ndn.menurandom.ImageDownloader.java

private void showLoadingProgress(ImageView imageView) {
    if (mUseLoadingProgress) {
        FrameLayout frameLayout = (FrameLayout) imageView.getParent();
        ProgressBar progressBar = (ProgressBar) frameLayout.findViewWithTag("pb_imagedownloader");
        progressBar.setVisibility(View.VISIBLE);
    }//w w  w  .j  a v  a2  s.c  o  m
}

From source file:br.ufrgs.ufrgsmapas.libs.SearchBox.java

/***
 * Reveal the searchbox from a menu item. Specify the menu item id and pass the activity so the item can be found
 * @param id View ID/*from   w w  w  . java 2 s. c  o  m*/
 * @param activity Activity
 */
public void revealFromMenuItem(int id, Activity activity) {
    setVisibility(View.VISIBLE);
    View menuButton = activity.findViewById(id);
    if (menuButton != null) {
        FrameLayout layout = (FrameLayout) activity.getWindow().getDecorView()
                .findViewById(android.R.id.content);
        if (layout.findViewWithTag("searchBox") == null) {
            int[] location = new int[2];
            menuButton.getLocationInWindow(location);
            revealFrom((float) location[0], (float) location[1], activity, this);
        }
    }
}