File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
app/src/main/java/com/d4rk/androidtutorials/java/ui/components/navigation Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 11package com .d4rk .androidtutorials .java .ui .components .navigation ;
22
3+ import android .annotation .SuppressLint ;
34import android .os .Bundle ;
5+ import android .view .Menu ;
46import android .view .View ;
57
68import androidx .annotation .Nullable ;
79import androidx .appcompat .app .ActionBar ;
810import androidx .appcompat .app .AppCompatActivity ;
11+ import androidx .appcompat .view .menu .MenuBuilder ;
912
1013import com .d4rk .androidtutorials .java .R ;
1114import com .d4rk .androidtutorials .java .utils .EdgeToEdgeDelegate ;
@@ -25,6 +28,16 @@ protected void onPostCreate(@Nullable Bundle savedInstanceState) {
2528 }
2629 }
2730
31+ @ SuppressLint ("RestrictedApi" )
32+ @ Override
33+ public boolean onMenuOpened (int featureId , Menu menu ) {
34+ if (menu instanceof MenuBuilder ) {
35+ MenuBuilder menuBuilder = (MenuBuilder ) menu ;
36+ menuBuilder .setOptionalIconsVisible (true );
37+ }
38+ return super .onMenuOpened (featureId , menu );
39+ }
40+
2841 @ Override
2942 public boolean onSupportNavigateUp () {
3043 finish ();
You can’t perform that action at this time.
0 commit comments