1. Are you ready for the Galaxy S20? Here is everything we know so far!

Different but similar Activities design question

Discussion in 'Android Apps & Games' started by jamesfrain, Sep 23, 2011.

  1. jamesfrain

    jamesfrain Lurker
    Thread Starter

    I have a home Activity with 10 - 20 widgets on it.
    One of these is a Checkbox which when checked will require the next Activity to show a list of 10 Radio buttons. If the box is not checked the next Activity should show 10 CheckBoxes.
    My question is should I have 2 seperate Activities with their own XML layout files for the "Next" activity and display one or other depending on the state of the checkbox on the home activity OR should I have just 1 Activity and dynamically decide to show either a list of Radio Buttons or else a List of CheckBoxes?
    What is going through my mind is 2 seperate Activities would be cleaner and more maintainable as I don't like complex logic that dynamically builds views but would having 2 activities be more Memory hungry would it not?

    Please ignore what the App might might not do as this is not the important thing, what I want to try and understand is when do you stop trying to dynamically manipulate a view and just simple create a new one?
     


Loading...

Share This Page

Loading...