我希望我的圖表佔用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'屬性 –