Reputation: 723
I would like that my chart takes 100% of the view, I just want to see the chart. I would like to remove that blank. But I'm getting this result:
And this is my XMl
layout :
<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>
Upvotes: 1
Views: 343
Reputation: 19949
Remove the paddings from RelativeLayout
:
<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"
tools:context="com.example.debitdistance.WifiChartsRealTime$PlaceholderFragment" >
...
</RelativeLayout>
These are the reason of not 100% filling the screen.
Upvotes: 2
Reputation: 12512
The containing RelativeLayout declares padding. set all padding values to 0dp to remove "the blank".
Upvotes: 2
Reputation: 4868
Remove these lines:
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
or change the value of activity_horizontal_margin
and activity_vertical_margin
to 0dp
Upvotes: 2