diff options
author | Sam Blitzstein <sblitz@google.com> | 2013-09-11 01:08:17 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-09-11 01:08:17 +0000 |
commit | 4c4f52efb8bf289f825357162cf79a647e1223a6 (patch) | |
tree | 9a3abb61a48e01ef607fbc4964c13ff9be889f63 | |
parent | b10333515a9b3992238c66b1495abd6749f309b2 (diff) | |
parent | 13b1605e4372cc715a09d7fff1d1a8aee4522782 (diff) | |
download | android_packages_apps_DeskClock-4c4f52efb8bf289f825357162cf79a647e1223a6.tar.gz android_packages_apps_DeskClock-4c4f52efb8bf289f825357162cf79a647e1223a6.tar.bz2 android_packages_apps_DeskClock-4c4f52efb8bf289f825357162cf79a647e1223a6.zip |
Merge "Hide bottom bar in landscape." into ics-ub-clock-amazon
-rw-r--r-- | res/layout-land/clock_fragment.xml | 50 | ||||
-rw-r--r-- | res/values-land/config.xml | 3 | ||||
-rw-r--r-- | res/values-land/dimens.xml | 2 | ||||
-rw-r--r-- | res/values-sw600dp-land/config.xml | 3 | ||||
-rw-r--r-- | res/values/config.xml | 3 | ||||
-rw-r--r-- | 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" > <include layout="@layout/main_clock_frame" android:id="@+id/main_clock_left_pane" android:layout_width="0dp" @@ -42,35 +43,20 @@ android:layout_marginRight="20dp" android:layout_gravity="center" /> </LinearLayout> - <FrameLayout - android:background="@drawable/footer_bg" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="bottom" > - <ImageButton - android:id="@+id/cities_button" - android:contentDescription="@string/button_cities" - android:layout_width="@dimen/footer_button_size" - android:layout_height="@dimen/footer_button_size" - android:layout_marginTop="@dimen/footer_button_layout_margin" - android:layout_marginBottom="@dimen/footer_button_layout_margin" - android:layout_marginRight="@dimen/footer_button_layout_margin" - android:layout_marginEnd="@dimen/footer_button_layout_margin" - android:layout_marginLeft="@dimen/footer_button_layout_margin" - android:layout_marginStart="@dimen/footer_button_layout_margin" - android:layout_gravity="center_horizontal" - android:src="@drawable/ic_globe" - style="@style/button" - android:onClick="clockButtonsOnClick" - android:background="@drawable/main_button_normal" /> - <ImageButton - android:id="@+id/menu_button" - android:contentDescription="@string/button_menu" - style="?android:attr/actionOverflowButtonStyle" - android:background="@drawable/item_background" - android:onClick="clockButtonsOnClick" - android:layout_gravity="end|center_vertical" - android:layout_width="@dimen/footer_button_size" - android:layout_height="@dimen/footer_button_size" /> - </FrameLayout> + <ImageButton + android:id="@+id/cities_button" + android:contentDescription="@string/button_cities" + android:layout_width="@dimen/footer_button_size" + android:layout_height="@dimen/footer_button_size" + android:layout_marginTop="@dimen/footer_button_layout_margin" + android:layout_marginBottom="@dimen/footer_button_layout_margin" + android:layout_marginRight="@dimen/footer_button_layout_margin" + android:layout_marginEnd="@dimen/footer_button_layout_margin" + android:layout_marginLeft="@dimen/footer_button_layout_margin" + android:layout_marginStart="@dimen/footer_button_layout_margin" + android:layout_gravity="right|bottom" + android:src="@drawable/ic_globe" + style="@style/button" + android:onClick="clockButtonsOnClick" + android:background="@drawable/main_button_normal" /> </FrameLayout> 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 @@ <!-- These resources are around just to allow their values to be customized for different hardware and product builds. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Number of world clocks in a row, for the clock tab. --> <item type="integer" name="world_clocks_per_row">1</item> + <!-- Total clocks per row is 2 + world_clocks_per_row. --> + <item type="integer" name="clocks_per_row">3</item> </resources> 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 @@ <!-- Size of margin for circles. --> <dimen name="circle_margin">8dp</dimen> - <dimen name="analog_clock_margin">200dp</dimen> + <dimen name="analog_clock_margin">70dp</dimen> <dimen name="timer_circle_margin">8dp</dimen> <dimen name="world_clock_margin">8dp</dimen> 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. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <item type="integer" name="timer_column_count">2</item> + <!-- Number of world clocks in a row, for the clock tab. --> <item type="integer" name="world_clocks_per_row">2</item> + <!-- Total clocks per row is 2 + world_clocks_per_row. --> + <item type="integer" name="clocks_per_row">4</item> </resources> 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 @@ <bool name="config_dockAppEnabled">true</bool> <bool name="config_rotateAlarmAlert">false</bool> <item type="integer" name="timer_column_count">1</item> + <!-- Number of world clocks in a row, for the clock tab. --> <item type="integer" name="world_clocks_per_row">2</item> + <!-- Total clocks per row is 2 + world_clocks_per_row. --> + <item type="integer" name="clocks_per_row">4</item> </resources> 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; |