我是android studio的新手。当我在 android studio 中使用 new 时,我在预览中遇到渲染问题。
没有 View :
但是当我使用 View 时出现渲染问题:
我很困惑为什么会这样。请帮助我。
最佳答案
在 xml 中使用 View
而不是 view
:
<View
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
对于 View 的高度和宽度也使用 match_parent
而不是 fill_parent
因为 fill_parent
常量从 API 级别 8 开始被弃用并被替换为match_parent
。
有关更多信息,请参阅此帖子:
What is the difference between match_parent and fill_parent?
关于android - 在 android studio 中使用 View 时出现渲染问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27863519/