layout
android:layout_width="match_parent"
android:background="@color/colorPrimary"
android:layout_height="wrap_content">
android:id="@+id/item_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textSize="25sp" />
0x01 findViewById
private TextView item_tv;
item_tv = findViewById(R.id.item_tv);
item_tv.setText("text1");
0x02 getResources().getIdentifier()
int viewId = getResources().getIdentifier("item_tv", "id", getPackageName());
TextView textView =findViewById(viewId);
textView.setText("text2");
0x03 getField()
try {
Field field