Android Forums

Go Back   Android Forums > Android Coders > Android Development, Answers, Tutorials, and Code Snippets
Connect with Facebook

Click Here To Register!
Reply
 
LinkBack Thread Tools Display Modes
Old 12-21-2009, 08:24 AM   #1
Junior Member
 
Join Date: Dec 2009
Posts: 4
Friends: 0
View Anjul's Profile   View Anjul's Photo Album   View Anjul's Blog   View Social Groups
Current behaviour:
I am calling an intent on button click from activity1 as shown below:
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button button = (Button)findViewById(R.id.button);
button.setOnClickListener(mCorkyListener);

}
// Create an anonymous implementation of OnClickListener
private OnClickListener mCorkyListener = new OnClickListener() {
public void onClick(View v) {
Intent myIntent = new Intent(v.getContext(),testLinearLayout.class);
startActivityForResult(myIntent, 0);

}
};
Here is my activity2 defined in class testLinearLayout:
public class testLinearLayout extends Activity
{

public void oncreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main2);
Button next = (Button) findViewById(R.id.Button02);
next.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
Intent intent = new Intent();
setResult(RESULT_OK, intent);
finish();
}
});

}
manifest.xml
<activity android:name=".testLinearLayout">
</activity>
I want to call my testLinearLayout activity on button click(button) but not able to.
I am not getting any error mesage, but Still I am unable to get the contents shown in main2.xml...

Please provide me a solution to it..
Anjul is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Reply With Quote
Reply

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
JNI + Unable to dlopen .so Lax Android Development, Answers, Tutorials, and Code Snippets 2 08-16-2010 04:48 AM
Unable to Install/RUN NDK ganesh4it Android Development, Answers, Tutorials, and Code Snippets 0 11-18-2009 11:36 PM
How to loop the activities from a tag activity malli.ch Android Games And Applications 0 10-08-2009 10:18 AM
How can i send Activity object to another activity through intent? santosh.1243 Android Development, Answers, Tutorials, and Code Snippets 2 06-28-2009 11:08 PM


Unlocked G1 Phones | Buy T-Mobile G1 | Google Phone

All times are GMT -6. The time now is 09:48 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Copyright (c) 2008 TalkAndroid.com. All rights reserved.