adding a More Apps From Us menu button

This commit is contained in:
tibbi 2022-12-12 16:10:22 +01:00
parent 404f9dc4cc
commit dde2c4de66
3 changed files with 7 additions and 1 deletions

View file

@ -125,6 +125,7 @@ class MainActivity : SimpleActivity() {
main_toolbar.setOnMenuItemClickListener { menuItem ->
when (menuItem.itemId) {
R.id.sort -> getViewPagerAdapter()?.showAlarmSortDialog()
R.id.more_apps_from_us -> launchMoreAppsFromUsIntent()
R.id.settings -> launchSettings()
R.id.about -> launchAbout()
else -> return@setOnMenuItemClickListener false
@ -136,6 +137,7 @@ class MainActivity : SimpleActivity() {
private fun refreshMenuItems() {
main_toolbar.menu.apply {
findItem(R.id.sort).isVisible = view_pager.currentItem == TAB_ALARM
findItem(R.id.more_apps_from_us).isVisible = !resources.getBoolean(R.bool.hide_google_relations)
}
}

View file

@ -6,6 +6,10 @@
android:icon="@drawable/ic_sort_vector"
android:title="@string/sort_by"
app:showAsAction="ifRoom" />
<item
android:id="@+id/more_apps_from_us"
android:title="@string/more_apps_from_us"
app:showAsAction="never" />
<item
android:id="@+id/settings"
android:icon="@drawable/ic_settings_cog_vector"

View file

@ -9,7 +9,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong