Skip to content

Commit 912506b

Browse files
committed
Comment darkmode code
1 parent 16aa947 commit 912506b

4 files changed

Lines changed: 13 additions & 23 deletions

File tree

app/src/main/java/com/example/mynotes/ui/fragments/NotesFragment.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ class NotesFragment : Fragment() {
7272

7373
return when (item.itemId) {
7474
R.id.mode -> {
75-
val mode =
76-
if ((resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_NO) {
77-
AppCompatDelegate.MODE_NIGHT_YES
78-
} else {
79-
AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY
80-
}
81-
82-
// Change UI Mode
83-
AppCompatDelegate.setDefaultNightMode(mode)
75+
// val mode =
76+
// if ((resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_NO) {
77+
// AppCompatDelegate.MODE_NIGHT_YES
78+
// } else {
79+
// AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY
80+
// }
81+
//
82+
// // Change UI Mode
83+
// AppCompatDelegate.setDefaultNightMode(mode)
8484
true
8585
}
8686

app/src/main/java/com/example/mynotes/ui/fragments/UpdateFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class UpdateFragment : Fragment() {
6767
}
6868

6969
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
70-
return inflater.inflate(R.menu.main_menu, menu)
70+
return inflater.inflate(R.menu.update_menu, menu)
7171

7272
}
7373

app/src/main/res/drawable/ic_save.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

app/src/main/res/menu/update_menu.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
xmlns:app="http://schemas.android.com/apk/res-auto">
44

55
<item
6-
android:id="@+id/update"
7-
android:icon="@drawable/ic_save"
8-
android:title="Update"
6+
android:id="@+id/delete"
7+
android:icon="@drawable/ic_delete"
8+
android:title="Delete"
99
app:showAsAction="ifRoom" />
1010

1111
</menu>

0 commit comments

Comments
 (0)