0

我正在尝试开发一个在主要活动中具有网格视图的 android 应用程序,该应用程序将在常规屏幕和旧 CRT 电视上运行..(例如 600X500 像素)..

当我尝试在具有这种分辨率的模拟器上运行它时,它似乎很好..在电脑屏幕上也可以,但在电视上它只需要屏幕顶部 2/3 的优势,并且图标被剪切和滚动.. 在此处输入图像描述

这是我在电视屏幕上看到的插图

相关布局文件:

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#fffcfafa"
android:gravity="center_horizontal"
>

<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="auto_fit"
android:verticalSpacing="20dp"
android:horizontalSpacing="20dp"
android:stretchMode="columnWidth"
android:gravity="center"
/>

显现:

    <supports-screens android:resizeable="false"
    android:smallScreens="true" android:normalScreens="true"
    android:largeScreens="true" android:anyDensity="true" />
4

1 回答 1

1

更改可从此调整大小的支持屏幕

android:resizeable="false"

对此

android:resizeable="true"

希望能帮助到你

于 2013-03-04T08:09:26.447 回答