Skip to content
This repository was archived by the owner on Jul 2, 2025. It is now read-only.

Commit a06b60e

Browse files
image button at runFragment
1 parent 303f5ad commit a06b60e

File tree

5 files changed

+39
-7
lines changed

5 files changed

+39
-7
lines changed

android/canonical/app/src/main/java/com/google/samples/quickstart/canonical/MainActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ class MainActivity : AppCompatActivity() {
7474
val observer = Observer<Boolean> {
7575
when (it) {
7676
true -> {
77-
Log.d("Profile", "firebaseUser is not null")
77+
Log.d(MAIN_ACTIVITY_TAG, "firebaseUser is not null")
7878
}
7979

8080
false -> {
81-
Log.d("Profile", "firebaseUser is null")
81+
Log.d(MAIN_ACTIVITY_TAG, "firebaseUser is null")
8282
val intent = Intent(this, MainActivity::class.java)
8383
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
8484
startActivity(intent)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24"
5+
android:viewportHeight="24"
6+
android:tint="?attr/colorControlNormal">
7+
<path
8+
android:fillColor="@android:color/white"
9+
android:pathData="M10,17l5,-5 -5,-5v10z"/>
10+
</vector>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24"
5+
android:viewportHeight="24"
6+
android:tint="?attr/colorControlNormal">
7+
<path
8+
android:fillColor="@android:color/white"
9+
android:pathData="M6,19h4L10,5L6,5v14zM14,5v14h4L18,5h-4z"/>
10+
</vector>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24"
5+
android:viewportHeight="24"
6+
android:tint="?attr/colorControlNormal">
7+
<path
8+
android:fillColor="@android:color/white"
9+
android:pathData="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z"/>
10+
</vector>

android/canonical/app/src/main/res/layout/fragment_run.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,31 +45,33 @@
4545
app:layout_constraintBottom_toBottomOf="parent"
4646
app:layout_constraintTop_toBottomOf="@+id/running_chronometer">
4747

48-
<Button
48+
<ImageButton
4949
android:id="@+id/reset_btn"
5050
android:layout_width="wrap_content"
5151
android:layout_height="wrap_content"
5252
android:layout_weight="1"
5353
android:layout_margin="20dp"
54+
android:src="@drawable/ic_baseline_refresh_24"
5455
android:text="@string/reset"
5556
/>
5657

57-
<Button
58+
<ImageButton
5859
android:id="@+id/start_pause_btn"
5960
android:layout_width="wrap_content"
6061
android:layout_height="wrap_content"
6162
android:layout_weight="1"
6263
android:layout_margin="20dp"
63-
android:text="@{stopwatchViewModel.getIsStopwatchWorkingMutableLiveData() ? @string/pause : @string/start}"
64+
android:src="@{stopwatchViewModel.getIsStopwatchWorkingMutableLiveData()?@drawable/ic_baseline_pause_24 : @drawable/ic_baseline_arrow_right_24}"
6465
/>
6566

66-
<Button
67+
68+
<ImageButton
6769
android:id="@+id/submit_btn"
6870
android:layout_width="wrap_content"
6971
android:layout_height="wrap_content"
7072
android:layout_weight="1"
7173
android:layout_margin="20dp"
72-
android:text="@string/submit"
74+
android:src="@drawable/ic_baseline_send_24"
7375
/>
7476

7577
</LinearLayout>

0 commit comments

Comments
 (0)