diff options
author | Romain Guy <romainguy@android.com> | 2010-01-08 15:06:40 -0800 |
---|---|---|
committer | Romain Guy <romainguy@android.com> | 2010-01-08 15:11:39 -0800 |
commit | 7037380117b3e125f56e7ab0ef9cecfc9ccce3b4 (patch) | |
tree | 439be22543aa7b4b4e2885751035d918f6f5e3cc | |
parent | 904feffa844b5dbbe55eaf4f89c8a1c1880bb6eb (diff) | |
download | AlarmClock-7037380117b3e125f56e7ab0ef9cecfc9ccce3b4.tar.gz |
Deprecate fill_parent and introduce match_parent.
Bug: #2361749.
-rw-r--r-- | res/layout-land/alarm_clock.xml | 8 | ||||
-rw-r--r-- | res/layout/alarm_alert.xml | 8 | ||||
-rw-r--r-- | res/layout/alarm_clock.xml | 8 | ||||
-rw-r--r-- | res/layout/alarm_time.xml | 16 | ||||
-rw-r--r-- | res/layout/analog_appwidget.xml | 4 | ||||
-rw-r--r-- | res/layout/clockpicker.xml | 8 | ||||
-rw-r--r-- | res/layout/context_menu_header.xml | 8 | ||||
-rw-r--r-- | res/layout/digital_clock.xml | 6 | ||||
-rw-r--r-- | res/layout/save_cancel_alarm.xml | 10 | ||||
-rw-r--r-- | res/values/styles.xml | 4 | ||||
-rw-r--r-- | src/com/android/alarmclock/SetAlarm.java | 4 |
11 files changed, 41 insertions, 43 deletions
diff --git a/res/layout-land/alarm_clock.xml b/res/layout-land/alarm_clock.xml index ab50039..2422278 100644 --- a/res/layout-land/alarm_clock.xml +++ b/res/layout-land/alarm_clock.xml @@ -16,18 +16,18 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/base_layout" - android:layout_width="fill_parent" - android:layout_height="fill_parent" + android:layout_width="match_parent" + android:layout_height="match_parent" android:gravity="center_vertical"> <FrameLayout android:id="@+id/clock_layout" android:layout_width="208dip" - android:layout_height="fill_parent"/> + android:layout_height="match_parent"/> <ListView android:id="@+id/alarms_list" - android:layout_width="fill_parent" + android:layout_width="match_parent" android:layout_height="wrap_content" /> </LinearLayout> diff --git a/res/layout/alarm_alert.xml b/res/layout/alarm_alert.xml index 1b5c2c4..40cb864 100644 --- a/res/layout/alarm_alert.xml +++ b/res/layout/alarm_alert.xml @@ -16,8 +16,8 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" - android:layout_height="fill_parent" + android:layout_width="match_parent" + android:layout_height="match_parent" android:gravity="center"> <LinearLayout @@ -33,10 +33,10 @@ android:singleLine="true" android:ellipsize="end" android:gravity="center" - android:layout_width="fill_parent" + android:layout_width="match_parent" android:layout_height="wrap_content" /> <ImageView - android:layout_width="fill_parent" + android:layout_width="match_parent" android:layout_height="1dip" android:scaleType="fitXY" android:gravity="fill_horizontal" diff --git a/res/layout/alarm_clock.xml b/res/layout/alarm_clock.xml index d8a8dc6..48a0f2c 100644 --- a/res/layout/alarm_clock.xml +++ b/res/layout/alarm_clock.xml @@ -16,19 +16,19 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/base_layout" - android:layout_width="fill_parent" - android:layout_height="fill_parent" + android:layout_width="match_parent" + android:layout_height="match_parent" android:layout_marginTop="6dip" android:orientation="vertical"> <LinearLayout android:id="@+id/clock_layout" - android:layout_width="fill_parent" + android:layout_width="match_parent" android:layout_height="192dip"/> <ListView android:id="@+id/alarms_list" - android:layout_width="fill_parent" + android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" /> diff --git a/res/layout/alarm_time.xml b/res/layout/alarm_time.xml index ecf5cda..98bc953 100644 --- a/res/layout/alarm_time.xml +++ b/res/layout/alarm_time.xml @@ -17,7 +17,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:paddingLeft="5dip" - android:layout_width="fill_parent" + android:layout_width="match_parent" android:layout_height="wrap_content"> <!-- A layout that displays the time. Shows time, am/pm (if 12-hour), @@ -25,7 +25,7 @@ <com.android.alarmclock.DigitalClock android:id="@+id/digitalClock" android:layout_width="wrap_content" - android:layout_height="fill_parent" + android:layout_height="match_parent" android:layout_weight="1" android:gravity="center_vertical" android:orientation="vertical" @@ -33,7 +33,7 @@ android:paddingRight="8dip"> <LinearLayout - android:layout_width="fill_parent" + android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/timeDisplay" @@ -44,13 +44,13 @@ <LinearLayout android:id="@+id/am_pm" android:layout_width="wrap_content" - android:layout_height="fill_parent" + android:layout_height="match_parent" android:layout_marginLeft="4dip" android:orientation="vertical"> <TextView android:id="@+id/am" android:layout_width="wrap_content" - android:layout_height="fill_parent" + android:layout_height="match_parent" android:gravity="bottom" android:layout_weight=".5" android:includeFontPadding="false" @@ -58,7 +58,7 @@ <TextView android:id="@+id/pm" android:layout_width="wrap_content" - android:layout_height="fill_parent" + android:layout_height="match_parent" android:gravity="top" android:layout_weight=".5" android:includeFontPadding="false" @@ -68,13 +68,13 @@ </LinearLayout> <TextView android:id="@+id/daysOfWeek" - android:layout_width="fill_parent" + android:layout_width="match_parent" android:layout_height="wrap_content" android:textSize="10sp" android:textColor="@color/ltgrey"/> <TextView android:id="@+id/label" - android:layout_width="fill_parent" + android:layout_width="match_parent" android:layout_height="wrap_content" android:textSize="12sp" android:textColor="@color/ltgrey" diff --git a/res/layout/analog_appwidget.xml b/res/layout/analog_appwidget.xml index 6a10611..d2becb3 100644 --- a/res/layout/analog_appwidget.xml +++ b/res/layout/analog_appwidget.xml @@ -19,5 +19,5 @@ android:dial="@drawable/appwidget_clock_dial" android:hand_hour="@drawable/appwidget_clock_hour" android:hand_minute="@drawable/appwidget_clock_minute" - android:layout_width="fill_parent" - android:layout_height="fill_parent" /> + android:layout_width="match_parent" + android:layout_height="match_parent" /> diff --git a/res/layout/clockpicker.xml b/res/layout/clockpicker.xml index 2e2c3b9..781fecf 100644 --- a/res/layout/clockpicker.xml +++ b/res/layout/clockpicker.xml @@ -15,8 +15,8 @@ --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" - android:layout_height="fill_parent"> + android:layout_width="match_parent" + android:layout_height="match_parent"> <TextView android:id="@+id/instructions" @@ -30,14 +30,14 @@ /> <LinearLayout android:id="@+id/clock_layout" - android:layout_width="fill_parent" + android:layout_width="match_parent" android:layout_below="@+id/instructions" android:layout_height="208dip" android:gravity="center"/> <Gallery android:id="@+id/gallery" android:background="#70000000" - android:layout_width="fill_parent" + android:layout_width="match_parent" android:layout_height="80dip" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" diff --git a/res/layout/context_menu_header.xml b/res/layout/context_menu_header.xml index 6ac4dc5..55846f5 100644 --- a/res/layout/context_menu_header.xml +++ b/res/layout/context_menu_header.xml @@ -16,7 +16,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" + android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingTop="6dip" android:paddingBottom="9dip" @@ -34,15 +34,15 @@ <TextView android:id="@+id/header_time" style="?android:attr/textAppearanceLarge" android:layout_width="wrap_content" - android:layout_height="fill_parent" + android:layout_height="match_parent" android:singleLine="true" android:gravity="center_vertical" android:ellipsize="none"/> <TextView android:id="@+id/header_label" style="?android:attr/textAppearanceLarge" - android:layout_width="fill_parent" - android:layout_height="fill_parent" + android:layout_width="match_parent" + android:layout_height="match_parent" android:layout_marginLeft="20dip" android:singleLine="true" android:gravity="right|center_vertical" diff --git a/res/layout/digital_clock.xml b/res/layout/digital_clock.xml index bca806f..132cb19 100644 --- a/res/layout/digital_clock.xml +++ b/res/layout/digital_clock.xml @@ -30,20 +30,20 @@ <LinearLayout android:id="@+id/am_pm" android:layout_width="wrap_content" - android:layout_height="fill_parent" + android:layout_height="match_parent" android:layout_marginLeft="4dip" android:orientation="vertical"> <TextView android:id="@+id/am" android:layout_width="wrap_content" - android:layout_height="fill_parent" + android:layout_height="match_parent" android:gravity="bottom" android:layout_weight=".5" android:includeFontPadding="false" android:textSize="28sp"/> <TextView android:id="@+id/pm" android:layout_width="wrap_content" - android:layout_height="fill_parent" + android:layout_height="match_parent" android:gravity="top" android:layout_weight=".5" android:includeFontPadding="false" diff --git a/res/layout/save_cancel_alarm.xml b/res/layout/save_cancel_alarm.xml index 73e9f84..242b69f 100644 --- a/res/layout/save_cancel_alarm.xml +++ b/res/layout/save_cancel_alarm.xml @@ -15,22 +15,22 @@ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" + android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" style="@android:style/ButtonBar"> <Button android:id="@+id/alarm_save" android:focusable="true" - android:layout_width="fill_parent" - android:layout_height="fill_parent" + android:layout_width="match_parent" + android:layout_height="match_parent" android:layout_weight="1" android:text="@string/done"/> <Button android:id="@+id/alarm_cancel" android:focusable="true" - android:layout_width="fill_parent" - android:layout_height="fill_parent" + android:layout_width="match_parent" + android:layout_height="match_parent" android:layout_weight="1" android:text="@string/revert"/> diff --git a/res/values/styles.xml b/res/values/styles.xml index c9286aa..4117438 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -16,8 +16,8 @@ <resources> <style name="clock"> - <item name="android:layout_width">fill_parent</item> - <item name="android:layout_height">fill_parent</item> + <item name="android:layout_width">match_parent</item> + <item name="android:layout_height">match_parent</item> <item name="android:layout_gravity">center_horizontal</item> </style> diff --git a/src/com/android/alarmclock/SetAlarm.java b/src/com/android/alarmclock/SetAlarm.java index 009df05..3078358 100644 --- a/src/com/android/alarmclock/SetAlarm.java +++ b/src/com/android/alarmclock/SetAlarm.java @@ -19,8 +19,6 @@ package com.android.alarmclock; import android.app.TimePickerDialog; import android.content.Context; import android.content.Intent; -import android.media.RingtoneManager; -import android.net.Uri; import android.os.Bundle; import android.preference.CheckBoxPreference; import android.preference.EditTextPreference; @@ -129,7 +127,7 @@ public class SetAlarm extends PreferenceActivity // Have the ListView expand to fill the screen minus the save/cancel // buttons. LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams( - LayoutParams.FILL_PARENT, + LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); lp.weight = 1; ll.addView(lv, lp); |