Invisible ActionMode item icons in Theme.Sherlock.Light.DarkActionBar

前端 未结 8 2476
一生所求
一生所求 2021-02-13 09:47

When using Theme.Sherlock.Light.DarkActionBar (or Theme.Holo.Light.DarkActionBar, doesn\'t make a difference), the ActionMode (or \"contextual ActionB

8条回答
  •  旧时难觅i
    2021-02-13 10:13

    I tried abovementioned solutions, the only one that worked for me (I have app targeted for API 7, with AppCompat 21.0.3) is to set the dialog style to R.style.Theme_AppCompat. Yes, the stupid dialog is now black. This issue is also present in AppCompat 22.

        final Context themedContext = new ContextThemeWrapper(activity, R.style.Theme_AppCompat);
        builder = new AlertDialog.Builder(themedContext);
        contents = ((LayoutInflater) themedContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.tag_editor, null);
        builder.setView(contents);
    

提交回复
热议问题