Multi-Activity App

This is a discussion on Multi-Activity App within the Android App Developers forums, part of the Droid Apps category; I'm making an application that will have multiple pages. I've thought up two ways to do this. #1: Use different activities and intents (the way ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Multi-Activity App

  1. Junior Droid
    cruskai239's Avatar
    Member #
    196956
    Join Date
    May 2011
    Posts
    20
    Phone
    Fascinate
    #1

    Multi-Activity App

    I'm making an application that will have multiple pages. I've thought up two ways to do this.

    #1: Use different activities and intents (the way every tutorial does it).

    #2: Use a switch statement to "simulate" changing pages on the button push without actually changing activities.


    Which is more efficient for both speed and file size?
  2. Sponsor
    DF Advertising
    Join Date
    Nov 2008
    Location
    DroidForums.net
     
     
     
     
  3. Junior Droid
    naDroid.com's Avatar
    Member #
    171234
    Join Date
    Feb 2011
    Posts
    26
    Phone
    Droid 3
    #2

    Just a thought

    Not sure which is more efficient or if the difference in file size would even be noticeable but I would advise against this. The reason everyone does it in separate activities is because that is just the proper way to do it.

    This makes your code both more readable and more maintainable.
    In my experience it also makes your code less prone to bugs that can be introduced in complicated if/switch blocks.

    Just my 2 cents though. If it's easier for you and you are the only person that will ever touch it, then do it how you want. I just don't think you should base it off of an efficiency question since any difference will not be noticeable.

Sponsors

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Similar Threads

  1. no activity?!
    By jgwarrick in forum UltimateDroid
    Replies: 8
    Last Post: 12-22-2010, 04:03 PM
  2. Android's activity
    By markroyson in forum Droid General Discussions
    Replies: 2
    Last Post: 08-05-2010, 08:34 AM
  3. Network Activity
    By codeguy in forum Droid Hacks
    Replies: 1
    Last Post: 07-14-2010, 11:03 PM

Search tags for this page

android application development multi activity
,
android application development multi activity application
,

android application multiple pages

,
android multi activity applications
,

android multi activity tutorial

,
android multi page activities
,

android multi page app

,
android multi page app activities
,
android page multiactivity
,
android turtorial for mutipage activity
,

multi page android app

,

multi page android app tutorial

,
multiacticity intent
,
multiactivity android
,
proper+way+to+do+multi+activity+on android%3f
Click on a term to search our site for related topics.

Tags for this Thread