【发布时间】:2015-03-06 08:20:58
【问题描述】:
我正在使用 ADT-1 开发工具包修改现有应用程序以在 Android TV 上运行。
在 Android TV 上安装时,原始应用程序布局的外边缘被剪裁。
然后我跟着this link,为布局的根设置过扫描。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/base_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_marginTop="27dp"
android:layout_marginLeft="48dp"
android:layout_marginRight="48dp"
android:layout_marginBottom="27dp" >
.....
</LinearLayout>
但结果如下所示。
布局的根是margin这么多,它没有填满屏幕(红色矩形区域)。
根布局完全填充屏幕的过扫描边距像素是多少?提前致谢。
【问题讨论】:
-
我不确定你的问题是什么。通过将边距设置为根布局,您显然会获得更小的屏幕空间来显示您的内容。你想获得什么?
-
如果我不设置边距,外边缘布局被剪裁。我想知道将边距设置为根布局的确切像素是多少,以便我的内容可以填满屏幕而不会被剪裁。
标签: android android-layout android-5.0-lollipop android-tv