0

This is a strange issue I'm having with my Samsung GT-I9003L. I've a ScrollView containing a LinearLayout with different stuff inside (ImageView, Button, EditText, etc.) and it works perfectly when tested in the emulator, both in 2.3.3 and 4.2 versions.

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/scroll_view"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:padding="16dp" >

        <ImageView
            android:id="@+id/image"
            android:layout_width="fill_parent"
            android:layout_height="200dp"
            android:contentDescription="@string/img_description"
            android:src="@drawable/ic_launcher" />

        <Button
            android:id="@+id/btn_camera"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="@string/add_new_btn_camera" />

        <Button
            android:id="@+id/btn_gallery"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="@string/add_new_btn_gallery" />

        <EditText
            android:id="@+id/name"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:ems="10"
            android:hint="@string/add_new_name_hint"
            android:inputType="text"
            android:maxLength="80" />

        [...]
    </LinearLayout>

</ScrollView>

The thing is that when I test it on my phone, the overscroll indicators (the blue/orange glows) doesn't show at all. I've managed to get them working with this line:

ScrollView addNewScroll = (ScrollView)findViewById(R.id.scroll_view);
addNewScroll.setOverScrollMode(ScrollView.OVER_SCROLL_IF_CONTENT_SCROLLS);

But when I reach the top or the end, the glow just "appears", it doesn't animates or fades in.

Thanks in advance for your help!

2
  • 1
    I would guess that this is because of the UI (TouchWiz?) which Samsung puts in their phones... It somehow overrides Android's default settings
    – user219882
    Jan 11, 2013 at 14:05
  • I wouldn't doubt that. Every manufacturer should follow the standards, but they don't. The problem is that other apps works just fine... Jan 11, 2013 at 14:27

1 Answer 1

0

We are having the exact same issue. Overscolling doesn't seem to work on Samsung Galaxy 2 (Touchwiz), but also on HTC One X phones (older HTC's seem to work).

Is suspect that they replaced the ScrollView implementation with their own, maybe for the stretchy scrollbars or something.

2
  • You can grab a copy from ScrollView from AOSP en package it with your app. So you provide your own copy of ScrollView instead of the one provided by the provider.
    – Jeroen
    Feb 21, 2013 at 11:42
  • Sorry for the late answer. I'll try that and see what happens. Thanks for the tip! Mar 20, 2013 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.