diff options
author | Romain Guy <romainguy@google.com> | 2010-08-23 21:05:08 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2010-08-24 17:18:14 -0700 |
commit | fb8b763f762ae21923c58d64caa729b012f40e05 (patch) | |
tree | 013792d41f32bff4dd35e6d53eebac711c513729 /tests/HwAccelerationTest/src/com/google/android/test/hwui/ListActivity.java | |
parent | a1f1174b396cda7bdff469a2e974a737600c5eb0 (diff) | |
download | frameworks_base-fb8b763f762ae21923c58d64caa729b012f40e05.zip frameworks_base-fb8b763f762ae21923c58d64caa729b012f40e05.tar.gz frameworks_base-fb8b763f762ae21923c58d64caa729b012f40e05.tar.bz2 |
Use only one GL context per process, share chaches.
Change-Id: Ieabaa25338d2f4b8d4fd90e7401ad6e7452eae11
Diffstat (limited to 'tests/HwAccelerationTest/src/com/google/android/test/hwui/ListActivity.java')
-rw-r--r-- | tests/HwAccelerationTest/src/com/google/android/test/hwui/ListActivity.java | 12 |
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> { |