Send Data to the other Activity

by Android » Wed, 07 Jan 2009 18:27:02 GMT


Sponsored Links
 Hi,

I am trying to start a new Activity from my Activity. For this am
creating an intent as

Intent sendIntent = new Intent(this,Newactivity.class);
startActivity(sendIntent);

With the above i am able to launch my new Intent.
If I want to send some data from Current Activity to the Newactivity
(Where my Newactivity have a text box). The data i send from
CurrentActivity to Newactivity should be displayed in this text box.

Can anyone help me out how to do this ?

Thanks.

--~--~---------~--~----~------------~-------~--~----~



Send Data to the other Activity

by Mark Murphy » Wed, 07 Jan 2009 21:01:27 GMT


 


You'll want to use the "extras" in Intents. Look at putExtra() and the
corresponding getXXXExtra() (where XXX is some data type).

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
_The Busy Coder's Guide to Android Development_ Version 1.9 Published!

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Send Data to the other Activity

by PRATAP SOLAPUR » Fri, 09 Jan 2009 00:01:17 GMT


 To your Intent add the data using
putExtra()
method and in the second activity in which u want to display use
getIntent().get.Extra()
 to retrieve ur data n then display








--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. invisible part of layout

hallo,
my issue is that I have a layout and at the bottom of layout I have a
EditText like this:

<EditText android:id="@+id/EditText05"
                          android:layout_width="fill_parent"
                          android:layout_height="fill_parent"
                          android:fadingEdge="vertical"
                          android:linksClickable="false"
                          android:singleLine="false"
                          android:lines="5"
                          android:layout_marginLeft="10dip"
                          android:layout_marginRight="10dip"
                          android:gravity="top"/>

And it should be like TextArea or some edittext where I can write more
than one line and if text is in the end so it shoud get to the new
line. But no scroll to the right. And problem this sdittext is at the
bottom and if I click on it so virtual keyboard cover it. And I cant
see what I'm writting. if I maybe made a mistake I can't see it and
edit the writen text is very difficult. so I think that the right way
is when keyboard discovered, so little eidittext will be above at the
top of keyboard. or something else but I should see what I put to the
edittext.
thanks a lot

R.

-- 

2. setuid does not work - what am I doing wrong?

Hi all,
I have an app, which will work on rooted phones. The app consist of a
java ui and native binary, which requires a root privilege.
I was planning to chown this binary to root and set a setid bit on it.
But it does not seem to take any effect, when I run this binary as an
app user, getuid() gives me a user id of this app, not of the root.
Also tried to do setuid(0) from the binary but getting "permission
denied".
Same binary works just fine on linux. Any ideas?
Thanks!

-- 
.

3. Kernel source for Telechips based tablets?

4. Drawing a scaled path without scaling the stroke width

5. does stagefright support subtitle and how to support subtitle in android

6. OOT: peringatan Tsunami berakhit

7. Salam kenal n WTS Nexian Journey :D