第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

垂直 recyclerView 和 Horizo??ntal recyclerview 一起滾動

垂直 recyclerView 和 Horizo??ntal recyclerview 一起滾動

阿晨1998 2022-06-04 17:15:00
在我的項目中,Recyclerview如果我(垂直)滾動屏幕,我想要兩個(第一個水平和第二個垂直)我希望它們兩個一起滾動。我嘗試了一些方法但沒有奏效請幫助我我的片段 xml<?xml version="1.0" encoding="utf-8"?><ScrollView 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=".Fragments.Tabs.FarsiF.FarsiBadr">    <LinearLayout        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:orientation="vertical">        <android.support.v7.widget.RecyclerView            android:id="@+id/recyclerview_id_Horizental_badr_farsi"            android:layout_width="match_parent"            android:layout_height="wrap_content"></android.support.v7.widget.RecyclerView>        <android.support.v7.widget.RecyclerView            android:id="@+id/recyclerview_id_vertical_badr_farsi"            android:layout_width="match_parent"            android:layout_height="match_parent">        </android.support.v7.widget.RecyclerView>    </LinearLayout></ScrollView>我的片段類public class FarsiBadr extends Fragment {    RecyclerViewAdapter myAdapter;    List<Items> lstItems;    public FarsiBadr() {        // Required empty public constructor    }    @Override    public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {        // Inflate the layout for this fragment        View view = inflater.inflate(R.layout.fragment_farsi_badr, container, false);        lstItems = new ArrayList<>();    }}
查看完整描述

1 回答

?
慕容森

TA貢獻1853條經(jīng)驗 獲得超18個贊

只要改成scrollview你<android.support.v4.widget.NestedScrollView 就可以解決你的問題


嘗試這個


<?xml version="1.0" encoding="utf-8"?>

<android.support.v4.widget.NestedScrollView 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=".multi.TabFragment">


    <LinearLayout

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:orientation="vertical">


        <EditText

            android:id="@+id/searchintabbadrkurdi"

            android:layout_width="match_parent"

            android:layout_height="wrap_content" />

                <android.support.v7.widget.RecyclerView

                    android:id="@+id/recyclerview_id_badr_kurdish_hor"

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content">


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

        <android.support.v7.widget.RecyclerView

                    android:id="@+id/recyclerview_id_badr_kurdish"

                    android:layout_width="match_parent"

                    android:layout_height="match_parent">


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


    </LinearLayout>


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


查看完整回答
反對 回復 2022-06-04
  • 1 回答
  • 0 關(guān)注
  • 106 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號