ksoichiro / Android-ObservableScrollView

Android library to observe scroll events on scrollable views.
http://ksoichiro.github.io/Android-ObservableScrollView/
Apache License 2.0
9.65k stars 2.06k forks source link

Use Button inside ObservableScrollView in FillGap2ScrollViewActivity #266

Open joynamu opened 7 years ago

joynamu commented 7 years ago

Actually, I am using ObservalableScrollView to moving image When i put buttons inside ObservalableScrollView. And I can't click buttons, when scrolling up in the specific area such as image

Layout would be the below

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:clipChildren="false">

<ImageView
    android:id="@+id/image"
    android:layout_width="match_parent"
    android:layout_height="@dimen/flexible_space_image_height"
    android:scaleType="centerCrop"
    android:src="@drawable/cartune_rectangle_without_border_transparent" />

    <com.joynamu.cartune.common.ext.Observable.ObservableScrollView
        android:id="@+id/scroll"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="@dimen/flexible_space_image_height"
        android:scrollbars="none">

       <LinearLayout
           android:layout_width="match_parent"
           android:layout_height="wrap_content"
           android:orientation="vertical">

          <Button
               android:layout_width="match_parent"
               android:layout_height="50dp"
               android:text="test1"/>     

          <Button
               android:layout_width="match_parent"
               android:layout_height="50dp"
               android:text="test2"/>   

          <Button
               android:layout_width="match_parent"
               android:layout_height="50dp"
               android:text="test3"/>   

               .........             

       </LinearLayout

  </com.joynamu.cartune.common.ext.Observable.ObservableScrollView>