Olauncher icon indicating copy to clipboard operation
Olauncher copied to clipboard

[Feature Request] - Menu Key open app list

Open CreativeCodeCat opened this issue 1 year ago • 3 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)
          }
      }
  }

CreativeCodeCat avatar May 01 '24 07:05 CreativeCodeCat

Have you tested this on a feature phone?

tanujnotes avatar May 01 '24 08:05 tanujnotes

I sure have as someone had requested it on mLauncher which is a fork of Olauncher.

Also this can be tested using adb command in the terminal too.

CreativeCodeCat avatar May 01 '24 09:05 CreativeCodeCat

Thanks. I'll check it out.

tanujnotes avatar May 05 '24 07:05 tanujnotes