*
one.java:
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class one extends Activity
{
Button click;
Button click1;
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main2);
click = (Button) findViewById(R.id.click);
click.setOnClickListener(new View.OnClickListener()
{
public void onClick(View view)
{
Intent myIntent = new Intent(view.getContext(),two.class);
startActivityForResult(myIntent, 0);
}
});
click1 = (Button) findViewById(R.id.click);
click1.setOnClickListener(new View.OnClickListener()
{
public void onClick(View view)
{
Intent myIntent = new Intent(view.getContext(),two.class);
startActivityForResult(myIntent, 0);
}
});
}
}
two.java:
import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
public class two extends ListActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.mains);
try {
URL Url = new URL("http://www.newkerala.com");
}
catch (IOException e) .....................
{
e.printStackTrace();
}
..................
................
...............
.............
}
Now what i want whenever i select a button from one.java file it should pass
the URL in two.java and the URL is defined in one.java. In other words how
can i pass the different-different URL on the different-differentbutton
*
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en