Skip to content
This repository was archived by the owner on Dec 18, 2022. It is now read-only.

Commit 1e63af6

Browse files
committed
modify drawable resources for more distinction between buttons and messages
1 parent 713e4f7 commit 1e63af6

File tree

12 files changed

+14
-17
lines changed

12 files changed

+14
-17
lines changed

sampleapp/src/main/java/io/matthewnelson/sampleapp/App.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ class App: Application() {
215215
e.message?.let {
216216
DashboardFragment.showMessage(
217217
DashMessage(
218-
"${DashMessage.EXCEPTION}$it", R.drawable.rounded_rectangle_color_red, 5_000
218+
"${DashMessage.EXCEPTION}$it", R.drawable.dash_message_color_red, 5_000
219219
)
220220
)
221221
}

sampleapp/src/main/java/io/matthewnelson/sampleapp/ui/fragments/home/HomeFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class HomeFragment : Fragment() {
158158
DashMessage(
159159
DashMessage.EXCEPTION +
160160
"TorServiceController.Builder.build() has not been called yet.",
161-
R.drawable.rounded_rectangle_color_red,
161+
R.drawable.dash_message_color_red,
162162
3_000
163163
)
164164
)

sampleapp/src/main/java/io/matthewnelson/sampleapp/ui/fragments/settings/library/SettingsLibraryFragment.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class SettingsLibraryFragment : Fragment() {
161161
else
162162
it
163163
DashboardFragment.showMessage(
164-
DashMessage(msg, R.drawable.rounded_rectangle_color_red, 8_000L)
164+
DashMessage(msg, R.drawable.dash_message_color_red, 8_000L)
165165
)
166166
}
167167
return
@@ -174,7 +174,7 @@ class SettingsLibraryFragment : Fragment() {
174174
if (bmChanges || nChanges || cChanges) {
175175
DashboardFragment.librarySettingsWereChanged()
176176
DashboardFragment.showMessage(
177-
DashMessage("Settings Saved", R.drawable.rounded_rectangle_color_green, 3_000L)
177+
DashMessage("Settings Saved", R.drawable.dash_message_color_green, 3_000L)
178178
)
179179
}
180180
}

sampleapp/src/main/res/drawable/rounded_rectangle_color_grey.xml renamed to sampleapp/src/main/res/drawable/button_color_grey.xml

File renamed without changes.

sampleapp/src/main/res/drawable/rounded_rectangle_color_secondary.xml renamed to sampleapp/src/main/res/drawable/button_color_secondary.xml

File renamed without changes.

sampleapp/src/main/res/drawable/rounded_rectangle_color_green.xml renamed to sampleapp/src/main/res/drawable/dash_message_color_green.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
<shape xmlns:android="http://schemas.android.com/apk/res/android"
33
android:shape="rectangle">
44
<solid android:color="@color/green" />
5-
<corners android:radius="8dp" />
65
</shape>

sampleapp/src/main/res/drawable/rounded_rectangle_color_primary_light.xml renamed to sampleapp/src/main/res/drawable/dash_message_color_primary_light.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
<shape xmlns:android="http://schemas.android.com/apk/res/android"
33
android:shape="rectangle">
44
<solid android:color="@color/primaryLightColor" />
5-
<corners android:radius="8dp" />
65
</shape>

sampleapp/src/main/res/drawable/rounded_rectangle_color_red.xml renamed to sampleapp/src/main/res/drawable/dash_message_color_red.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
<shape xmlns:android="http://schemas.android.com/apk/res/android"
33
android:shape="rectangle">
44
<solid android:color="@color/red" />
5-
<corners android:radius="8dp" />
65
</shape>

sampleapp/src/main/res/layout/fragment_dashboard.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@
204204
android:layout_width="0dp"
205205
android:layout_height="wrap_content"
206206
android:layout_marginTop="8dp"
207-
android:background="@drawable/rounded_rectangle_color_secondary"
207+
android:background="@drawable/button_color_secondary"
208208
android:text="@string/dash_button_app_restart"
209209
android:textAllCaps="false"
210210
android:visibility="gone"

sampleapp/src/main/res/layout/fragment_home.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
android:layout_marginStart="16dp"
102102
android:layout_marginEnd="16dp"
103103
android:layout_marginBottom="8dp"
104-
android:background="@drawable/rounded_rectangle_color_grey"
104+
android:background="@drawable/button_color_grey"
105105
android:text="@string/home_button_debugging_enable"
106106
android:textAllCaps="false"
107107
app:layout_constraintBottom_toTopOf="@+id/home_button_start"
@@ -113,7 +113,7 @@
113113
android:layout_width="0dp"
114114
android:layout_height="wrap_content"
115115
android:layout_marginBottom="8dp"
116-
android:background="@drawable/rounded_rectangle_color_grey"
116+
android:background="@drawable/button_color_grey"
117117
android:text="@string/home_button_start"
118118
android:textAllCaps="false"
119119
app:layout_constraintBottom_toTopOf="@id/home_button_restart"
@@ -125,7 +125,7 @@
125125
android:layout_width="0dp"
126126
android:layout_height="wrap_content"
127127
android:layout_marginBottom="8dp"
128-
android:background="@drawable/rounded_rectangle_color_grey"
128+
android:background="@drawable/button_color_grey"
129129
android:text="@string/home_button_stop"
130130
android:textAllCaps="false"
131131
app:layout_constraintBottom_toTopOf="@id/home_button_new_identity"
@@ -142,7 +142,7 @@
142142
android:layout_marginEnd="4dp"
143143
android:layout_marginRight="4dp"
144144
android:layout_marginBottom="16dp"
145-
android:background="@drawable/rounded_rectangle_color_grey"
145+
android:background="@drawable/button_color_grey"
146146
android:text="@string/home_button_restart"
147147
android:textAllCaps="false"
148148
app:layout_constraintBottom_toBottomOf="parent"
@@ -158,7 +158,7 @@
158158
android:layout_marginEnd="16dp"
159159
android:layout_marginRight="16dp"
160160
android:layout_marginBottom="16dp"
161-
android:background="@drawable/rounded_rectangle_color_grey"
161+
android:background="@drawable/button_color_grey"
162162
android:text="@string/home_button_new_identity"
163163
android:textAllCaps="false"
164164
app:layout_constraintBottom_toBottomOf="parent"

0 commit comments

Comments
 (0)