GridView 未拉伸到所有屏幕
我有一个 GridView ,它连续显示 2 个图像。我有 SGS 和 Galaxy 5 来测试该应用程序。不幸的是,它的扩展性不好。我更改了 XML 中的值属性以填充 SGS 的屏幕,当我在 Galaxy 5 中测试时,情况很糟糕,非常糟糕。我不知道该怎么办。 请尝试帮助我,GridView
是我启动其他活动的主要布局。 XML:
<?xml version="1.0" encoding="utf-8"?>
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:columnWidth="90dp"
android:numColumns="2"
android:verticalSpacing="20dp"
android:horizontalSpacing="20dp"
android:stretchMode="columnWidth"
android:gravity="center"
android:background="@drawable/background3"
/>
I have a GridView
that is showing 2 images on a row. I have an SGS and Galaxy 5 to test the app. Unfortunately, it's not well scaling. I change values attributes in XML to fill the screen of SGS and when i test in Galaxy 5 it's bad, very bad. I don't know what to do.
Please try to help me, the GridView
is my main layout that launches other activities.
XML:
<?xml version="1.0" encoding="utf-8"?>
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:columnWidth="90dp"
android:numColumns="2"
android:verticalSpacing="20dp"
android:horizontalSpacing="20dp"
android:stretchMode="columnWidth"
android:gravity="center"
android:background="@drawable/background3"
/>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您尝试过
android:scaleType="fitXY"
吗?http://developer.android.com/reference/android/widget/ImageView .ScaleType.html
Did you tried
android:scaleType="fitXY"
?http://developer.android.com/reference/android/widget/ImageView.ScaleType.html