Android Navigation Example

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Locked
elanorb
Livecode Staff Member
Livecode Staff Member
Posts: 516
Joined: Fri Feb 24, 2006 9:45 am

Android Navigation Example

Post by elanorb » Wed Aug 28, 2013 11:08 am

Hi all

A few people have asked for an example of an Android tab style navigation as this is not one of the MobGUI options. I have uploaded a sample stack here.

The example mirrors what we have been doing in the Summer School App as closely as possible, there is a group of buttons called "navigationButtons" and a field called "title". These are grouped together in a background group called "navigation" which is placed on every card.

The buttons are square LiveCode buttons with an icon set on them, 3d turned off and a border width of 1.

All the code for navigation is in the "navigationButtons" group, it works very similarly to what has been covered but the management of highlighting and un-highlighting buttons is implemented manually.

The selected option is stored as a custom property of the group called cHilitedButtonName , to retrieve it use the code

Code: Select all

put the cHilitedButtonName of group "naviagtionButtons" into tChosenOption
I hope this is useful. If you have any questions or comments please post them here.

Kind regards

Elanor
Elanor Buchanan
Software Developer
LiveCode

Locked

Return to “Summer School 2013”