Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does this set up for my app make sense?

Tags:

android

First off, I'm totally brand new to any kind of coding. I started trying to make an app with App Inventor, but it became too big for that and couldn't do exactly what I was wanting. So now I'm attempting to do it all from scratch.

I think I'm getting things figured out, but I'd like to check and see if this makes sense before I got and build the whole thing.

What I'm aiming for is a main screen with a bunch of buttons on it. Each of those buttons will take you to a set of directions that is a series of pictures and text that you can flip through.

What I'm thinking is to make an activity for the main screen and one for each set of directions. On the main one, I put a table layout which contains all the buttons. Each of the directions sets will be its own activity with a view flipper to go through all the pics/text.

Does that make sense? Is there a better way to do this or is this good? Thanks!

like image 496
KarenElissa Avatar asked Nov 06 '22 04:11

KarenElissa


1 Answers

Your method makes sense but can be improved. For a beginners point of view it would appear easier to make seperate activities for each of the different directions set.

In the future you could possibly break this down into two activities. The first one as you outlined but the second would differ.

The second activity would contain the code to flip through data but the data itself will differ. You can use something called extras. See Common Tasks and How to Do Them in Android - Some Intent examples

You launch the second intent/activity with data that can be used to identify which button the user pressed and in the second activity, read this value.

You would have to make arrays in the second activity for each of the direction sets, then depending on the option the user selected, apply the data from these arrays to the users display/view.

However, for a beginner your idea seems perfect. Get used to the new environment and tools then start looking into more advanced methods.

like image 181
Damon Skelhorn Avatar answered Nov 15 '22 07:11

Damon Skelhorn