You only have the opportunity to write:
<com.android.mypackage.myclass id="@+id/button" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@android:drawable/button" android:padding="10dip" />
class="@string/class_name does not work, because the class name must be constant and be available at compile time when generating Java code from XML.
@string/class_name means that the value of the R.string.class_name field is "dynamically" read at runtime.
user432219
source share