From 13b1605e4372cc715a09d7fff1d1a8aee4522782 Mon Sep 17 00:00:00 2001 From: Sam Blitzstein Date: Tue, 10 Sep 2013 16:56:32 -0700 Subject: Hide bottom bar in landscape. This way we can make sure analog clock has enough space. Bug: 10691481 Change-Id: I2075238965fcff2574ffbf3405299378b8cf3c51 --- res/layout-land/clock_fragment.xml | 50 ++++++++++------------------ res/values-land/config.xml | 3 ++ res/values-land/dimens.xml | 2 +- res/values-sw600dp-land/config.xml | 3 ++ res/values/config.xml | 3 ++ src/com/android/deskclock/ClockFragment.java | 15 --------- 6 files changed, 28 insertions(+), 48 deletions(-) diff --git a/res/layout-land/clock_fragment.xml b/res/layout-land/clock_fragment.xml index 9da67fa08..a5c8c903b 100644 --- a/res/layout-land/clock_fragment.xml +++ b/res/layout-land/clock_fragment.xml @@ -24,7 +24,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" - android:gravity="center" > + android:gravity="center" + android:weightSum="@integer/clocks_per_row" > - - - - + diff --git a/res/values-land/config.xml b/res/values-land/config.xml index ce6b491c4..060711520 100644 --- a/res/values-land/config.xml +++ b/res/values-land/config.xml @@ -20,5 +20,8 @@ + 1 + + 3 diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml index b0cdc21e2..37c2fa615 100644 --- a/res/values-land/dimens.xml +++ b/res/values-land/dimens.xml @@ -42,7 +42,7 @@ 8dp - 200dp + 70dp 8dp 8dp diff --git a/res/values-sw600dp-land/config.xml b/res/values-sw600dp-land/config.xml index 3f5141b0f..0177d398d 100644 --- a/res/values-sw600dp-land/config.xml +++ b/res/values-sw600dp-land/config.xml @@ -21,5 +21,8 @@ for different hardware and product builds. --> 2 + 2 + + 4 diff --git a/res/values/config.xml b/res/values/config.xml index fe1706335..ddb0503b3 100644 --- a/res/values/config.xml +++ b/res/values/config.xml @@ -24,5 +24,8 @@ true false 1 + 2 + + 4 diff --git a/src/com/android/deskclock/ClockFragment.java b/src/com/android/deskclock/ClockFragment.java index a57a0a022..49740c40f 100644 --- a/src/com/android/deskclock/ClockFragment.java +++ b/src/com/android/deskclock/ClockFragment.java @@ -177,21 +177,6 @@ public class ClockFragment extends DeskClockFragment implements OnSharedPreferen mAdapter = new WorldClockAdapter(getActivity()); mList.setAdapter(mAdapter); - // For landscape, put the cities button on the right and the menu in the actionbar. - View citiesButton = v.findViewById(R.id.cities_button); - View menuButton = v.findViewById(R.id.menu_button); - FrameLayout.LayoutParams layoutParams = - (FrameLayout.LayoutParams) citiesButton.getLayoutParams(); - if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { - layoutParams.gravity = Gravity.END; - menuButton.setVisibility(View.GONE); - } else { - layoutParams.gravity = Gravity.CENTER; - menuButton.setVisibility(View.VISIBLE); - } - citiesButton.setLayoutParams(layoutParams); - - mPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity()); mDefaultClockStyle = getActivity().getResources().getString(R.string.default_clock_style); return v; -- cgit v1.2.3