Redesign start button as circular icon with spacing adjustment
Replace the rectangular Material Button with a circular FrameLayout containing the play icon. Add a small spacer above it for better visual separation from the duration chips. Update MainActivity to reference the new View type instead of Button. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -81,7 +81,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
findViewById<Button>(R.id.btnStart).setOnClickListener {
|
findViewById<View>(R.id.btnStart).setOnClickListener {
|
||||||
CountdownDialog(this, selectedDuration, prefs).show()
|
CountdownDialog(this, selectedDuration, prefs).show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
android:tint="@android:color/white">
|
android:tint="@android:color/white">
|
||||||
<path
|
<path
|
||||||
android:fillColor="@android:color/white"
|
android:fillColor="@android:color/white"
|
||||||
android:pathData="M20,20v80l60,-40z" />
|
android:pathData="M0,20v80l80,-40z" />
|
||||||
</vector>
|
</vector>
|
||||||
|
|||||||
@@ -202,23 +202,38 @@
|
|||||||
</com.google.android.material.chip.ChipGroup>
|
</com.google.android.material.chip.ChipGroup>
|
||||||
</HorizontalScrollView>
|
</HorizontalScrollView>
|
||||||
|
|
||||||
<Button
|
<View
|
||||||
android:id="@+id/btnStart"
|
android:id="@+id/spacerBelowChips"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="1dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="5dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="8dp"
|
||||||
android:background="@drawable/btn_start_selector"
|
|
||||||
android:contentDescription="Start"
|
|
||||||
android:gravity="center"
|
|
||||||
android:padding="24dp"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:icon="@drawable/ic_play_arrow_large"
|
|
||||||
app:iconSize="56dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/hsvDurationOptions" />
|
app:layout_constraintTop_toBottomOf="@+id/hsvDurationOptions" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/btnStart"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="100dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:background="@drawable/btn_start_selector"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/spacerBelowChips">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:contentDescription="Start"
|
||||||
|
android:padding="20dp"
|
||||||
|
android:src="@drawable/ic_play_arrow"
|
||||||
|
android:tint="@android:color/white" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user