From a0934638b38af0d2283a4cdacc2b0890a0ddf482 Mon Sep 17 00:00:00 2001 From: Domagalski Date: Thu, 3 Jan 2019 22:17:30 +0100 Subject: [PATCH] toast and icon changed --- .../com/uam/wmi/findmytutor/activity/BlackList.java | 5 +---- .../com/uam/wmi/findmytutor/activity/WhiteList.java | 4 +--- app/src/main/res/drawable/ic_add_person.xml | 13 +++++++++++++ app/src/main/res/layout/activity_black_list.xml | 2 +- app/src/main/res/layout/activity_white_list.xml | 2 +- 5 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 app/src/main/res/drawable/ic_add_person.xml diff --git a/app/src/main/java/com/uam/wmi/findmytutor/activity/BlackList.java b/app/src/main/java/com/uam/wmi/findmytutor/activity/BlackList.java index 89b5004..bc4fbca 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/activity/BlackList.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/activity/BlackList.java @@ -248,11 +248,8 @@ public class BlackList extends AppCompatActivity { } else { message = "Network Error !"; } - Toast.makeText(getApplicationContext(), e.toString(), Toast.LENGTH_SHORT).show(); - - Snackbar.make(getWindow().getDecorView().getRootView(), message, Snackbar.LENGTH_LONG) - .setAction("Action", null).show(); + Toast.makeText(this, message, Snackbar.LENGTH_LONG).show(); } private void toggleEmptyNotes() { diff --git a/app/src/main/java/com/uam/wmi/findmytutor/activity/WhiteList.java b/app/src/main/java/com/uam/wmi/findmytutor/activity/WhiteList.java index 8ad8ea8..a51793b 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/activity/WhiteList.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/activity/WhiteList.java @@ -235,9 +235,7 @@ public class WhiteList extends AppCompatActivity { } else { message = "Network Error !"; } - - Snackbar.make(getWindow().getDecorView().getRootView(), message, Snackbar.LENGTH_LONG) - .setAction("Action", null).show(); + Toast.makeText(this, message, Snackbar.LENGTH_LONG).show(); } private void toggleEmptyNotes() { diff --git a/app/src/main/res/drawable/ic_add_person.xml b/app/src/main/res/drawable/ic_add_person.xml new file mode 100644 index 0000000..cc6dd3f --- /dev/null +++ b/app/src/main/res/drawable/ic_add_person.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_black_list.xml b/app/src/main/res/layout/activity_black_list.xml index 903ec62..b4c9188 100644 --- a/app/src/main/res/layout/activity_black_list.xml +++ b/app/src/main/res/layout/activity_black_list.xml @@ -73,7 +73,7 @@ android:layout_marginTop="-322dp" app:layout_anchor="@id/app_bar" app:layout_anchorGravity="bottom|end" - app:srcCompat="@android:drawable/ic_input_add" + app:srcCompat="@drawable/ic_add_person" app:useCompatPadding="true" tools:srcCompat="@tools:sample/backgrounds/scenic" /> diff --git a/app/src/main/res/layout/activity_white_list.xml b/app/src/main/res/layout/activity_white_list.xml index 0654405..7c196c5 100644 --- a/app/src/main/res/layout/activity_white_list.xml +++ b/app/src/main/res/layout/activity_white_list.xml @@ -73,7 +73,7 @@ android:layout_marginTop="-322dp" app:layout_anchor="@id/app_bar" app:layout_anchorGravity="bottom|end" - app:srcCompat="@android:drawable/ic_input_add" + app:srcCompat="@drawable/ic_add_person" app:useCompatPadding="true" tools:srcCompat="@tools:sample/backgrounds/scenic" /> -- 2.20.1