注意到Android6.0的程序默认的主题描述是这样的:
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
生成的程序配置文件里用的正是AppTheme这个继承自AppBaseTheme的主题。
我用魅族手机作调试的时候发现,popwindow组件会把魅族的SmartBar覆盖,返回键也被覆盖。
解决办法:
让AppTheme直接继承自android:Theme.Light主题就好了。