Replace mini FABs with ImageButtons
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportHeight="24"
|
||||
android:viewportWidth="24">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M6,3A1,1 0 0,1 7,4V4.88C8.06,4.44 9.5,4 11,4C14,4 14,6 16,6C19,6 20,4 20,4V12C20,12 19,14 16,14C13,14 13,12 11,12C8,12 7,14 7,14V21H5V4A1,1 0 0,1 6,3Z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M6,6h12v12H6z"/>
|
||||
</vector>
|
||||
@@ -36,8 +36,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--TODO: If we are changing the style of the mini FABS often,
|
||||
then create a style resource for them. -->
|
||||
<android.support.v7.widget.GridLayout
|
||||
android:id="@id/mini_fab_layout"
|
||||
android:layout_width="match_parent"
|
||||
@@ -45,29 +43,13 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
app:columnCount="2">
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
<ImageButton
|
||||
android:id="@+id/new_lap"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_add_lap_24dp"
|
||||
android:tint="@android:color/white"
|
||||
android:visibility="invisible"
|
||||
app:layout_columnWeight="1"
|
||||
app:layout_gravity="center"
|
||||
app:fabSize="mini"
|
||||
app:backgroundTint="?attr/colorPrimary"/>
|
||||
style="@style/AddLapButton"/>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
<ImageButton
|
||||
android:id="@+id/stop"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_stop_24dp"
|
||||
android:tint="@android:color/white"
|
||||
android:visibility="invisible"
|
||||
app:layout_columnWeight="1"
|
||||
app:layout_gravity="center"
|
||||
app:fabSize="mini"
|
||||
app:backgroundTint="?attr/colorPrimary"/>
|
||||
style="@style/StopButton"/>
|
||||
|
||||
</android.support.v7.widget.GridLayout>
|
||||
|
||||
|
||||
@@ -30,37 +30,19 @@
|
||||
app:layout_anchorGravity="bottom"
|
||||
style="@style/BaseSeekBar"/>
|
||||
|
||||
<!--TODO: If we are changing the style of the mini FABS often,
|
||||
then create a style resource for them. -->
|
||||
<android.support.v7.widget.GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/fab_total_height"
|
||||
android:layout_gravity="bottom"
|
||||
app:columnCount="2">
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
<ImageButton
|
||||
android:id="@+id/new_lap"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_add_lap_24dp"
|
||||
android:tint="@android:color/white"
|
||||
android:visibility="invisible"
|
||||
app:layout_columnWeight="1"
|
||||
app:layout_gravity="center"
|
||||
app:fabSize="mini"
|
||||
app:backgroundTint="?attr/colorPrimary"/>
|
||||
style="@style/AddLapButton"/>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
<ImageButton
|
||||
android:id="@+id/stop"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_stop_24dp"
|
||||
android:tint="@android:color/white"
|
||||
android:visibility="invisible"
|
||||
app:layout_columnWeight="1"
|
||||
app:layout_gravity="center"
|
||||
app:fabSize="mini"
|
||||
app:backgroundTint="?attr/colorPrimary"/>
|
||||
style="@style/StopButton"/>
|
||||
|
||||
</android.support.v7.widget.GridLayout>
|
||||
|
||||
|
||||
@@ -36,4 +36,8 @@
|
||||
<item name="android:background">@color/alert_dialog_background_color_black</item>
|
||||
</style>
|
||||
|
||||
<style name="SelectableButton">
|
||||
<item name="android:background">?selectableItemBackgroundBorderless</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="BaseAlarmToggleButton">
|
||||
<item name="android:background">?selectableItemBackgroundBorderless</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -188,4 +188,8 @@
|
||||
<item name="android:maxLines">1</item>
|
||||
<item name="android:textSize">@dimen/text_size_subhead</item>
|
||||
</style>
|
||||
|
||||
<style name="SelectableButton">
|
||||
<item name="android:background">?selectableItemBackground</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="BaseAlarmToggleButton">
|
||||
<item name="android:background">?selectableItemBackground</item>
|
||||
</style>
|
||||
<style name="AlarmDayToggle" parent="BaseAlarmToggleButton">
|
||||
<style name="AlarmDayToggle" parent="SelectableButton">
|
||||
<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>
|
||||
</style>
|
||||
<style name="AlarmVibrateToggle" parent="BaseAlarmToggleButton">
|
||||
<style name="AlarmVibrateToggle" parent="SelectableButton">
|
||||
<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>
|
||||
|
||||
@@ -5,4 +5,17 @@
|
||||
<item name="android:fontFamily">sans-serif-light</item>
|
||||
<item name="android:textSize">@dimen/text_size_display_3</item>
|
||||
</style>
|
||||
<style name="SideButton" parent="SelectableButton">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:visibility">invisible</item>
|
||||
<item name="layout_columnWeight">1</item>
|
||||
<item name="layout_gravity">center</item>
|
||||
</style>
|
||||
<style name="AddLapButton" parent="SideButton">
|
||||
<item name="android:src">@drawable/ic_add_lap_40dp</item>
|
||||
</style>
|
||||
<style name="StopButton" parent="SideButton">
|
||||
<item name="android:src">@drawable/ic_stop_40dp</item>
|
||||
</style>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user