Eclipse (of some reason) tells me to type them, or i will get errors. I'm very new at making apps(+ I do this in my free time I'am fifteen years old). All do is: I read in my book trying to type in eclipse, and then i try to get help from here.
Den onsdag den 20. juni 2012 20.24.13 UTC+2 skrev MagouyaWare: > > I would love it if you told me all the errors I made it would really help >> me =). >> >> But do you mean like this: >> final Button dagens_button = (Button) findViewById(R.id.dagens_button); >> dagens_button.setOnClickListener(new View.OnClickListener() { >> public void onClick(View v) { >> switch (v.getId()){ >> case R.id.dagens_button: >> *final Button nyeste_button = (Button) findViewById(R.id.nyeste_button);* >> Intent i = new Intent(BrowserActivity.this, dagensbilde.class);; >> startActivity(i); >> switch (v.getId()){ >> case R.id.nyeste_button: >> Intent i1 = new Intent(BrowserActivity.this, >> nyestebilde.class);; >> startActivity(i1); >> break; >> } >> // Perform action on click >> } >> {; >> }{; >> > }};;;{;;;};});}} >> > > I don't do this very often... but WTF?????? > > - What in the world are all the braces and semi-colons for? > - Why are you nesting switch statements? > - Why do you even have a switch statement if there is only one case? > - You are still not setting a click listener on nyeste_buttton... > - Even if you did, you wouldn't be setting it until AFTER you clicked > on dagens_button... > - Need I go on? > > > > Thanks, > Justin Anderson > MagouyaWare Developer > http://sites.google.com/site/magouyaware > > > On Wed, Jun 20, 2012 at 12:16 PM, Lars <lars.breum...@gmail.com> wrote: > >> I would love it if you told me all the errors I made it would really help >> me =). >> >> But do you mean like this: >> final Button dagens_button = (Button) findViewById(R.id.dagens_button); >> dagens_button.setOnClickListener(new View.OnClickListener() { >> public void onClick(View v) { >> switch (v.getId()){ >> case R.id.dagens_button: >> *final Button nyeste_button = (Button) findViewById(R.id.nyeste_button);* >> Intent i = new Intent(BrowserActivity.this, dagensbilde.class);; >> startActivity(i); >> switch (v.getId()){ >> case R.id.nyeste_button: >> Intent i1 = new Intent(BrowserActivity.this, >> nyestebilde.class);; >> startActivity(i1); >> break; >> } >> // Perform action on click >> } >> {; >> }{; >> }};;;{;;;};});}} >> > > -- 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