summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-03-23 10:56:31 -0700
committerJohn Reck <jreck@google.com>2011-03-23 10:59:47 -0700
commit99ab48a8a23f0d017445ed5055ed14b9588a4856 (patch)
tree1de9e0ab1b48749b5be7b88aaa6101ae165ba7d6
parent71791a09579b21ef61f00c38056497cd99667440 (diff)
downloadpackages_apps_Browser-99ab48a8a23f0d017445ed5055ed14b9588a4856.zip
packages_apps_Browser-99ab48a8a23f0d017445ed5055ed14b9588a4856.tar.gz
packages_apps_Browser-99ab48a8a23f0d017445ed5055ed14b9588a4856.tar.bz2
Fix history crash on xlarge
Bug: 4153292 Change-Id: Ia1f397e0f37e3b0d4428e22a4d810c1ce214a833
-rw-r--r--res/layout/preference_list_content.xml92
-rw-r--r--res/values-land/dimensions.xml18
-rw-r--r--res/values/dimensions.xml6
-rw-r--r--src/com/android/browser/BrowserHistoryPage.java6
4 files changed, 119 insertions, 3 deletions
diff --git a/res/layout/preference_list_content.xml b/res/layout/preference_list_content.xml
new file mode 100644
index 0000000..ad3d64e
--- /dev/null
+++ b/res/layout/preference_list_content.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2011 The Android Open Source Project Licensed under the
+ Apache License, Version 2.0 (the "License"); you may not use this file
+ except in compliance with the License. You may obtain a copy of the
+ License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+ applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ CONDITIONS OF ANY KIND, either express or implied. See the License for
+ the specific language governing permissions and limitations under the
+ License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent">
+
+ <LinearLayout
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="0px"
+ android:layout_weight="1">
+
+ <LinearLayout
+ android:id="@+id/headers"
+ android:orientation="vertical"
+ android:layout_width="0px"
+ android:layout_height="match_parent"
+ android:layout_marginRight="@dimen/preference_screen_side_margin_negative"
+ android:layout_marginLeft="@dimen/preference_screen_side_margin"
+ android:layout_marginTop="32dp"
+ android:layout_marginBottom="32dp"
+ android:layout_weight="10">
+
+ <ListView android:id="@android:id/list"
+ android:layout_width="match_parent"
+ android:layout_height="0px"
+ android:layout_weight="1"
+ android:drawSelectorOnTop="false"
+ android:cacheColorHint="@android:color/transparent"
+ android:listPreferredItemHeight="48dp"
+ android:scrollbarAlwaysDrawVerticalTrack="true" />
+
+ <FrameLayout android:id="@+id/list_footer"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="0" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/prefs_frame"
+ android:layout_width="0px"
+ android:layout_height="match_parent"
+ android:layout_weight="20"
+ android:layout_marginLeft="@dimen/preference_screen_side_margin"
+ android:layout_marginRight="@dimen/preference_screen_side_margin"
+ android:layout_marginTop="16dp"
+ android:layout_marginBottom="16dp"
+ android:background="?android:attr/detailsElementBackground"
+ android:orientation="vertical"
+ android:visibility="gone" >
+
+ <!-- Breadcrumb inserted here -->
+ <android.app.FragmentBreadCrumbs
+ android:id="@android:id/title"
+ android:layout_height="72dip"
+ android:layout_width="match_parent"
+ android:paddingTop="16dip"
+ android:paddingBottom="8dip"
+ android:gravity="center_vertical|left"
+ android:layout_marginLeft="48dip"
+ android:layout_marginRight="48dip"
+ />
+
+ <ImageView
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ android:paddingLeft="32dip"
+ android:paddingRight="32dip"
+ android:src="#404040"
+ />
+ <android.preference.PreferenceFrameLayout android:id="@+id/prefs"
+ android:layout_width="match_parent"
+ android:layout_height="0dip"
+ android:layout_weight="1"
+ android:layout_marginTop="-1dip"
+ />
+ </LinearLayout>
+ </LinearLayout>
+</LinearLayout>
diff --git a/res/values-land/dimensions.xml b/res/values-land/dimensions.xml
new file mode 100644
index 0000000..f3b1235
--- /dev/null
+++ b/res/values-land/dimensions.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2011 The Android Open Source Project Licensed under the
+ Apache License, Version 2.0 (the "License"); you may not use this file
+ except in compliance with the License. You may obtain a copy of the
+ License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+ applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ CONDITIONS OF ANY KIND, either express or implied. See the License for
+ the specific language governing permissions and limitations under the
+ License.
+-->
+
+<resources>
+ <dimen name="preference_screen_side_margin">96dp</dimen>
+ <dimen name="preference_screen_side_margin_negative">-100dp</dimen>
+ <dimen name="preference_widget_width">72dp</dimen>
+</resources>
diff --git a/res/values/dimensions.xml b/res/values/dimensions.xml
index f1e7fb3..2f1a91e 100644
--- a/res/values/dimensions.xml
+++ b/res/values/dimensions.xml
@@ -58,4 +58,10 @@
<dimen name="combo_paddingLeftRight">8dip</dimen>
<dimen name="combo_horizontalSpacing">6dip</dimen>
<dimen name="tab_view_thumbnail_height">76dip</dimen>
+ <!-- Preference activity side margins -->
+ <dimen name="preference_screen_side_margin">0dp</dimen>
+ <!-- Preference activity side margins negative-->
+ <dimen name="preference_screen_side_margin_negative">0dp</dimen>
+ <!-- Preference widget area width (to the left of the text) -->
+ <dimen name="preference_widget_width">56dp</dimen>
</resources>
diff --git a/src/com/android/browser/BrowserHistoryPage.java b/src/com/android/browser/BrowserHistoryPage.java
index 2dcda68..50bed36 100644
--- a/src/com/android/browser/BrowserHistoryPage.java
+++ b/src/com/android/browser/BrowserHistoryPage.java
@@ -258,10 +258,10 @@ public class BrowserHistoryPage extends Fragment
}
private void inflateTwoPane(ViewStub stub) {
- stub.setLayoutResource(com.android.internal.R.layout.preference_list_content);
+ stub.setLayoutResource(R.layout.preference_list_content);
stub.inflate();
mGroupList = (ListView) mRoot.findViewById(android.R.id.list);
- mPrefsContainer = (ViewGroup) mRoot.findViewById(com.android.internal.R.id.prefs_frame);
+ mPrefsContainer = (ViewGroup) mRoot.findViewById(R.id.prefs_frame);
mFragmentBreadCrumbs = (FragmentBreadCrumbs) mRoot.findViewById(android.R.id.title);
mFragmentBreadCrumbs.setMaxVisible(1);
mFragmentBreadCrumbs.setActivity(getActivity());
@@ -274,7 +274,7 @@ public class BrowserHistoryPage extends Fragment
mChildList.setAdapter(mChildWrapper);
mChildList.setOnItemClickListener(mChildItemClickListener);
registerForContextMenu(mChildList);
- ViewGroup prefs = (ViewGroup) mRoot.findViewById(com.android.internal.R.id.prefs);
+ ViewGroup prefs = (ViewGroup) mRoot.findViewById(R.id.prefs);
prefs.addView(mChildList);
}