Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

test: Reply
 
LinkBack Thread Tools
Old June 27th, 2012, 09:31 AM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Dec 2011
Posts: 11
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Default screen navigation

Hi All,

I am new 2 Android
how to navigate one screen to another?
plz help me on this.

Advertisements
mails2prince is offline  
Reply With Quote
sponsored links
Old June 29th, 2012, 07:18 AM   #2 (permalink)
Junior Member
 
Join Date: May 2012
Location: Hampshire, England
Posts: 71
 
Device(s): Samsung Galaxy Player 4.0 (Galaxy S Wifi 4.0)
Carrier: Not Provided

Thanks: 3
Thanked 12 Times in 9 Posts
Default

More information would help us to help you.

I'm not sure what you are asking, but if you mean you have several apps open and want to move from one app to another... a long press on the Home button will bring up a list of recently opened apps, then select the one you want to move to.

If the app you want to move to has a shortcut icon on the home screen, you can just press the Home button normally and tap the shortcut. If the app is already running, it won't start it app again, it will just switch to it.

Hope that helps
ForkliftFred is offline  
Reply With Quote
The Following User Says Thank You to ForkliftFred For This Useful Post:
PrissyPJ (June 29th, 2012)
Old June 30th, 2012, 01:30 AM   #3 (permalink)
New Member
Thread Author (OP)
 
Join Date: Dec 2011
Posts: 11
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi Fred,
Thanks for your reply, what I want is
How to send request/response from one page to another page in one app?
mails2prince is offline  
Reply With Quote
Old June 30th, 2012, 01:56 AM   #4 (permalink)
The Doctor
 
chanchan05's Avatar
 
Join Date: Jun 2011
Gender: Male
Posts: 11,373
 
Device(s): Note 3 LTE (N7105), Samsung Galaxy Tab 7.0 Plus (P6200), Samsung Galaxy SL (I9003), , Samsung Galaxy
Carrier: Globe Philippines

Thanks: 172
Thanked 2,511 Times in 2,077 Posts
Default

Could you just be more specific? You're not being very clear. What page? What request? What app? Are you trying to put a shortcut on a homescreen?
__________________
https://shared.com?ref=51950 100GB free storage. WOW.

Worried about your health? Take the True Health Assessment now! Click HERE
chanchan05 is online now  
Reply With Quote
Old June 30th, 2012, 08:12 AM   #5 (permalink)
New Member
Thread Author (OP)
 
Join Date: Dec 2011
Posts: 11
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Default

As I am new to Android app development please bare with me.

My requirement is, once I submit a button on a page-1 should navigate to another page 'page-2'. Both the pages are in the same app. How to do this?
mails2prince is offline  
Reply With Quote
Old June 30th, 2012, 02:19 PM   #6 (permalink)
not really so scary
 
scary alien's Avatar
 
Join Date: Mar 2010
Location: Indy
Posts: 17,293
 
Device(s): LG Nexus 5, Samsung Galaxy Nexus, Asus Nexus 7, Moto Droid X, HTC Droid Eris
Carrier: T-Mobile

Thanks: 32,664
Thanked 14,899 Times in 7,292 Posts
Default

Hey guys,

I've moved this thread to the Android app development area for you.

You should get some good coding / development feedback in here.

Cheers!
scary alien is online now  
Reply With Quote
Old July 2nd, 2012, 04:54 PM   #7 (permalink)
New Member
 
Join Date: Feb 2012
Posts: 7
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 1 Time in 1 Post
Default

Code:
 switcher.setOnClickListener(new OnClickListener() { //sets up a listener for the button

            public void onClick(View v) {
            // TODO Auto-generated method stub
            Intent i = new Intent(ScreenSwitchActivity.this,secondactivity.class); //passes intent in order to start new activity
            startActivity(i);
            }

            });
Switcher = A button referenced in your XML
setOnClickListener - does exactly what it says it does, waits for the button to be pressed

Intent - tells the application that you are passing control off to another activity (I'm also new to this so please let me know if I'm giving false information)

ScreenSwitchActivity.this = Current class that is active
Secondactivity.class = Next activity


... This is how you switch to another activity.

In order to switch the view screen you would want to use this...

setContentView(R.layout.main); // Loads the main XML file

Please let me know how I can make my response more clear, or if i have made any mistakes, I'm new to this as well!
MrAlt is offline  
Reply With Quote
The Following User Says Thank You to MrAlt For This Useful Post:
scary alien (July 2nd, 2012)
Reply


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 10:07 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.