Scrolling the Screen

etLux

Member
Licensed User
Longtime User
Okay, I'm having a blast... what a great job
on this environment. I use a Droid X for live
load, and the software emulator for layout.
Works like gangbusters.

But my newcomer status has got me tripped
up again. Here's the latest...

With the stock example and a lot of digging
around the great stuff in the forum, I've managed
to make a decent little media player dingus (the
idea is to distribute some of my music via A/M).

But the screen ain't long enough -- and for the
life of me, after hours of noodling and reading --
I cannot figure out how to get the screen to
scroll up and down when I swipe on it.

I admit to far too many years on Borland Delphi;
but... could someone be kind enough to clue
me in a little on this... lol?

I've looked at ScrollView and Panel (if that's how
it's done) -- but I'm just plain not "getting it"!

Many thanks,



David
------
David Sosnowski
www.DavidSosnowski.com
 

etLux

Member
Licensed User
Longtime User
ScrollView is the right direction.
There is a tutorial about it: Basic4android - Android programming with Gui designer

You should add a ScrollView over all the screen and then add items to its internal panel:
ScrollView.Panel.AddView.

You can also load a layout directly on the panel.

Thanks, Erel! Got there (after my usual
hour or two of stumbling around... rofl).

Works nicely loading the layout directly into
the ScrollView.Panel -- and the logistics of
design that implies make it easy to manage.

Best,



David
-----
David Sosnowski
www.DavidSosnowski.com
 
Upvote 0

Libor

Member
Licensed User
Longtime User
Scroll view in TabHost

Hi, a follow up question to the above please.

I have created various layouts that contain what I need to appear on the screen for the UI.

I've created a tabhost with multiple panels. Now I'm trying to get the individual panels to scroll.

I'm not figuring out how to get the panel to scroll but not the entire screen, just the part that is under the tab.

I load a different layout with each tab but there are too many items to show on the screen all at once. These are text fields and buttons.

I've tried using the information from the examples but just doesn't work so far.

I'm wondering if my problem is that I'm using the GUI Designer and the Layouts to load the tabhostview.

I'm not a programmer and I'm just getting my brain around some of the information in the forum so please be specific if possible. I've spent hours trying to make this part work and can't seem to do it.

thanks for any insight.
 
Upvote 0
Top