Recommendation for displaying multiple screens

MDEnt

Member
Licensed User
Longtime User
Hello,

I've purchased b4a and a bit new to the development side of things - I've poked around the forums and picked up some knowledge, but now...

I'm basically looking for a recommendation on an efficient way to do something.

I want to display about 25 "screens" - each that has a paragraph of text on it. A next or previous button for example would move from screen to screen. I occasionally may have a graphic to go along with some of the paragraphs.

I've setup a couple as a test, currently I have a new activity with a new layout setup with text for each "screen" - but this seems like the long way to go about it.
 

klaus

Expert
Licensed User
Longtime User
You should give some more infomation.
- How is your text organised, one whole text, 25 text files, ... ?
- Is the image, when there is one, always at the same place ?
- Do you want to scroll the text ?
- Do you need to modify the text ?

Depending on the answers to the questions above, the code will be different.
The simplest way would be to have a Label (or EditText if the should be changed) to dislplay the text and an ImageView to display the image and two buttons to move between the screens.
Then if you want to scroll the text, you would need a ScrollView etc.

You could have a look at the demo program in the Fast Fourier Transform library to one possibility, the help file is almost managed like that (without an image).

Best regards.
 
Upvote 0

MDEnt

Member
Licensed User
Longtime User
Thank you for the quick reply.

I'm not sure how (or what the best way) the text should be presented to the screen (from file or whatever). In other words I just have 25 (or more) blocks of text - about a paragraph to place on its own screen.

The text in some cases may scroll if there is more that would fit on a screen, but i could cut it up to so it would fit. The text does not need to be modified, it would be informational and static.

Lastly, I would like the text to be able to be dressed up so it looks nice and presentable (able to be formatted with italics in some parts, etc.)

Thanks so much, and I'll take a look at that help file as a starting point.
 
Upvote 0

Bob Katayama

Member
Licensed User
Longtime User
My suggestion is you would not need to create 25 different screens per say. Each one of your proposed screens can have a text and image object that is cleared with the next contents when the next button is pressed as suggested earlier.

You can use the MAP feature to setup the default contents of each screen.
Basic4android - Collections (Core)

Just my 2 cents.

Bob
 
Upvote 0

MDEnt

Member
Licensed User
Longtime User
Thanksl, that is what I am trying to avoid (actually creating 25 actual screens). Seems simple enough o create one and swap content with MAP. I'll poke around to see if I can find one in action as a starting point.
 
Upvote 0
Top