Hey everybody..
I'm just startet writing code for android.. And then I need to have
some if-sentences.. (sorry for my english) they look like this
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Date dateDate = new Date();
String codedate = new SimpleDateFormat("ddMMyy").format
(dateDate);
if (codedate != "220809") {txtKommentar.setText
(R.string.k220809);}
if (codedate != "210809") {txtKommentar.setText
(R.string.k210809);}
if (codedate != "200809") {txtKommentar.setText
(R.string.k200809);}
if (codedate != "190809") {txtKommentar.setText
(R.string.k190809);}
}
and if the 'codedate' has a value of '210809', it still does this:...
txtKommentar.setText(R.string.k190809);
...like the 'codedate'-strings value was 190809.. what is wrong?.
please help me.. i can't figure it out..
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---