移除表面视图周围的白色边框



我在相对布局中有一个表面视图。我想让surfaceview覆盖整个屏幕,但它周围有一个白色边框。如何删除边框

  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
   android:layout_height="match_parent"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  tools:context="com.paint.drawx.MainActivity$PlaceholderFragment" >
  <com.paint.drawx.ImageSurface
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" />
  </RelativeLayout>

删除RelativeLayout中的padding。填充设置告诉你的布局,它希望它的内容从布局的"边缘"被推入设定的数量。去掉它,它会告诉你的布局它希望内容与边框齐平

最新更新