Determine if action bar is split

前端 未结 3 713
-上瘾入骨i
-上瘾入骨i 2021-01-11 23:31

I have a MapView with an action bar powered by ActionBarSherlock. The action bar is both split (on \"narrow\" screens) and overlayed / semi-transparent (android

3条回答
  •  广开言路
    2021-01-11 23:55

    If you are using ActionBarSherlock you can look for the boolean value abs__split_action_bar_is_narrow

    Just create some static method where you can do

    return ResourcesCompat.getResources_getBoolean(context,
                                R.bool.abs__split_action_bar_is_narrow);
    

    you need to use the ResourcesCompat (from actionbarsherlock) class because pre 3.2 cant read folders with metrics (like values-sw480)

提交回复
热议问题