1

I'm testing my app on various devices and I find out that on one phone (Kruger&Matz Muve) there is no three dots button on Action bar. I have some settings in there so it have to be there. I would nice if someone could help me with this problem.

KamCho
  • 131
  • 2
  • 10

2 Answers2

1

The overflow icon only appears on phones that have no menu hardware keys

How to force action bar overflow icon to show

Community
  • 1
  • 1
Max77
  • 1,466
  • 13
  • 19
1

If you want to show the three dots, irrespective of device menu button then you can call this method in your Application class onCreate method-

private void makeActionOverflowMenuShown() {
//devices with hardware menu button (e.g. Samsung Note) don't show action overflow menu
try {
    ViewConfiguration config = ViewConfiguration.get(this);
    Field menuKeyField = ViewConfiguration.class.getDeclaredField("sHasPermanentMenuKey");
    if (menuKeyField != null) {
        menuKeyField.setAccessible(true);
        menuKeyField.setBoolean(config, false);
    }
} catch (Exception e) {
    Log.d(TAG, e.getLocalizedMessage());
}
}

For more info Android action bar not showing overflow

Hope this will helps you.

Community
  • 1
  • 1
Nagaraju V
  • 2,739
  • 1
  • 14
  • 19