Android-ObservableScrollView icon indicating copy to clipboard operation
Android-ObservableScrollView copied to clipboard

ImageView not clickable / feature request

Open MoonlightMultimedia opened this issue 11 years ago • 6 comments

Is it possible to change this library in a way so that ImageViews in FillGapActivity sample are clickable whilst maintaining the scrollable view?

MoonlightMultimedia avatar Feb 12 '15 22:02 MoonlightMultimedia

Lol. I came here to open request like this. I need to click the parallax header however ObservableScrollView gets all the click events because it is layout_height is match_parent.

If I put the Header view after the observablescrollview then they are no longer parallaxed.

gunhansancar avatar Feb 14 '15 08:02 gunhansancar

I have the same problem

mattia1692 avatar Feb 27 '15 16:02 mattia1692

After alot of fiddling around with the FillGapActivity layout XML I managed to set a ClickListener on one of the views resulting in the expected behaviour. So my advice is to give all views a valid id and then figure out which one works for you.

Be sure to test this in both portrait and landscape! Some views are transparent overlays so if you set a ClickListener on these it will disable scrollview scrolling.

MoonlightMultimedia avatar Feb 27 '15 16:02 MoonlightMultimedia

thank you so much, i need to put an include with a layout (Edit Text, buttons) instead of the image, i do that but my views are not clickable,

Il giorno 27/feb/2015, alle ore 17:53, RaymondBakkerMoonlightMultimedia [email protected] ha scritto:

After alot of fiddling around with the FillGapActivity layout XML I managed to set a ClickListener on one of the views resulting in the expected behaviour. So my advice is to give all views a valid id and then figure out which one works for you.

Be sure to test this in both portrait and landscape! Some views are transparent overlays so if you set a ClickListener on these it will disable scrollview scrolling.

— Reply to this email directly or view it on GitHub https://github.com/ksoichiro/Android-ObservableScrollView/issues/68#issuecomment-76427872.

mattia1692 avatar Feb 27 '15 17:02 mattia1692

hello,you can try this:

<FrameLayout
    android:id="@+id/root"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <FrameLayout
        android:id="@+id/pager_wrapper"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <android.support.v4.view.ViewPager
            android:id="@+id/pager"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    </FrameLayout>

    <com.google.samples.apps.iosched.ui.widget.SlidingTabLayout
        android:id="@+id/sliding_tabs"
        android:layout_width="match_parent"
        android:layout_height="@dimen/tab_height"
        android:background="@color/primaryDark" />

    <include
        android:id="@+id/pager_header"
        layout="@layout/view_pager_header"
        android:layout_width="match_parent"
        android:layout_height="@dimen/flexible_space_image_height" />
</FrameLayout>

header layout must be bottom,if you put it on Framelayout top ,the viewpager will get the touch event

sunglasscat avatar Jul 28 '15 05:07 sunglasscat

i have same issue , any idea ?

Adnan9011 avatar Sep 08 '15 07:09 Adnan9011