我在不同屏幕尺寸上显示我的 View 时遇到问题。
我的附加 View 在 3.2 英寸屏幕上不完全可见,但在 3.7 英寸屏幕上可以。我已经在图像本身中描述了 sml 内容。请提出解决方案。
通常情况下,多屏幕的理想处理方式是什么? android 是否针对不同的屏幕尺寸自动调整它?
最佳答案
让你的 linearLayout
高度 fillparent
:
android:layout_height="fill_parent"
当然,您的 ScrollView 必须具有相对高度。
但是……
接下来我会这样做:
RelativeLayout
-scrollview
-LinearLayout (with button)
然后首先在您的 xml 中放入您的 linearLayout,宽度固定高度,然后在 scrollView 中制作 android:layout_below="@+id/LinearLayoutId"
。在那之后把
android:layout_height="fill_parent"
在 scrollView 中,最后放置 LinearLayout android:layout_alignParentBottom="true"
关于android - 为多个屏幕android创建我的 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7778082/