summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2010-08-24 17:20:20 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-08-24 17:20:20 -0700
commita84e02ce3cc392ccf23bbe89cdfbef650047ffe7 (patch)
tree6ddb05a329a031522ccd45c477d11556dfdb5ee1 /tests
parent17b4d9ea826609f26a73077975c2399f91b5ca36 (diff)
parentfb8b763f762ae21923c58d64caa729b012f40e05 (diff)
downloadframeworks_base-a84e02ce3cc392ccf23bbe89cdfbef650047ffe7.zip
frameworks_base-a84e02ce3cc392ccf23bbe89cdfbef650047ffe7.tar.gz
frameworks_base-a84e02ce3cc392ccf23bbe89cdfbef650047ffe7.tar.bz2
Merge "Use only one GL context per process, share chaches."
Diffstat (limited to 'tests')
-rw-r--r--tests/HwAccelerationTest/src/com/google/android/test/hwui/ListActivity.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/HwAccelerationTest/src/com/google/android/test/hwui/ListActivity.java b/tests/HwAccelerationTest/src/com/google/android/test/hwui/ListActivity.java
index c638958..94b936b 100644
--- a/tests/HwAccelerationTest/src/com/google/android/test/hwui/ListActivity.java
+++ b/tests/HwAccelerationTest/src/com/google/android/test/hwui/ListActivity.java
@@ -21,6 +21,7 @@ import android.content.Context;
import android.content.res.Resources;
import android.os.Bundle;
import android.util.DisplayMetrics;
+import android.view.ContextMenu;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
@@ -83,6 +84,17 @@ public class ListActivity extends Activity {
ListView list = (ListView) findViewById(R.id.list);
list.setAdapter(adapter);
+
+ registerForContextMenu(list);
+ }
+
+ @Override
+ public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
+ super.onCreateContextMenu(menu, v, menuInfo);
+ menu.setHeaderTitle("Context menu");
+ menu.add("List item 1");
+ menu.add("List item 2");
+ menu.add("List item 3");
}
private static class SimpleListAdapter extends ArrayAdapter<String> {