Add new text display attribute for gles version number

This commit is contained in:
Suchi Amalapurapu
2009-06-05 14:33:17 -07:00
parent 5589930805
commit 28004750d0
3 changed files with 31 additions and 17 deletions

View File

@@ -77,6 +77,14 @@
<TextView android:id="@+id/attr_five_way_nav"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/attr_gles_version_label"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/gles_version_label"
android:textStyle="bold" />
<TextView android:id="@+id/attr_gles_version"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
</ScrollView>

View File

@@ -119,4 +119,5 @@
<string name="hard_keyboard_label">hardKeyboard:</string>
<string name="navigation_label">navigation:</string>
<string name="five_way_nav_label">five way nav:</string>
<string name="gles_version_label">GLES Version:</string>
</resources>

View File

@@ -54,6 +54,7 @@ public class AppHwPref extends Activity {
private static final int TOUCHSCREEN = BASE + 1;
private static final int KEYBOARD_TYPE = BASE + 2;
private static final int NAVIGATION = BASE + 3;
private static final int GLES_VERSION = BASE + 4;
@Override
protected void onCreate(Bundle icicle) {
@@ -85,6 +86,7 @@ public class AppHwPref extends Activity {
displayTextView(R.id.attr_navigation, appHwPref, NAVIGATION);
displayFlag(R.id.attr_hard_keyboard, ConfigurationInfo.INPUT_FEATURE_HARD_KEYBOARD, appHwPref);
displayFlag(R.id.attr_five_way_nav, ConfigurationInfo.INPUT_FEATURE_FIVE_WAY_NAV, appHwPref);
displayTextView(R.id.attr_gles_version, appHwPref, GLES_VERSION);
}
}
@@ -140,6 +142,9 @@ public class AppHwPref extends Activity {
case NAVIGATION:
str = getNavigationStr(config[i]);
break;
case GLES_VERSION:
str = config[i].getGlEsVersion();
break;
}
if(str != null) {
list.add(str);