How to get a value of color attribute programmatically
问题 When I use resolveAttribute() to find out a color value of ?attr/colorControlNormal , I got 236 : TypedValue typedValue = new TypedValue(); getTheme().resolveAttribute(R.attr.colorControlNormal, typedValue, true); int color = typedValue.data; // 236 But when I use an XML layout with the following TextView element: <TextView android:id="@+id/textView" style="?android:attr/textAppearance" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="?attr