Use vibrate toggle button
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M0,15h2L2,9L0,9v6zM3,17h2L5,7L3,7v10zM22,9v6h2L24,9h-2zM19,17h2L21,7h-2v10zM16.5,3h-9C6.67,3 6,3.67 6,4.5v15c0,0.83 0.67,1.5 1.5,1.5h9c0.83,0 1.5,-0.67 1.5,-1.5v-15c0,-0.83 -0.67,-1.5 -1.5,-1.5zM16,19L8,19L8,5h8v14z"/>
|
||||
</vector>
|
||||
@@ -103,12 +103,9 @@
|
||||
android:drawableStart="@drawable/ic_ringtone_24dp"
|
||||
android:drawablePadding="@dimen/text_compound_drawable_padding"/>
|
||||
|
||||
<!--TODO: See CheckableImageButton-->
|
||||
<CheckBox
|
||||
<com.philliphsu.clock2.alarms.ui.TempCheckableImageButton
|
||||
android:id="@+id/vibrate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="Vibrate"/>
|
||||
style="@style/AlarmVibrateToggle"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="BaseAlarmToggleButton">
|
||||
<item name="android:background">?selectableItemBackgroundBorderless</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -63,6 +63,7 @@
|
||||
<!--ExpandedAlarmViewHolder-->
|
||||
<dimen name="expanded_alarm_elevation">2dp</dimen> <!--TODO: Increase for v21-->
|
||||
<dimen name="label_height">48dp</dimen>
|
||||
<dimen name="vibrate_toggle_size">48dp</dimen>
|
||||
|
||||
<!--EditTimerActivity-->
|
||||
<dimen name="field_end_margin">8dp</dimen>
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="AlarmDayToggle">
|
||||
<style name="BaseAlarmToggleButton">
|
||||
<item name="android:background">?selectableItemBackground</item>
|
||||
</style>
|
||||
<style name="AlarmDayToggle" parent="BaseAlarmToggleButton">
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
<item name="android:textAllCaps">true</item>
|
||||
<item name="android:background">?selectableItemBackground</item>
|
||||
</style>
|
||||
<style name="AlarmVibrateToggle" parent="BaseAlarmToggleButton">
|
||||
<item name="android:layout_width">@dimen/vibrate_toggle_size</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="srcCompat">@drawable/ic_vibrate_24dp</item>
|
||||
</style>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user