Scrolling without scrolling inside the sliding drawer

I have a framelayout layout and inside this there are 2 child views, a Sliding Box and a listview. Inside the sliding drawer I need a scroll view, but when I start it, the scroll cannot be scrolled. Does anyone have the same problem?

This is my layout, when I delete linearlayout inside scrollview, it can be started normally. Who can help?

<?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <ListView android:id="@+id/myListView" android:layout_width="wrap_content" android:layout_height="wrap_content" > </ListView> <SlidingDrawer android:id="@+id/slidedrawer" android:layout_width="fill_parent" android:layout_height="fill_parent" android:allowSingleTap="false" android:content="@+id/konten" android:handle="@+id/slider_handle" > <LinearLayout android:id="@+id/slider_handle" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/slider_song" android:paddingLeft="40dip" android:paddingTop="10dip" android:scaleType="centerCrop" > <TextView android:id="@+id/song_title_animation" style="@style/CodeFont" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="marquee" android:focusable="true" android:focusableInTouchMode="true" android:marqueeRepeatLimit="marquee_forever" android:scrollHorizontally="true" android:singleLine="true" android:text="No song played" /> </LinearLayout> <!-- <include --> <!-- android:id="@+id/konten" --> <!-- layout="@layout/playback" /> --> <LinearLayout android:id="@+id/konten" android:layout_width="fill_parent" android:layout_height="match_parent" android:orientation="vertical" > <LinearLayout android:id="@+id/album_art" android:layout_width="match_parent" android:layout_height="250dip" android:background="@drawable/albumart" android:gravity="bottom" android:orientation="vertical" > <SeekBar android:id="@+id/seekbar_lagu" android:layout_width="fill_parent" android:layout_height="wrap_content" android:max="20" android:progress="0" android:progressDrawable="@drawable/seekbar_progress" android:secondaryProgress="0" android:thumb="@drawable/seek_thumb" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="0dip" android:background="@drawable/play_background" android:gravity="center_horizontal" android:paddingTop="5dip" > <Button android:layout_width="50dip" android:layout_height="50dip" android:id="@+id/button_backward" android:background="@drawable/button_backward" /> <Button android:layout_width="50dip" android:layout_height="50dip" android:id="@+id/button_stop" android:background="@drawable/button_stop" /> <Button android:layout_width="50dip" android:layout_height="50dip" android:id="@+id/button_play" android:background="@drawable/button_play" /> <Button android:layout_width="50dip" android:layout_height="50dip" android:id="@+id/button_forward" android:background="@drawable/button_forward" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/title_background" > <TextView android:id="@+id/song_title" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="song title" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/title_background" > <TextView android:id="@+id/song_artist" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="song artist" /> </LinearLayout> </LinearLayout> </SlidingDrawer> </FrameLayout> 
+4
source share
1 answer

save scrollView inside slidingrawer and save all content in one linear layout. as below

 <SlidingDrawer android:id="@+id/drawer" android:layout_width="match_parent" android:layout_height="match_parent" android:handle="@+id/handle" android:content="@+id/content"> <Button android:id="@id/handle" android:layout_width="88dip" android:layout_height="44dip" android:background="@drawable/btn_blue" android:text="help" android:textColor="#ffffff"/> <ScrollView android:id="@id/content" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="vertical" android:layout_height="wrap_content" android:layout_width="fill_parent"> </LinearLayout> </ScrollView> </SlidingDrawer> 
+3
source

Source: https://habr.com/ru/post/1390379/


All Articles