Loading res/layout/alarm_time.xml +2 −2 Original line number Diff line number Diff line Loading @@ -105,7 +105,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:visibility="gone" android:layout_marginBottom="48dp" android:layout_marginBottom="@dimen/collapse_expand_height" android:layout_gravity="bottom" > <TextView android:id="@+id/edit_label" Loading Loading @@ -198,7 +198,7 @@ <FrameLayout android:id="@+id/collapse_expand" android:layout_width="match_parent" android:layout_height="48dp" android:layout_height="@dimen/collapse_expand_height" android:contentDescription="@string/collapse_alarm" android:layout_gravity="bottom" > <ImageView Loading res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -210,4 +210,7 @@ <!-- top margin for digital_appwidget_listview --> <dimen name="digital_widget_list_margin_top">20dp</dimen> <dimen name="digital_widget_city_margin_bottom">10dp</dimen> <!-- Bottom margin for the expand area --> <dimen name="collapse_expand_height">48dp</dimen> </resources> src/com/android/deskclock/AlarmClockFragment.java +7 −4 Original line number Diff line number Diff line Loading @@ -674,6 +674,7 @@ public class AlarmClockFragment extends DeskClockFragment implements private Bundle mPreviousDaysOfWeekMap = new Bundle(); private final boolean mHasVibrator; private final int mCollapseExpandHeight; // This determines the order in which it is shown and processed in the UI. private final int[] DAY_ORDER = new int[] { Loading Loading @@ -764,6 +765,8 @@ public class AlarmClockFragment extends DeskClockFragment implements mHasVibrator = ((Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE)) .hasVibrator(); mCollapseExpandHeight = (int) res.getDimension(R.dimen.collapse_expand_height); } public void removeSelectedId(int id) { Loading Loading @@ -1517,9 +1520,8 @@ public class AlarmClockFragment extends DeskClockFragment implements // Calculate some values to help with the animation. final int endingHeight = itemHolder.alarmItem.getHeight(); final int distance = endingHeight - startingHeight; final int collapseHeight = itemHolder.collapseExpandArea.getHeight(); int hairlineHeight = itemHolder.hairLine.getHeight(); final int hairlineDistance = collapseHeight - hairlineHeight; final int hairlineDistance = mCollapseExpandHeight - hairlineHeight; // Re-set the visibilities for the start state of the animation. itemHolder.expandArea.setVisibility(View.VISIBLE); Loading @@ -1539,7 +1541,8 @@ public class AlarmClockFragment extends DeskClockFragment implements (int) (value * distance + startingHeight); FrameLayout.LayoutParams expandParams = (FrameLayout.LayoutParams) itemHolder.expandArea.getLayoutParams(); expandParams.setMargins(0, (int) (value * distance), 0, collapseHeight); expandParams.setMargins( 0, (int) (value * distance), 0, mCollapseExpandHeight); itemHolder.arrow.setRotation(180 * (1 - value)); itemHolder.hairLine.setTranslationY(-hairlineDistance * (1 - value)); itemHolder.summary.setAlpha(value); Loading @@ -1558,7 +1561,7 @@ public class AlarmClockFragment extends DeskClockFragment implements FrameLayout.LayoutParams expandParams = (FrameLayout.LayoutParams) itemHolder.expandArea.getLayoutParams(); expandParams.setMargins(0, 0, 0, 96); expandParams.setMargins(0, 0, 0, mCollapseExpandHeight); itemHolder.expandArea.setVisibility(View.GONE); itemHolder.arrow.setRotation(0); Loading Loading
res/layout/alarm_time.xml +2 −2 Original line number Diff line number Diff line Loading @@ -105,7 +105,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:visibility="gone" android:layout_marginBottom="48dp" android:layout_marginBottom="@dimen/collapse_expand_height" android:layout_gravity="bottom" > <TextView android:id="@+id/edit_label" Loading Loading @@ -198,7 +198,7 @@ <FrameLayout android:id="@+id/collapse_expand" android:layout_width="match_parent" android:layout_height="48dp" android:layout_height="@dimen/collapse_expand_height" android:contentDescription="@string/collapse_alarm" android:layout_gravity="bottom" > <ImageView Loading
res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -210,4 +210,7 @@ <!-- top margin for digital_appwidget_listview --> <dimen name="digital_widget_list_margin_top">20dp</dimen> <dimen name="digital_widget_city_margin_bottom">10dp</dimen> <!-- Bottom margin for the expand area --> <dimen name="collapse_expand_height">48dp</dimen> </resources>
src/com/android/deskclock/AlarmClockFragment.java +7 −4 Original line number Diff line number Diff line Loading @@ -674,6 +674,7 @@ public class AlarmClockFragment extends DeskClockFragment implements private Bundle mPreviousDaysOfWeekMap = new Bundle(); private final boolean mHasVibrator; private final int mCollapseExpandHeight; // This determines the order in which it is shown and processed in the UI. private final int[] DAY_ORDER = new int[] { Loading Loading @@ -764,6 +765,8 @@ public class AlarmClockFragment extends DeskClockFragment implements mHasVibrator = ((Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE)) .hasVibrator(); mCollapseExpandHeight = (int) res.getDimension(R.dimen.collapse_expand_height); } public void removeSelectedId(int id) { Loading Loading @@ -1517,9 +1520,8 @@ public class AlarmClockFragment extends DeskClockFragment implements // Calculate some values to help with the animation. final int endingHeight = itemHolder.alarmItem.getHeight(); final int distance = endingHeight - startingHeight; final int collapseHeight = itemHolder.collapseExpandArea.getHeight(); int hairlineHeight = itemHolder.hairLine.getHeight(); final int hairlineDistance = collapseHeight - hairlineHeight; final int hairlineDistance = mCollapseExpandHeight - hairlineHeight; // Re-set the visibilities for the start state of the animation. itemHolder.expandArea.setVisibility(View.VISIBLE); Loading @@ -1539,7 +1541,8 @@ public class AlarmClockFragment extends DeskClockFragment implements (int) (value * distance + startingHeight); FrameLayout.LayoutParams expandParams = (FrameLayout.LayoutParams) itemHolder.expandArea.getLayoutParams(); expandParams.setMargins(0, (int) (value * distance), 0, collapseHeight); expandParams.setMargins( 0, (int) (value * distance), 0, mCollapseExpandHeight); itemHolder.arrow.setRotation(180 * (1 - value)); itemHolder.hairLine.setTranslationY(-hairlineDistance * (1 - value)); itemHolder.summary.setAlpha(value); Loading @@ -1558,7 +1561,7 @@ public class AlarmClockFragment extends DeskClockFragment implements FrameLayout.LayoutParams expandParams = (FrameLayout.LayoutParams) itemHolder.expandArea.getLayoutParams(); expandParams.setMargins(0, 0, 0, 96); expandParams.setMargins(0, 0, 0, mCollapseExpandHeight); itemHolder.expandArea.setVisibility(View.GONE); itemHolder.arrow.setRotation(0); Loading