Autoscroll

Put your problem here if it does not fit any of the other categories.

Autoscroll

Postby confused » Tue Oct 21, 2008 9:20 pm

I have a TextView (called tv) which is a child element of a ScrollView (called sv). When I add text to tv, I want to be able to scroll down. I've tried using sv.fullScroll(View.FOCUS_DOWN) and also sv.scrollTo(value1, value2). This doesn't work, if I try tv.scrollTo(value1, value2), it doesn't scroll at all and doesn't show any response. I can't work out the proper way to do this, any help is appreciated.
confused
Junior Developer
Junior Developer
 
Posts: 16
Joined: Fri Oct 03, 2008 2:30 pm

Top

Postby haden » Wed Oct 22, 2008 9:17 am

Did you try only using text view without the scrollview child? i guess textview takes care of its own scrolling..
haden
Experienced Developer
Experienced Developer
 
Posts: 74
Joined: Thu Sep 11, 2008 11:51 am

Postby confused » Wed Oct 22, 2008 7:53 pm

That's what I thought as well, but I can't find a way for it to scroll, auto or otherwise, without a scrollview wrapped around it :/
confused
Junior Developer
Junior Developer
 
Posts: 16
Joined: Fri Oct 03, 2008 2:30 pm

Postby confused » Mon Oct 27, 2008 11:34 pm

Problem solved, it was my xml design of the textview causing the problem. Using fill_parent instead of wrap_content was the issue.
confused
Junior Developer
Junior Developer
 
Posts: 16
Joined: Fri Oct 03, 2008 2:30 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot] and 13 guests