i have a xml like this:
item.xml with the below code:
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/list_item_title"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="15dip"
android:paddingBottom="15dip"
android:paddingLeft="15dip"
android:textSize="24sp"/>
Now i have different setcontentView in my activity, now i am trying to get the id of this textview to set font and color of the textview.
i tried this but not working:
View inflatedView = getLayoutInflater().inflate(R.layout.item, null);
TextView tv = (TextView) inflatedView.findViewById(R.id.list_item_title);
tv.setTextColor(Color.RED);