2017-12-13 10 views
-2

こんにちは、私はAutoScrollViewPagerを配置し、horizo​​talの線形レイアウトの下に2つのボタンを積み重ねて、成功しないようにしようとしています...スクロールは線形レイアウトを隠しています。助け?相対レイアウトと直線の積み上げ

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    tools:context="com.htcursos.tucapp.LoginActivity" 
    android:background="#ff000000"> 

    <cn.trinea.android.view.autoscrollviewpager.AutoScrollViewPager 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:id="@+id/viewPager"> 

    </cn.trinea.android.view.autoscrollviewpager.AutoScrollViewPager> 

    <LinearLayout 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:id="@+id/doots" 
     android:layout_below="@+id/viewPager" 
     android:orientation="vertical" 
     android:gravity="center"> 


    <Button 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="Login" 
     android:textSize="16sp" 
     android:layout_alignParentBottom="true" 
     android:layout_alignParentRight="true" 
     android:layout_marginBottom="8dp" 
     android:id="@+id/login" 
     android:textColor="#fff" 
     android:background="@null"/> 

    <Button 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="Cadastrar" 
     android:textSize="16sp" 
     android:layout_alignParentBottom="true" 
     android:layout_alignParentLeft="true" 
     android:layout_marginBottom="8dp" 
     android:layout_marginLeft="20dp" 
     android:id="@+id/cadastrar" 
     android:textColor="#fff" 
     android:background="@null"/> 

    </LinearLayout> 

</RelativeLayout> 

プレビュー:enter image description here

答えて

0
<cn.trinea.android.view.autoscrollviewpager.AutoScrollViewPager 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:id="@+id/viewPager"> 

私は

EDIT

をwrap_contentするように設定し、自分の間違いは、あなたのAutoScrollViewPagerからあなたの高さがmatch_parentに設定されていることだと思います 申し訳ありません

+0

、 が、それはあなたが自動スクロール以下のLinearLayoutを取得しようとしている –

+0

を動作しませんでしたか? – Vince

+0

正確には、線形の内側に2つのボタンを入れたいと思います。ログインと登録 –

関連する問題