The Scrollbar doesn't look nice when converted to Android

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
nietoburon
Posts: 2
Joined: Mon Nov 24, 2014 9:25 pm

The Scrollbar doesn't look nice when converted to Android

Post by nietoburon » Mon Nov 24, 2014 9:43 pm

Hi everyone!

This forum has helped me in many occasions but this time I'm not able to find a solution. :oops:

I've got a Scrollbar in my stack who looks pretty nice on liveCode and when converted to Windows. However, when turned to an Android APP it works well enough but looks like a last century one.

I've had the same problem with buttons, but I solved changing them to icons using the Icons tab of the Inspector panel. However this tab is disabled when the Scrollbar is selected.

Can anybody help me? Thanks a lot

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: The Scrollbar doesn't look nice when converted to Androi

Post by bn » Tue Nov 25, 2014 1:56 am

Hi nietoburon,

I am afraid you would either have to do your own or use one of MobGui or Scott Rossi's tmControl.

It is a bit of work to write your own,

I just made up one that shows how it works. It is not very polished but you can change it easily.
Especially the size and color of the graphics. (look for backgroundColor of the graphics in the inspector.)

It is made of two graphics and a field. Those are in a group. The group has a resizeControl handler that lets you resize the graphics. You can also resize the graphics manually and it should all fall into place.

Have a look.

Kind regards
Bernd
Attachments
homeMadeScrollBar.livecode.zip
(1.89 KiB) Downloaded 186 times

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: The Scrollbar doesn't look nice when converted to Androi

Post by Simon » Tue Nov 25, 2014 2:28 am

Hi nietoburon,
Most of the time you want to use a native scroller.
http://lessons.runrev.com/m/4069/l/9441 ... ll-a-field
They look just like a normal mobile scroller.
You'll have to add code for mobile or desktop but that is just a matter of checking the environment.

Code: Select all

if the environment - "mobile" then
-- set the vScrollbar of fld 1 to false
--do native scroller
else
-- set the vScrollbar of fld 1 to true
--do desktop scroller
end if
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: The Scrollbar doesn't look nice when converted to Androi

Post by bn » Tue Nov 25, 2014 9:36 am

Hi nietoburon,

reading Simon's reply I was probably way off. I was thinking of what Livecode calls a slider.

So anyways, I always wanted to script a slider.

Kind regards

Bernd

nietoburon
Posts: 2
Joined: Mon Nov 24, 2014 9:25 pm

Re: The Scrollbar doesn't look nice when converted to Androi

Post by nietoburon » Wed Nov 26, 2014 3:18 pm

Thanks to both of you :wink:

With Simon's aproach to the problem I have now a wider look of it. I never thought about the existence of native scrollers!

bn's aproach however is closer to what I was looking for. It's so cool to see how other people script. Thank you for your stack!

Have a nice day guys!

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: The Scrollbar doesn't look nice when converted to Androi

Post by bn » Thu Dec 11, 2014 10:36 pm

Hi,

here is what came from this post as I tried to make a custom slider

http://runtime-revolution.278305.n4.nab ... l#a4686698

or directly

http://berndniggemann.on-rev.com/custom ... vecode.zip

Kind regards

Bernd

Post Reply