summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJeff Hamilton <jham@android.com>2011-01-26 17:32:29 -0600
committerJeff Hamilton <jham@android.com>2011-01-27 10:01:35 -0600
commita28ec9f29875e2f81aa889f7dc57b21c6b72de75 (patch)
treebb2fd7b55a7fccc311102d47c33424ce7434cc8c /src
parent516ca5bcef9b1e0730497e865b38ae2340175dad (diff)
downloadandroid_packages_apps_Tag-a28ec9f29875e2f81aa889f7dc57b21c6b72de75.tar.gz
android_packages_apps_Tag-a28ec9f29875e2f81aa889f7dc57b21c6b72de75.tar.bz2
android_packages_apps_Tag-a28ec9f29875e2f81aa889f7dc57b21c6b72de75.zip
UI tweaks
Change-Id: Iec3516551ed5cd7a2247ba0a02959d24474956f3
Diffstat (limited to 'src')
-rw-r--r--src/com/android/apps/tag/MyTagList.java14
-rw-r--r--src/com/android/apps/tag/TagList.java1
2 files changed, 9 insertions, 6 deletions
diff --git a/src/com/android/apps/tag/MyTagList.java b/src/com/android/apps/tag/MyTagList.java
index 80e04e4..3ba03c8 100644
--- a/src/com/android/apps/tag/MyTagList.java
+++ b/src/com/android/apps/tag/MyTagList.java
@@ -33,7 +33,6 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
-import android.content.SharedPreferences;
import android.database.CharArrayBuffer;
import android.database.Cursor;
import android.net.Uri;
@@ -46,6 +45,7 @@ import android.os.Bundle;
import android.util.Log;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
+import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.view.MenuInflater;
import android.view.MenuItem;
@@ -385,6 +385,7 @@ public class MyTagList
return;
}
+ menu.setHeaderTitle(cursor.getString(TagQuery.COLUMN_TITLE));
long id = cursor.getLong(TagQuery.COLUMN_ID);
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.my_tag_list_context_menu, menu);
@@ -472,9 +473,12 @@ public class MyTagList
@Override
protected Dialog onCreateDialog(int id, Bundle args) {
if (id == DIALOG_ID_SELECT_ACTIVE_TAG) {
- mSelectActiveTagDialog = new WeakReference<SelectActiveTagDialog>(
- new SelectActiveTagDialog(this, mAdapter.getCursor()));
- return mSelectActiveTagDialog.get();
+ Context lightTheme = new ContextThemeWrapper(this, android.R.style.Theme_Light);
+ SelectActiveTagDialog dialog = new SelectActiveTagDialog(lightTheme,
+ mAdapter.getCursor());
+ dialog.setInverseBackgroundForced(true);
+ mSelectActiveTagDialog = new WeakReference<SelectActiveTagDialog>(dialog);
+ return dialog;
} else if (id == DIALOG_ID_ADD_NEW_TAG) {
return new TagContentSelector(this, this);
}
@@ -589,7 +593,7 @@ public class MyTagList
super(context);
setTitle(context.getResources().getString(R.string.choose_my_tag));
- ListView list = new ListView(MyTagList.this);
+ ListView list = new ListView(context);
mData = Lists.newArrayList();
mSelectAdapter = new SimpleAdapter(
diff --git a/src/com/android/apps/tag/TagList.java b/src/com/android/apps/tag/TagList.java
index f3d9c82..76f45a6 100644
--- a/src/com/android/apps/tag/TagList.java
+++ b/src/com/android/apps/tag/TagList.java
@@ -61,7 +61,6 @@ public class TagList extends ListActivity implements OnClickListener {
new TagLoaderTask().execute((Void[]) null);
mAdapter = new TagAdapter(this);
setListAdapter(mAdapter);
- registerForContextMenu(getListView());
}
@Override