Android AlertDialog:上下文操作栏显示在状态栏后面

Android AlertDialog:上下文操作栏显示在状态栏后面,android,android-alertdialog,contextual-action-bar,android-appcompat,Android,Android Alertdialog,Contextual Action Bar,Android Appcompat,长按添加到AlertDialog的EditText通常会显示上下文操作栏,但使用AppCompat时,上下文操作栏会显示在状态栏后面。上下文操作栏也不可单击 当直接从活动显示AlertDialog时,也可以看到相同的行为 Android版本测试:4.4、5.0、5.1 AppCompat版本:22.1.1和22.1.0 源代码(Gradle模块): 我尝试添加false,但这并不能解决问题 如何使上下文操作栏看起来正常 MainActivity.java public class MainAc

长按添加到AlertDialog的EditText通常会显示上下文操作栏,但使用AppCompat时,上下文操作栏会显示在状态栏后面。上下文操作栏也不可单击

当直接从活动显示AlertDialog时,也可以看到相同的行为

Android版本测试:4.4、5.0、5.1
AppCompat版本:22.1.1和22.1.0

源代码(Gradle模块):

我尝试添加
false
,但这并不能解决问题

如何使上下文操作栏看起来正常

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>

@style/Theme.Test.AlertDialog
错误的

正如他所说的那样,罗尔夫创造了。该期已作为本期的副本结束。问题170105表明该问题已在内部解决,并将出现在AppCompat库的未来版本中。没有显示发布时间。

如果不编辑
alertDialogTheme
?相同的结果;)起初我甚至没有触及主题。你的布局是什么?这是一个新项目吗?全新项目,请参阅下载以获取完整的源代码。活动布局只是一个带有按钮的RelativeLayout而已。我也在考虑将此报告为bug。我将包括在这篇文章的完整来源,只要我有权访问我的电脑。