Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scroll view not scrolled inside of Sliding drawer

I have a layout of framelayout and inside of this there are 2 child view, Sliding drawer and listview. Inside of the sliding drawer I need a scroll view but when I run it scroll view can not be scrolled. Anyone has the same problem before ?

This is my layout, when I delete the linearlayout inside scrollview it can be run normally. Anyone 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>
like image 369
mrhands Avatar asked Oct 10 '22 00:10

mrhands


1 Answers

keep scrollView inside the slidedrawer and keep all the content in one linear layout. as shown 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>
like image 188
Muppidi Nikhil Avatar answered Oct 13 '22 10:10

Muppidi Nikhil