tanujnotes / Olauncher

Minimal AF Launcher for Android. Reduce your screen time. Daily wallpapers.

Home Page:https://play.google.com/store/apps/details?id=app.olauncher

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] - Menu Key open app list

HeCodes2Much opened this issue · comments

Something like this added to the MainActivity. maybe you could do a better way who knows but just an option for feature phone users.

override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
      return when (keyCode) {
          KeyEvent.KEYCODE_MENU -> {
              when (navController.currentDestination?.id) {
                  R.id.mainFragment -> {
                      Navigation.findNavController(this, R.id.nav_host_fragment)
                          .navigate(R.id.action_mainFragment_to_appListFragment)
                      true
                  }

                  else -> {
                      false
                  }
              }
          }
          else -> {
              super.onKeyDown(keyCode, event)
          }
      }
  }

Have you tested this on a feature phone?

Thanks. I'll check it out.