java - Android Scroll Text in TextSwitcher -


i have texswitcher add 2 text views (created dynamically using textview class). switching between child text views using gesture detector. when text large fit in current viewable area, scrolling doesn't work textswitcher.

when tried using settextmovement method of child text views, textswitcher stopped listening horizontal swipe gestures.

has been successful in showing scrollable text views inside textswitcher.

i solved problem creating own textswitcher.

public class myownswitcher extends viewswitcher {     public myownswitcher (context context) {         super(context);     }      public myownswitcher (context context, attributeset attrs) {         super(context, attrs);     } } 

i moved "ontouchevent"-method new class. had override "onintercepttouchevent"-method that:

@override public boolean onintercepttouchevent(motionevent ev) {     ontouchevent(ev);     return super.onintercepttouchevent(ev); } 

i had move of fields , variables activity new class. can use methods of activity with:

activity ac = (activity) this.getcontext(); 

that should return activity.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -