Rounded and larger button treatment
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size android:width="120dp" android:height="120dp" />
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:startColor="#81C784"
|
||||
android:endColor="#4CAF50"
|
||||
android:type="linear" />
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="#A5D6A7" />
|
||||
</shape>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size android:width="120dp" android:height="120dp" />
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:startColor="#C8E6C9"
|
||||
android:endColor="#A5D6A7"
|
||||
android:type="linear" />
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="#E8F5E9" />
|
||||
</shape>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size android:width="120dp" android:height="120dp" />
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:startColor="#66BB6A"
|
||||
android:endColor="#388E3C"
|
||||
android:type="linear" />
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="#81C784" />
|
||||
</shape>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/btn_duration_disabled" android:state_enabled="false" />
|
||||
<item android:drawable="@drawable/btn_duration_pressed" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/btn_duration_pressed" android:state_activated="true" />
|
||||
<item android:drawable="@drawable/btn_duration_default" />
|
||||
</selector>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size android:width="120dp" android:height="120dp" />
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:startColor="#42A5F5"
|
||||
android:endColor="#1565C0"
|
||||
android:type="linear" />
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="#90CAF9" />
|
||||
</shape>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size android:width="120dp" android:height="120dp" />
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:startColor="#90CAF9"
|
||||
android:endColor="#64B5F6"
|
||||
android:type="linear" />
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="#BBDEFB" />
|
||||
</shape>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size android:width="120dp" android:height="120dp" />
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:startColor="#1E88E5"
|
||||
android:endColor="#0D47A1"
|
||||
android:type="linear" />
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="#42A5F5" />
|
||||
</shape>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/btn_restart_disabled" android:state_enabled="false" />
|
||||
<item android:drawable="@drawable/btn_restart_pressed" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/btn_restart_pressed" android:state_activated="true" />
|
||||
<item android:drawable="@drawable/btn_restart_default" />
|
||||
</selector>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size android:width="120dp" android:height="120dp" />
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:startColor="#4CAF50"
|
||||
android:endColor="#2E7D32"
|
||||
android:type="linear" />
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="#66BB6A" />
|
||||
</shape>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size android:width="120dp" android:height="120dp" />
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:startColor="#A5D6A7"
|
||||
android:endColor="#81C784"
|
||||
android:type="linear" />
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="#C8E6C9" />
|
||||
</shape>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size android:width="120dp" android:height="120dp" />
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:startColor="#388E3C"
|
||||
android:endColor="#1B5E20"
|
||||
android:type="linear" />
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="#4CAF50" />
|
||||
</shape>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/btn_start_disabled" android:state_enabled="false" />
|
||||
<item android:drawable="@drawable/btn_start_pressed" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/btn_start_pressed" android:state_activated="true" />
|
||||
<item android:drawable="@drawable/btn_start_default" />
|
||||
</selector>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size android:width="120dp" android:height="120dp" />
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:startColor="#EF5350"
|
||||
android:endColor="#C62828"
|
||||
android:type="linear" />
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="#EF9A9A" />
|
||||
</shape>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size android:width="120dp" android:height="120dp" />
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:startColor="#EF9A9A"
|
||||
android:endColor="#E57373"
|
||||
android:type="linear" />
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="#FFCDD2" />
|
||||
</shape>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size android:width="120dp" android:height="120dp" />
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:startColor="#E53935"
|
||||
android:endColor="#B71C1C"
|
||||
android:type="linear" />
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="#EF5350" />
|
||||
</shape>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/btn_stop_disabled" android:state_enabled="false" />
|
||||
<item android:drawable="@drawable/btn_stop_pressed" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/btn_stop_pressed" android:state_activated="true" />
|
||||
<item android:drawable="@drawable/btn_stop_default" />
|
||||
</selector>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="48dp"
|
||||
android:height="48dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M17.65,6.35C16.2,4.9 14.21,4 12,4c-4.42,0 -7.99,3.58 -7.99,8s3.57,8 7.99,8c3.73,0 6.84,-2.55 7.73,-6h-2.08c-0.82,2.33 -3.04,4 -5.65,4 -3.31,0 -6,-2.69 -6,-6s2.69,-6 6,-6c1.66,0 3.14,0.69 4.22,1.78L13,11h7V4L17.65,6.35z"
|
||||
android:strokeWidth="0" />
|
||||
</vector>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="48dp"
|
||||
android:height="48dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M6,6h12v12H6z"
|
||||
android:strokeWidth="0" />
|
||||
</vector>
|
||||
@@ -110,15 +110,22 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
<Button
|
||||
android:id="@+id/btnDurationLabel"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:background="@drawable/btn_duration_selector"
|
||||
android:text="@string/start_timer"
|
||||
android:drawableEnd="@drawable/ic_keyboard_arrow_down"
|
||||
app:cornerRadius="20dp" />
|
||||
android:drawablePadding="8dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false" />
|
||||
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/hsvDurationOptions"
|
||||
@@ -165,15 +172,19 @@
|
||||
</com.google.android.material.chip.ChipGroup>
|
||||
</HorizontalScrollView>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
<Button
|
||||
android:id="@+id/btnStart"
|
||||
style="@style/Widget.Material3.Button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/btn_start_selector"
|
||||
android:drawableTop="@drawable/ic_play_arrow"
|
||||
android:gravity="center"
|
||||
android:padding="16dp"
|
||||
android:text="@string/start_timer"
|
||||
app:cornerRadius="20dp"
|
||||
app:icon="@drawable/ic_play_arrow" />
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
@@ -5,47 +5,71 @@
|
||||
android:layout_height="match_parent"
|
||||
android:background="#80000000">
|
||||
|
||||
<com.example.countdowntimer.CountdownCanvasView
|
||||
android:id="@+id/cvCountdown"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/buttonRow"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/buttonRow"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="48dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnStop"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@drawable/btn_stop_selector"
|
||||
android:drawableTop="@drawable/ic_stop_square"
|
||||
android:gravity="center"
|
||||
android:padding="16dp"
|
||||
android:text="Stop"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnRestart"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@drawable/btn_restart_selector"
|
||||
android:drawableTop="@drawable/ic_refresh_square"
|
||||
android:gravity="center"
|
||||
android:padding="16dp"
|
||||
android:text="Restart"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDismiss"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:background="@drawable/btn_duration_selector"
|
||||
android:gravity="center"
|
||||
android:padding="16dp"
|
||||
android:text="Dismiss"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.example.countdowntimer.CountdownCanvasView
|
||||
android:id="@+id/cvCountdown"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/btnStop"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_margin="16dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnStop"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Stop"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/btnRestart"
|
||||
app:layout_constraintHorizontal_chainStyle="spread" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnRestart"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Restart"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/btnStop"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
Reference in New Issue
Block a user