android中的图像滑块需要它可以上下滚动

时间:2015-08-23 19:08:23

标签: android

我想使用
在我的应用程序中添加图像滑块  (https://github.com/daimajia/AndroidImageSlider)但我希望它可以滚动。我的意思是我在这个滑块下方有一个回收站视图,我希望当用户滚动列表看到列表项图像滑块也应该按照用户的意愿上下滚动..我已经粘贴了我的xml,请告诉我该怎么办

这是图片网址,可以看到该应用的屏幕截图。 http://picpaste.com/U-04sZEbuG.png

 <?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="match_parent"
      android:orientation="vertical">

       <include
        android:id="@+id/app_bar"
          layout="@layout/app_bar"/>

           <android.support.v4.widget.DrawerLayout
           xmlns:app="http://schemas.android.com/apk/res-auto"
          android:id="@+id/drawer_layout"
          android:layout_width="match_parent"
         android:layout_height="match_parent">
        <RelativeLayout
           android:layout_width="match_parent"
            android:layout_height="match_parent"
          android:background="#ffffff">
              <LinearLayout
                android:id="@+id/TextLinear"
                android:layout_width="match_parent"
                android:layout_height="50dp"
                android:background="@color/navbarblue"
                android:gravity="center">
           <TextView
               android:layout_width="match_parent"
               android:layout_height="match_parent"
               android:textAppearance="?android:attr/textAppearanceLarge"
               android:text="VIEW BOOKS BY YOUR BRANCH"
               android:id="@+id/textView"
               android:textColor="#ffffff"
               android:layout_gravity="center_horizontal|top"
               android:gravity="center"/>
            </LinearLayout>

             <com.daimajia.slider.library.SliderLayout
                android:id="@+id/slider"
                android:layout_width="match_parent"
                android:layout_height="200dp"
                android:layout_below="@+id/TextLinear" />
            <android.support.v7.widget.RecyclerView
                android:layout_below="@id/slider"
                android:id="@+id/MainList"
               android:layout_width="match_parent"
              android:layout_height="match_parent">

            </android.support.v7.widget.RecyclerView>
         </RelativeLayout>

           <fragment
             android:id="@+id/fragment_navigation_drawer"
              android:layout_width="@dimen/nav_drawer_width"
                 android:layout_height="match_parent"
                  android:layout_gravity="start"
                   app:layout="@layout/fragment_navigation_drawer"
               android:name="com.example.sky.learn.NavigationDrawerFragment"
                tools:layout="@layout/fragment_navigation_drawer" />

                </android.support.v4.widget.DrawerLayout>




          </LinearLayout>

0 个答案:

没有答案