From fb8b763f762ae21923c58d64caa729b012f40e05 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 23 Aug 2010 21:05:08 -0700 Subject: Use only one GL context per process, share chaches. Change-Id: Ieabaa25338d2f4b8d4fd90e7401ad6e7452eae11 --- .../src/com/google/android/test/hwui/ListActivity.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') 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 { -- cgit v1.1