1. Download our Official Android App: Forums for Android!

Different but similar Activities design question

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

  1. jamesfrain

    jamesfrain Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    3
    Joined:
    Sep 14, 2011

    Sep 14, 2011
    3
    0
    5
    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?
     

    Advertisement

Share This Page

Loading...