android - AlertDialog: contextual ActionBar appears behind status-bar -


long pressing edittext added alertdialog should show contextual actionbar, when using appcompat contextual actionbar appears behind status-bar. contextual actionbar not clickable.

the same behavior can seen when showing alertdialog directly activity.

android versions tested: 4.4, 5.0, 5.1
appcompat version: 22.1.1 , 22.1.0

source code (gradle module): google drive

i tried adding <item name="android:windowfullscreen">false</item> not fix problem.

what can make contextual actionbar appear normal?

actionmode shown behind status-bar

mainactivity.java

public class mainactivity extends appcompatactivity implements view.onclicklistener {      @override     protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.activity_main);         findviewbyid(r.id.button).setonclicklistener(this);     }      @override     public void onclick(view view) {         edittext customview = new edittext(this);         customview.settext("select me");          alertdialog.builder test = new alertdialog.builder(this);         test.setview(customview);         test.setpositivebutton("close", null);         test.settitle("actionmode test");         test.show();     } } 

styles.xml

<resources>      <style name="apptheme" parent="theme.appcompat.light.darkactionbar">         <item name="alertdialogtheme">@style/theme.test.alertdialog</item>     </style>      <style name="theme.test.alertdialog" parent="@style/theme.appcompat.light.dialog.alert">         <!-- removing android:windowfullscreen yields same result -->         <item name="android:windowfullscreen">false</item>     </style>  </resources> 

as said would, rolf created aosp issue 170658. issue closed duplicate of 170105. issue 170105 indicates problem has been fixed internally , appear in future release of appcompat library. no indication of when release might occur.


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -