That is because your click listener ONLY exists for the dagens_button...
You are using an anonymous class on dagens_button. Thus, that is the only
view that will ever get the onClick event and you can take the case
statement out.
Do the same thing for nyeste_button and it will work...
Thanks,
And also, your use of switch statements is seriously flawed... But that
has nothing to do with the actual problem you are having.
Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware
On Wed, Jun 20, 2012 at 10:52 AM, Justin Anderson magouyaw...@gmail.comwrote:
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
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
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
Hey Lars, good to see that you want to learn programming at your young age
and picked Android for doing your first few steps. It's a great choice for
that, in my opinion.
But you need to understand that this forum is not meant to answer beginner
questions. We actually assume that you already
Thank you I really appreciate you post=) I just misunderstood the point of
this forum. You know any beginner forums?(english or danish).
Den onsdag den 20. juni 2012 21.08.36 UTC+2 skrev Nobu Games:
Hey Lars, good to see that you want to learn programming at your young age
and picked Android
Sorry Lars... my post was overly harsh. As mentioned before, the
assumption is that you already have a reasonable amount of programming
experience.
I will post the correct way to do what you are after in just a little bit...
Thanks,
Justin Anderson
MagouyaWare Developer
That's okay dude:-)
--
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
does'nt show any errors,
but app does'nt work on phone.
Thank you I really appreciate you post=) I just misunderstood the point of
this forum. You know any beginner forums?(english or danish).
Den onsdag den 20. juni 2012 21.08.36 UTC+2 skrev Nobu Games:
Hey Lars, good to see that you want to learn
You probably want to take one of the following approaches... Note that my
code is overly-simplified, I did not verify that it doesn't contain compile
errors (I just typed it up real quick in this email), and you will have to
customize it to suit your needs:
*Method 1:*
public class MyActivity
@googlegroups.com
Subject: Re: [android-developers] Re: Help, eclipse does'nt show any errors,
but app does'nt work on phone.
That's okay dude:-)
--
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
[mailto:android-developers@googlegroups.com] On Behalf Of Lars
Sent: Wednesday, June 20, 2012 3:33 PM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] Re: Help, eclipse does'nt show any
errors,
but app does'nt work on phone.
That's okay dude:-)
--
You received this message
I have a book it is called: hello, android. By Ed Burnette. Its okay:-)
--
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
I know:-) I have learned something, the time i have been trying to learn this;-)
--
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
15 matches
Mail list logo