我知道这个问题已经在 here 之前提出了,但我已经尝试了给出的解决方案,但我没有像设备那样获得完全相同样式的预览外观。
我在 Android 版本 4.2.2 上使用 Samsung Galaxy S3 mini 作为我的设备调试,它完全没有修改,但我不明白为什么,即使我改变了主题,设备看起来仍然一样(与当然在 Activity 中进行了更改)
Activity 的代码就像任何新的空白 Activity 一样
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity">
<TextView android:text="@string/hello_world" android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
预览图是这样的
但设备看起来像这样
PS:我正在学习android,所以我可能会对答案感到困惑
最佳答案
关于安卓工作室 : Activity preview does not show title bar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30362607/