2017-08-07 11 views
0

レイアウトを作成しました。しかし、底に白いスペースが残っています。相対レイアウトの内容を画面の最下部に表示したい。すなわちシークバーとボタンを底部に有する。レイアウトが画面に合わない

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout 
xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:layout_width="match_parent" 
android:layout_height="wrap_content" 
android:orientation="vertical" 
android:background="@drawable/images"> 

<com.example.acer.myapplication.ZoomView 
    android:id="@+id/iop" 
    android:layout_width="match_parent" 
    android:layout_height="0dp" 
    android:layout_weight="1" 
    android:gravity="center"/> 

<RelativeLayout 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content"> 
    <SeekBar 
     android:id="@+id/seekBar7" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" /> 
    <Button 
     android:id="@+id/button61" 
     android:layout_width="50dp" 
     android:layout_height="50dp" 
     android:layout_below="@id/seekBar7" 
     android:layout_centerInParent="true" 
     android:background="@drawable/play" /> 
</RelativeLayout> 
</LinearLayout> 

私は下部の空白を相対レイアウトの内容に置き換える必要があります。 私は画像

答えて

2

使用にこのコードをアップロードしています

代わりにあなたがmatch_parentを置くべきwrap_contentの
<?xml version="1.0" encoding="utf-8"?> 
<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="wrap_content" 
android:orientation="vertical" 
android:background="@drawable/images"> 

<com.example.acer.myapplication.ZoomView 
    android:id="@+id/iop" 
    android:layout_width="match_parent" 
    android:layout_height="0dp" 
    android:layout_weight="1" 
    android:gravity="center"/> 

<RelativeLayout 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
android:layout_alignParentBottom="true" 
> 
    <SeekBar 
     android:id="@+id/seekBar7" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" /> 
    <Button 
     android:id="@+id/button61" 
     android:layout_width="50dp" 
     android:layout_height="50dp" 
     android:layout_below="@id/seekBar7" 
     android:layout_centerInParent="true" 
     android:background="@drawable/play" /> 
</RelativeLayout> 
</RelativeLayout> 
+0

あなたのために働いたら私の答えにチェックを入れてください。 –

+0

それは働いた...ありがとう – Devk

+0

私の答えをチェックしてください –

関連する問題