0
即时垂直结合试图使用2点回收的观点在1个线性布局.. 作为回收视图将产生其自己的滚动,但其他数据保留在屏幕上完整..所以如何合并所有进入1个滚动enter code here
如何将多个回收视图带有滚动在1个线性布局
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/grey"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:weightSum="100">
<LinearLayout
android:id="@+id/sliderhome"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="70">
<com.daimajia.slider.library.SliderLayout
android:id="@+id/slider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|enterAlways"
/>
<com.daimajia.slider.library.Indicators.PagerIndicator
android:id="@+id/custom_indicator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
/>
</LinearLayout>
<LinearLayout
android:layout_weight="30"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout 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="vlabs.chorbazaar.HomeFragment"
android:background="@color/white"
android:orientation="horizontal">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</FrameLayout>
</LinearLayout>
</LinearLayout>
我尝试让我的滑块和回收以滚动为一体的...但滑块是停留在一个固定的地方,同时回收视图scorlls像往常一样
即时通讯使用片段..因此,假设上面的代码是我的家庭碎片..我改变了我的家庭碎片xml,如你所说..为Mypageadapter ..做了一个类.. now ViewPager pager =(ViewPager)findViewById (R.id.viewPager); pager.setAdapter(new MyPagerAdapter(getSupportFragmentManager(),arrayList)); 这段代码会去吗?在我的主要活动中,我根据nav –
中的选择调用了所有片段,什么是阵列列表? –
arrayList中的数据发送分片ArrayList> arrayList = new ArrayList >(); ArrayList arrayFirst = new ArrayList <>(); arrayFirst.add(“one”); arrayFirst.add(“two”); ArrayList arraySound = new ArrayList <>(); arraySound.add(“three”); arraySound.add(“four”); arrayList.add(arrayFirst); arrayList.add(arraySound); –