Answer for posterity:

Need to setClickable and setLongClickable to false (must be both,
setting one or the other still causes dimming).

Need to set above _after_ calling setMovementMethod
(ScrollingMovementMethod.getInstance()). Setting XML properties
doesn't work since they seem to be overridden by call to
ScrollingMovementMeathod.

   _Text = (TextView) findViewById(R.id.text);
   _Text.setMovementMethod(ScrollingMovementMethod.getInstance());
   _Text.setClickable(false);     // Both Clickable and LongClickable
must be turned off
   _Text.setLongClickable(false); // after setting the MovementMeathod
in order to avoid dimming effect


On Apr 8, 11:49 am, "sh...@kfold.org" <sh...@kfold.org> wrote:
> When scrolling in a TextView it has an annoying effect that dims the
> background while scrolling (touch scrolling). This makes the text very
> hard to read and difficult for the user to know when to stop
> scrolling. See RoboTop application in the market to see what I mean.
>
> I'm not sure what is causing the dimming effect or how to disable it.
> Any thoughts? (One guess is that it may have something to do with text
> selection for cut and paste).
>
> Note that wrapping a TextView in a ScrollView (and disabling the
> scrolling on the TextView and enabling it on the ScrollView) scrolls
> nicely without dimming. However, ScrollView can only scroll vertically
> and I need to scroll both horizontally and vertically (which TextView
> can do when enabled).
>
> More details:
>
> TextView is in a LinearLayout like so:
>         <TextView android:layout_height="wrap_content" android:id="@+id/text"
>                 android:scrollbars="vertical" 
> android:scrollHorizontally="true"
>                 android:textSize="10sp" android:typeface="monospace"
>                 android:layout_width="fill_parent" 
> android:layout_weight="1"></
> TextView>
>
> Scrolling of TextView is enabled in OnCreate() like so:
>        _Text = (TextView) findViewById(R.id.text);
>         _Text.setMovementMethod(ScrollingMovementMethod.getInstance
> ());
>
> Full source is available athttp://www.kfold.com/m/RoboTop-beta1.zip
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to