I am using a custom inflater to inflate a layout. I have the rootView of the layout. Now I want to check for all the child views that have text attr set in it.
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world"
The child view could be anything (TextView, Labelm EditText, etc.). How can I get the attributes defined for a view. I tried the following code but couldn't get the string (returns null)
int[] textSizeAttr = new int[] { android.R.attr.text };
TypedValue typedValue = new TypedValue();
TypedArray a= childView.getContext().obtainStyledAttributes(typedValue.data, textSizeAttr);
How do I get the attributes of a view? Thanks in advance.