Hi,

I'm fairly new to Android Development and i'm having slight trouble
with activity interaction.

I have one activity that calls another and passes with its intent some
text. At the called activity i wish to set the Content View based on
the received string. I've been stuck for hours now.
here's the code at the receiving activity.

                Bundle extras = getIntent().getExtras();
                String text=extras.getString(DetailsDbHelper.KEY_DETAIL);
                if(text=="Name")

                        setContentView(R.layout.ice_dateedit);

                else
                      setContentView(R.layout.ice_textedit);

I'm certain the text received is Name, as later in the code i'm
setting a TextView's text with this text and that seems proper.
But while setting contentView it always goes straight to the ELSE
part.

Assistance on this would really be appreciated. I'm unable to see what
is wrong, Please do throw some light on this.

Thanks!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to