Date: 2011apr5
Platform: Android
Q. Android: access various resources in my app
A.
To use your own layout item (view) in Java:
txtDave = (TextView) findViewById(R.id.about_dave);
To use your own string in Java:
String app_name = resources.getString(R.string.app_name);
To use a built-in icon in Java:
setIcon(android.R.drawable.ic_dialog_alert)
setIcon(android.R.drawable.ic_menu_manage);
To use your own graphic in a layout:
android:icon="@drawable/my_icon"
To use a built-in graphic in a layout:
android:icon="@android:drawable/ic_menu_save"
Built-in drawables:
http://since2006.com/android/2.1-drawables.php