diff options
author | Andrew Dolgov <[email protected]> | 2013-11-29 15:54:29 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-11-29 15:54:29 +0400 |
commit | 2a285be364421498a585d925aa135f60535e63e4 (patch) | |
tree | 4c8dbe945c8986a4890682a6713b859aa124a0da /src | |
parent | 2b194eb720a1f1b20e6a2a9bef1b45e08e86a90f (diff) |
add comic context menu title
Diffstat (limited to 'src')
-rw-r--r-- | src/org/fox/ttcomics/ComicListFragment.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/org/fox/ttcomics/ComicListFragment.java b/src/org/fox/ttcomics/ComicListFragment.java index 9ae37b6..b919705 100644 --- a/src/org/fox/ttcomics/ComicListFragment.java +++ b/src/org/fox/ttcomics/ComicListFragment.java @@ -6,9 +6,7 @@ import java.io.IOException; import java.io.InputStream;
import android.app.Activity;
-import android.app.AlertDialog;
import android.content.Context;
-import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.SQLException;
@@ -278,7 +276,13 @@ public class ComicListFragment extends Fragment implements OnItemClickListener { getActivity().getMenuInflater().inflate(R.menu.comic_archive_context, menu);
- // menu.setTitle(..); etc
+ AdapterContextMenuInfo info = (AdapterContextMenuInfo)menuInfo;
+
+ Cursor c = (Cursor) m_adapter.getItem(info.position);
+
+ if (c != null) {
+ menu.setHeaderTitle(c.getString(c.getColumnIndex("filename")));
+ }
super.onCreateContextMenu(menu, v, menuInfo);
}
|