summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-05-17 12:35:37 -0700
committerJohn Reck <jreck@google.com>2011-05-17 12:49:09 -0700
commita5176f3e20d7bc0f07b1434f35c9458f40477644 (patch)
tree6fa93f28ea410ab8c4d8d56654e5edb7bcba88f9 /src/com/android/browser
parent27f72f5f8f8db7eaa68683b95c1a7aeeb16ce979 (diff)
downloadpackages_apps_Browser-a5176f3e20d7bc0f07b1434f35c9458f40477644.zip
packages_apps_Browser-a5176f3e20d7bc0f07b1434f35c9458f40477644.tar.gz
packages_apps_Browser-a5176f3e20d7bc0f07b1434f35c9458f40477644.tar.bz2
Use tablet UI for large
Bug: 4443420 Change-Id: I51e85a75cc246e940374eca8eae43ddcd3898923
Diffstat (limited to 'src/com/android/browser')
-rw-r--r--src/com/android/browser/BrowserActivity.java8
-rw-r--r--src/com/android/browser/BrowserBookmarksPage.java4
-rw-r--r--src/com/android/browser/CombinedBookmarkHistoryView.java2
3 files changed, 6 insertions, 8 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 3c025d2..a9b65fd 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -96,7 +96,7 @@ public class BrowserActivity extends Activity {
}
mController = new Controller(this);
- boolean xlarge = isXlarge(this);
+ boolean xlarge = isTablet(this);
if (xlarge) {
mUi = new XLargeUi(this, mController);
} else {
@@ -113,10 +113,8 @@ public class BrowserActivity extends Activity {
mController.start(icicle, getIntent());
}
- public static boolean isXlarge(Context context) {
- return (context.getResources().getConfiguration().screenLayout
- & Configuration.SCREENLAYOUT_SIZE_MASK)
- == Configuration.SCREENLAYOUT_SIZE_XLARGE;
+ public static boolean isTablet(Context context) {
+ return context.getResources().getBoolean(R.bool.isTablet);
}
@VisibleForTesting
diff --git a/src/com/android/browser/BrowserBookmarksPage.java b/src/com/android/browser/BrowserBookmarksPage.java
index de28d0d..a3cb9fc 100644
--- a/src/com/android/browser/BrowserBookmarksPage.java
+++ b/src/com/android/browser/BrowserBookmarksPage.java
@@ -262,7 +262,7 @@ public class BrowserBookmarksPage extends Fragment implements View.OnCreateConte
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
inflater.inflate(R.menu.bookmark, menu);
- if (!BrowserActivity.isXlarge(getActivity())) {
+ if (!BrowserActivity.isTablet(getActivity())) {
MenuItem item = menu.findItem(R.id.add_bookmark);
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
}
@@ -387,7 +387,7 @@ public class BrowserBookmarksPage extends Fragment implements View.OnCreateConte
}
private int getDefaultView() {
- if (BrowserActivity.isXlarge(getActivity())) {
+ if (BrowserActivity.isTablet(getActivity())) {
return VIEW_THUMBNAILS;
}
return VIEW_LIST;
diff --git a/src/com/android/browser/CombinedBookmarkHistoryView.java b/src/com/android/browser/CombinedBookmarkHistoryView.java
index 793f7a2..febf75b 100644
--- a/src/com/android/browser/CombinedBookmarkHistoryView.java
+++ b/src/com/android/browser/CombinedBookmarkHistoryView.java
@@ -157,7 +157,7 @@ public class CombinedBookmarkHistoryView extends LinearLayout
}
void setupActionBar(int startingFragment) {
- if (BrowserActivity.isXlarge(mContext)) {
+ if (BrowserActivity.isTablet(mContext)) {
mActionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_HOME
| ActionBar.DISPLAY_USE_LOGO);
} else {