我希望我的图表占用100%的视图,我只想看看图表。我想删除那个空白。但我发现了这样的结果:Android:LinearLayout获取视图的100%
这是我XMl
布局:
<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.example.debitdistance.WifiChartsRealTime$PlaceholderFragment" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="@+id/chart" >
</LinearLayout>
</RelativeLayout>
从你的RelativeLayout中删除所有那些'android:paddingXYZ'属性 –