flip "Go to favorite" and "Sort"

This commit is contained in:
tibbi 2017-07-12 20:29:57 +02:00
parent 1dcfb9e817
commit 035d112c1d
3 changed files with 8 additions and 7 deletions

View File

@ -32,7 +32,7 @@ android {
}
dependencies {
compile 'com.simplemobiletools:commons:2.22.4'
compile 'com.simplemobiletools:commons:2.22.7'
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}

View File

@ -123,10 +123,10 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br
override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
R.id.go_home -> goHome()
R.id.go_to_favorite -> goToFavorite()
R.id.sort -> showSortingDialog()
R.id.add_favorite -> addFavorite()
R.id.remove_favorite -> removeFavorite()
R.id.go_to_favorite -> goToFavorite()
R.id.set_as_home -> setAsHome()
R.id.temporarily_show_hidden -> temporarilyShowHidden()
R.id.settings -> startActivity(Intent(this, SettingsActivity::class.java))
@ -173,7 +173,7 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br
}
}
RadioGroupDialog(this, items, currFavoriteIndex) {
RadioGroupDialog(this, items, currFavoriteIndex, R.string.go_to_favorite) {
openPath(it.toString())
}
}

View File

@ -6,6 +6,11 @@
android:icon="@drawable/ic_home"
android:title="@string/go_to_home_folder"
app:showAsAction="ifRoom"/>
<item
android:id="@+id/go_to_favorite"
android:icon="@drawable/ic_open"
android:title="@string/go_to_favorite"
app:showAsAction="ifRoom"/>
<item
android:id="@+id/sort"
android:icon="@drawable/ic_sort"
@ -21,10 +26,6 @@
android:icon="@drawable/ic_star_on"
android:title="@string/remove_from_favorites"
app:showAsAction="ifRoom"/>
<item
android:id="@+id/go_to_favorite"
android:title="@string/go_to_favorite"
app:showAsAction="never"/>
<item
android:id="@+id/set_as_home"
android:title="@string/set_as_home_folder"