mardi 27 juin 2017

getting the "pointer" to NavigationBarView.java by reflection

I am using an old phone and trying to change few things programatically on the navigation bar. I narrowed down to the class that handles the navigation bar which is below.

http://ift.tt/2sP1ov3

the object seems to be declared here:

http://ift.tt/2sk9rwA

line 238

private NavigationBarView mNavigationBarView = null;

Is there a way to get the pointer to this object programatically? The only thing I can find is code to get the bigger container like when you hide the navigation bar programatically.

        View decorView = getWindow().getDecorView();
        int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
        decorView.setSystemUiVisibility(uiOptions);

yet, this is not enough. I want to drill down to the navbar drawables.

any clues are greatly appreciated.

thank you.





Aucun commentaire:

Enregistrer un commentaire