• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How many classes and layouts do I need for my app?

Hi guys,

I'm pretty new and need your help.
Even though I made some progress (creating buttons with functions, designing etc.), I'm stuck with the topic:
Multiple pages on Android Wear.

To explain it as simple as possible, I just created a draft:
lh9fv5bd.png


Basically when I start the App, I only want to see a number and a color.
Those two values should get changed by using the second and third sheet.
(By pressing the specific buttons.)

By using left swipe/right swipe I would like to switch between those screens.
Like on this example, but without the vertical swipe and without these points which show the current page.

1fdf7edd489bbf91.png


Can this be achieved by using:
- 2 java classes (MainActivity.java, SectionFragment.java)
- 2 layouts (activity_main.xml, fragment_section.xml)
?

Or do I need in this case 3 java classes and 3 layouts?
For example:
- MainActivity.java, ColorsActivity.java, ValuesActivity.java
- activity_main.xml, activity_colors.xml, activity_values.xml
?

Regards
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones