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

Apps moving from login page to the 2nd page of an application

Discussion in 'Android Development' started by currycrab, Sep 11, 2011.

  1. currycrab

    currycrab Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    31
    Joined:
    Sep 11, 2011

    Sep 11, 2011
    31
    0
    15
    programming student
    somewhere
    hi,

    im doing a project without given proper lessons on android programming on eclipse. was told to selflearn from the webs. hence i meet with some problem in making an application.. search thru the web and cant find any solution that is workable.

    my question is how do i move on to the 2nd page of the application(home view page) given that my login details from the login page were correct. and also how to make a database that can be used to detect the correct username and password.

    thanks in advance
     

    Advertisement

  2. alostpacket

    alostpacket Over Macho Grande?
    Rank:
    None
    Points:
    513
    Posts:
    7,972
    Joined:
    Nov 29, 2009

    Nov 29, 2009
    7,972
    3,603
    513
    Android App Developer
    NY
    Usually you would launch a new activity with startActivity or startActivityForResult

    Sorry for short msg, sent from my phone
     
    currycrab likes this.
  3. jonbonazza

    jonbonazza Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    1,930
    Joined:
    Jul 13, 2010

    Jul 13, 2010
    1,930
    457
    163
    Male
    You need to use an Intent. This can be done like so:

    Code (Text):
    1.  
    2. Intent intent;
    3. intent = new Intent(this, ClassToMoveTo.class);
    4. startActivity(intent);
    5. finish(); //Only use this line if you don't want the user to be able to return to the current activity with the back button.
    6.  
     
    currycrab and alostpacket like this.
  4. currycrab

    currycrab Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    31
    Joined:
    Sep 11, 2011

    Sep 11, 2011
    31
    0
    15
    programming student
    somewhere
    problem solved... =x
     

Share This Page

Loading...