diff --git a/app/src/main/java/io/github/z3r0c00l_2k/aquadroid/MainActivity.kt b/app/src/main/java/io/github/z3r0c00l_2k/aquadroid/MainActivity.kt index 0ff5f96..8c40570 100644 --- a/app/src/main/java/io/github/z3r0c00l_2k/aquadroid/MainActivity.kt +++ b/app/src/main/java/io/github/z3r0c00l_2k/aquadroid/MainActivity.kt @@ -41,10 +41,10 @@ class MainActivity : AppCompatActivity() { val alarm = AlarmHelper() alarm.cancelAlarm(this) if (notificStatus) { - btnNotific.background = getDrawable(R.drawable.ic_bell) + btnNotific.setImageDrawable(getDrawable(R.drawable.ic_bell)) alarm.setAlarm(this, sharedPref.getInt(AppUtils.NOTIFICATION_FREQUENCY_KEY, 30).toLong()) } else { - btnNotific.background = getDrawable(R.drawable.ic_bell_disabled) + btnNotific.setImageDrawable(getDrawable(R.drawable.ic_bell_disabled)) } @@ -77,11 +77,11 @@ class MainActivity : AppCompatActivity() { notificStatus = !notificStatus sharedPref.edit().putBoolean(AppUtils.NOTIFICATION_STATUS_KEY, notificStatus).apply() if (notificStatus) { - btnNotific.background = getDrawable(R.drawable.ic_bell) + btnNotific.setImageDrawable(getDrawable(R.drawable.ic_bell)) Snackbar.make(it, "Notification Enabled..", Snackbar.LENGTH_SHORT).show() alarm.setAlarm(this, sharedPref.getInt(AppUtils.NOTIFICATION_FREQUENCY_KEY, 30).toLong()) } else { - btnNotific.background = getDrawable(R.drawable.ic_bell_disabled) + btnNotific.setImageDrawable(getDrawable(R.drawable.ic_bell_disabled)) Snackbar.make(it, "Notification Disabled..", Snackbar.LENGTH_SHORT).show() alarm.cancelAlarm(this) } diff --git a/app/src/main/res/drawable/ic_bell.png b/app/src/main/res/drawable/ic_bell.png deleted file mode 100644 index c558a90..0000000 Binary files a/app/src/main/res/drawable/ic_bell.png and /dev/null differ diff --git a/app/src/main/res/drawable/ic_bell.xml b/app/src/main/res/drawable/ic_bell.xml new file mode 100644 index 0000000..56ef035 --- /dev/null +++ b/app/src/main/res/drawable/ic_bell.xml @@ -0,0 +1,10 @@ + + + + + + + diff --git a/app/src/main/res/drawable/ic_bell_disabled.png b/app/src/main/res/drawable/ic_bell_disabled.png deleted file mode 100644 index 352834e..0000000 Binary files a/app/src/main/res/drawable/ic_bell_disabled.png and /dev/null differ diff --git a/app/src/main/res/drawable/ic_bell_disabled.xml b/app/src/main/res/drawable/ic_bell_disabled.xml new file mode 100644 index 0000000..0796b4e --- /dev/null +++ b/app/src/main/res/drawable/ic_bell_disabled.xml @@ -0,0 +1,8 @@ + + + + diff --git a/app/src/main/res/drawable/ic_settings.xml b/app/src/main/res/drawable/ic_settings.xml new file mode 100644 index 0000000..f755074 --- /dev/null +++ b/app/src/main/res/drawable/ic_settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/app/src/main/res/drawable/ic_stats.xml b/app/src/main/res/drawable/ic_stats.xml new file mode 100644 index 0000000..0597c50 --- /dev/null +++ b/app/src/main/res/drawable/ic_stats.xml @@ -0,0 +1,7 @@ + + + + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index a8c4030..84d136a 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -9,19 +9,33 @@ android:background="@drawable/main_bg_gradiant" tools:context=".MainActivity"> + android:layout_width="50dp" + android:layout_height="50dp" + android:padding="8dp" + android:background="?attr/selectableItemBackground" + android:src="@drawable/ic_settings" + android:id="@+id/btnMenu" + android:layout_marginTop="16dp" + app:layout_constraintTop_toTopOf="parent" + android:layout_marginEnd="8dp" app:layout_constraintEnd_toEndOf="parent"/> + android:layout_marginTop="16dp" + app:layout_constraintTop_toTopOf="parent" app:layout_constraintEnd_toStartOf="@+id/btnStats" + android:layout_marginEnd="4dp"/> + +