是否可以使用 Android Annotations api 设置自定义标题?以前我会打电话
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title_layout);
在 onCreate 方法中,但这在 @AfterViews 注解的方法中似乎不可能,因为它必须在设置 contentView 之前完成。有没有办法实现这个目标?
最佳答案
我使用的是 com.googlecode.androidannotations,androidannotations-api 版本 2.7.1。有更新的版本; org.androidannotations,androidannotations 版本 3.0.1,其中包含完美运行的 @CustomTitle 注释。
关于java - 带 Android 注释的自定义标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25615690/