diff options
author | Michael Kolb <kolby@google.com> | 2010-10-13 19:23:42 -0700 |
---|---|---|
committer | Michael Kolb <kolby@google.com> | 2010-10-14 11:43:12 -0700 |
commit | 772927a9fa4acaafdef4ae3bde91cf0bb822ebd7 (patch) | |
tree | 5b67f5385c888a650948e0b7faec57da7a358989 /src/com/android/browser/BrowserHistoryPage.java | |
parent | daece2e96475d269ea54cd92a290a787071e7298 (diff) | |
download | packages_apps_Browser-772927a9fa4acaafdef4ae3bde91cf0bb822ebd7.zip packages_apps_Browser-772927a9fa4acaafdef4ae3bde91cf0bb822ebd7.tar.gz packages_apps_Browser-772927a9fa4acaafdef4ae3bde91cf0bb822ebd7.tar.bz2 |
fix history context menu bug
http://b/issue?id=2953912
Note: the bookmark status (star) is not correct
and will be fixed separately
Change-Id: I20d1e52e9d6f6aeb7c0f1c66a61bed4d001e9092
Diffstat (limited to 'src/com/android/browser/BrowserHistoryPage.java')
-rw-r--r-- | src/com/android/browser/BrowserHistoryPage.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/com/android/browser/BrowserHistoryPage.java b/src/com/android/browser/BrowserHistoryPage.java index ab622b1..e565696 100644 --- a/src/com/android/browser/BrowserHistoryPage.java +++ b/src/com/android/browser/BrowserHistoryPage.java @@ -167,6 +167,7 @@ public class BrowserHistoryPage extends Fragment Bundle savedInstanceState) { View root = inflater.inflate(R.layout.history, container, false); mList = (ExpandableListView) root.findViewById(android.R.id.list); + mList.setCacheColorHint(0); mList.setOnCreateContextMenuListener(this); mList.setOnChildClickListener(this); mAdapter = new HistoryAdapter(getActivity()); @@ -316,8 +317,8 @@ public class BrowserHistoryPage extends Fragment @Override public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) { - if (v instanceof BookmarkItem) { - mCallbacks.onUrlSelected(((BookmarkItem) v).getUrl(), false); + if (v instanceof HistoryItem) { + mCallbacks.onUrlSelected(((HistoryItem) v).getUrl(), false); return true; } return false; @@ -331,9 +332,9 @@ public class BrowserHistoryPage extends Fragment @Override public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { - BookmarkItem item; - if (null == convertView || !(convertView instanceof BookmarkItem)) { - item = new BookmarkItem(getContext()); + HistoryItem item; + if (null == convertView || !(convertView instanceof HistoryItem)) { + item = new HistoryItem(getContext()); // Add padding on the left so it will be indented from the // arrows on the group views. item.setPadding(item.getPaddingLeft() + 10, @@ -341,7 +342,7 @@ public class BrowserHistoryPage extends Fragment item.getPaddingRight(), item.getPaddingBottom()); } else { - item = (BookmarkItem) convertView; + item = (HistoryItem) convertView; } // Bail early if the Cursor is closed. |