diff options
author | John Reck <jreck@google.com> | 2011-05-18 09:03:36 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-05-18 09:03:36 -0700 |
commit | fba541e7ca1ae088bf612d2d98fe4ce60b7c1e01 (patch) | |
tree | fcab178478150890e8a7403ca0ab91e722b4851a | |
parent | 9320ab5b395e2c47514e94dc4a8db7cb5dc8d66d (diff) | |
parent | e619f1e55fe312b5b4ad451e56dd12f73ea66a49 (diff) | |
download | packages_apps_browser-fba541e7ca1ae088bf612d2d98fe4ce60b7c1e01.zip packages_apps_browser-fba541e7ca1ae088bf612d2d98fe4ce60b7c1e01.tar.gz packages_apps_browser-fba541e7ca1ae088bf612d2d98fe4ce60b7c1e01.tar.bz2 |
resolved conflicts for merge of e619f1e5 to master
Change-Id: I04de9e92a91cd66e848d37cbb07f7d36a4edba06
-rw-r--r-- | res/layout-w600dp/pick_bookmark.xml (renamed from res/layout-xlarge/pick_bookmark.xml) | 0 | ||||
-rw-r--r-- | res/menu-w600dp/browser.xml (renamed from res/menu-xlarge/browser.xml) | 0 | ||||
-rw-r--r-- | res/values-w600dp-port/dimensions.xml (renamed from res/values-xlarge-port/dimensions.xml) | 0 | ||||
-rw-r--r-- | res/values-w600dp/bools.xml | 16 | ||||
-rw-r--r-- | res/values-w600dp/dimensions.xml (renamed from res/values-xlarge/dimensions.xml) | 0 | ||||
-rw-r--r-- | res/values-w600dp/integers.xml (renamed from res/values-xlarge/integers.xml) | 0 | ||||
-rw-r--r-- | res/values-w600dp/strings.xml (renamed from res/values-xlarge/strings.xml) | 0 | ||||
-rw-r--r-- | res/values/bools.xml | 16 | ||||
-rw-r--r-- | src/com/android/browser/BrowserActivity.java | 8 | ||||
-rw-r--r-- | src/com/android/browser/BrowserBookmarksPage.java | 6 | ||||
-rw-r--r-- | src/com/android/browser/CombinedBookmarkHistoryView.java | 2 |
11 files changed, 39 insertions, 9 deletions
diff --git a/res/layout-xlarge/pick_bookmark.xml b/res/layout-w600dp/pick_bookmark.xml index b35dbb9..b35dbb9 100644 --- a/res/layout-xlarge/pick_bookmark.xml +++ b/res/layout-w600dp/pick_bookmark.xml diff --git a/res/menu-xlarge/browser.xml b/res/menu-w600dp/browser.xml index be4a521..be4a521 100644 --- a/res/menu-xlarge/browser.xml +++ b/res/menu-w600dp/browser.xml diff --git a/res/values-xlarge-port/dimensions.xml b/res/values-w600dp-port/dimensions.xml index 7c0d447..7c0d447 100644 --- a/res/values-xlarge-port/dimensions.xml +++ b/res/values-w600dp-port/dimensions.xml diff --git a/res/values-w600dp/bools.xml b/res/values-w600dp/bools.xml new file mode 100644 index 0000000..3218656 --- /dev/null +++ b/res/values-w600dp/bools.xml @@ -0,0 +1,16 @@ +<?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 + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <bool name="isTablet">true</bool> +</resources> diff --git a/res/values-xlarge/dimensions.xml b/res/values-w600dp/dimensions.xml index eae9b0e..eae9b0e 100644 --- a/res/values-xlarge/dimensions.xml +++ b/res/values-w600dp/dimensions.xml diff --git a/res/values-xlarge/integers.xml b/res/values-w600dp/integers.xml index abdafbf..abdafbf 100644 --- a/res/values-xlarge/integers.xml +++ b/res/values-w600dp/integers.xml diff --git a/res/values-xlarge/strings.xml b/res/values-w600dp/strings.xml index d715c1b..d715c1b 100644 --- a/res/values-xlarge/strings.xml +++ b/res/values-w600dp/strings.xml diff --git a/res/values/bools.xml b/res/values/bools.xml new file mode 100644 index 0000000..6217de1 --- /dev/null +++ b/res/values/bools.xml @@ -0,0 +1,16 @@ +<?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 + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <bool name="isTablet">false</bool> +</resources> diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java index c26d850..963f29f 100644 --- a/src/com/android/browser/BrowserActivity.java +++ b/src/com/android/browser/BrowserActivity.java @@ -85,7 +85,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 { @@ -102,10 +102,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 46197e9..6843dcf 100644 --- a/src/com/android/browser/BrowserBookmarksPage.java +++ b/src/com/android/browser/BrowserBookmarksPage.java @@ -257,7 +257,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); } @@ -362,8 +362,8 @@ public class BrowserBookmarksPage extends Fragment implements View.OnCreateConte return mRoot; } - private int getDefaultView() { - if (BrowserActivity.isXlarge(getActivity())) { + private int getDefaultView() { + 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 af87401..1fdc260 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 { |