[英]What's going on with layout rendering on the Galaxy Nexus?
A very simple project. 一个非常简单的项目。 Here's the Activity subclass: 这是Activity子类:
public class Home extends Activity
{
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
Here's the main.xml layout: 这是main.xml布局:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Hello World"
android:textSize="100sp"
/>
</LinearLayout>
I'd expect this to render as some (very large) text on a plan background, but what actually renders on the Galaxy Nexux (Android 4.0.2) is shown in the screenshot. 我希望它可以在计划背景上呈现为某些(非常大的)文本,但是屏幕快照中显示了在Galaxy Nexux(Android 4.0.2)上实际呈现的内容。 It renders fine on the other devices I tested. 它在我测试过的其他设备上效果很好。
Am I doing something strange, or is this a bug in the GN Android version? 我是在做奇怪的事情,还是GN Android版本中的错误?
尝试将其添加到清单文件中:
<supports-screens android:largeScreens="true" android:xlargeScreens="true" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.