Example usage for android.widget Toolbar getChildAt

List of usage examples for android.widget Toolbar getChildAt

Introduction

In this page you can find the example usage for android.widget Toolbar getChildAt.

Prototype

public View getChildAt(int index) 

Source Link

Document

Returns the view at the specified position in the group.

Usage

From source file:Main.java

private static TextView getTitleTextView(Toolbar toolbar) {
    TextView textView = null;//from   ww w  .j a v a2 s. c o m
    for (int i = 0; i < toolbar.getChildCount(); i++) {
        if (toolbar.getChildAt(i).getClass() == TextView.class) {
            textView = (TextView) toolbar.getChildAt(i);
        }
    }
    return textView;
}