appcompat-v7 v23.0.0 statusbar color black when in ActionMode

后端 未结 3 1883
误落风尘
误落风尘 2020-12-15 01:46

UPDATE

Same issue present in the latest Gmail app. I still don\'t understand why would Google make such unpleasant UI change. Obsessive in me goes cr

3条回答
  •  独厮守ぢ
    2020-12-15 02:05

    In case only the color is the issue, you can change it. Only to a fixed color resource.

    @color/primary_dark
    

    Obvious ?colorPrimaryDark will not work, not even on API 21.


    The view responsible for the black status bar background is stored in AppCompatDelegateImplV7.mStatusGuard. You can get the delegate by calling getDelegate() from your activity and access mStatusGuard field by reflection. After starting the action mode you can get a reference to this view and customize it however you like.

    This was found in AppCompat 24.1.1.

提交回复
热议问题