Hm, i don't get it, he defined all the buttons in the baconAndEggs method, aren't they supposed to only be available there? why didn't we have to re-define in the onClick method? i mean, i know we removed the "final" identifier so we can access those variables from more than one method, but i thought we have to define them in every one of those methods o.O
@raffivar He defined all the buttons at the top, ABOVE all the other methods. Things defined at the top are "global" and can be used in the other methods.
@seopeter22 I had that error too but it was because I didn't delete one of the earlier "final Button" types in baconAndEggs(). I only caught it because it was underlined in yellow. Do you see anything in your code that's underlined in yellow or even red?
@jessica507 i somehow fixed it long ago O_O;; i dont remember if there was anything red or yellow. but right now nothings red or yellow. what's underlined in red??
If this Guy says "for the most part" one more f***ing time I will. Lose. My. Shit. Doesn't he have someone that will tell him to stop. Hey Travis, it runs your tutorial, for the most part, when you say for the most part. See, it's important to remember, for the most part, that everything is composed of parts that take up the majority of the whole, for the most part.
@lumpyNifkin: Abstract Classes are not similar to interfaces. The definition of an interface is a 100% abstract class: a class where all methods are abstract.
Is there any other difference between a class and an interface except that you have to implement all methods when using an interface and only the ones you'd like when integrating a class?
@PaT07M It's basic Java. You can't create an instance of an interface. In an interface, all the methods have empty body, no attributes definition is allowed. And interfaces give decoupling abilities where classes don't have.
I'm new to java so can anyone tell me why one doesn't refer to baconAndEggs(); as this.baconAndEggs(); since it is a method of that class? (I come from PHP).
@iThaosTM the method was created in the same class as the one you are referring it in. if the method was created in Menu.java and you're using the method in TextPlay.java then you would do Menu.baconAndEggs(); or something like that (it's not completely correct but I cant be bothered to do the whole code)
so basically you dont need to use 'this' most of the time. We actually used it in one of the tutorials without having too but it makes things alot clearer.
fml its not writing it that is hard it is the debugging! idk y eclipse put in extra breaks when i copy & paste!
learninjava 4 weeks ago
FOR THE MOST PART!!!!!11
f3f0f4 1 month ago in playlist Android Application Development Tutorials 2
@f3f0f4
I agree. If he says : "for the most part" one more time I think I will quit watching these tutorials
GreenLifeInnovators 1 week ago in playlist Android Application Development Tutorials
Hm, i don't get it, he defined all the buttons in the baconAndEggs method, aren't they supposed to only be available there? why didn't we have to re-define in the onClick method? i mean, i know we removed the "final" identifier so we can access those variables from more than one method, but i thought we have to define them in every one of those methods o.O
raffivar 1 month ago
@raffivar He defined all the buttons at the top, ABOVE all the other methods. Things defined at the top are "global" and can be used in the other methods.
prasadisfat 1 month ago
@prasadisfat Yeah, that i know. i was just surprised that the changes you do to them in one method are kept in another..
raffivar 1 month ago
"public class TextPlay extends Activity implements View.OnClickListener {"
HandMekeysYouFuCoSkr 2 months ago
Comment removed
HandMekeysYouFuCoSkr 2 months ago
I just started watching this clip but I don't like where this is going.
I thing the best method is to use private named listener classes, separate for each widget.
Unless it's prohibited in android
The switch or a bunch of nested ifs is a guaranteed pathway to a nervous breakdown with larger apps
IMO
Mr1159pm 3 months ago in playlist More videos from thenewboston 3
I like this.
buildakicker 3 months ago
Thx for the better programming part, it helped me to make my own code a little bit nicer, for the most part.
Antila 3 months ago
@Antila Lol
HandMekeysYouFuCoSkr 2 months ago
This tutorial for the most part is good, except that for the most part were he say for the most part a little too much
ThompZon 4 months ago
my app says "it stopped unexpectedly. please try again [force close]" but there's no error. any solns? thanks in advance
seopeter22 4 months ago
@seopeter22 I had that error too but it was because I didn't delete one of the earlier "final Button" types in baconAndEggs(). I only caught it because it was underlined in yellow. Do you see anything in your code that's underlined in yellow or even red?
jessica507 1 month ago
@jessica507 i somehow fixed it long ago O_O;; i dont remember if there was anything red or yellow. but right now nothings red or yellow. what's underlined in red??
seopeter22 1 month ago
@seopeter22 That just means there's either a spelling error or a syntax error.
jessica507 1 month ago
If this Guy says "for the most part" one more f***ing time I will. Lose. My. Shit. Doesn't he have someone that will tell him to stop. Hey Travis, it runs your tutorial, for the most part, when you say for the most part. See, it's important to remember, for the most part, that everything is composed of parts that take up the majority of the whole, for the most part.
mhc4124 4 months ago
These are great! I have learned so much!...for the most part
GregFoxDroid 4 months ago in playlist The New Boston - Android
@lumpyNifkin: Abstract Classes are not similar to interfaces. The definition of an interface is a 100% abstract class: a class where all methods are abstract.
ErichLancaster 5 months ago
just a tip: ctrl + space when writing a word
vasterhaninge 5 months ago 5
is not sure that travis knows what his talking about for the most part
zazzlescat 5 months ago in playlist TheNewBoston - Android
@quanganht: Interfaces are classes too.
ErichLancaster 5 months ago
@ErichLancaster Interfaces are not classes, you might be thinking of abstract classes which are similar to interfaces.
lumpyNifkin 5 months ago
i already know java, but this video is refreshing :D
bohterham 6 months ago in playlist Android MBB TNB 20
It's not correct here... We are implementing an Interface, not a Class
quanganht 6 months ago 35
Comment removed
kazanture 5 months ago
Comment removed
kazanture 5 months ago
@quanganht
Is there any other difference between a class and an interface except that you have to implement all methods when using an interface and only the ones you'd like when integrating a class?
PaT07M 1 month ago in playlist Android-Development
@PaT07M It's basic Java. You can't create an instance of an interface. In an interface, all the methods have empty body, no attributes definition is allowed. And interfaces give decoupling abilities where classes don't have.
quanganht 1 month ago
@droidarmy95 source ? i meant to say legit
mastermax7777 6 months ago
Nice tutorials :D
I'm new to java so can anyone tell me why one doesn't refer to baconAndEggs(); as this.baconAndEggs(); since it is a method of that class? (I come from PHP).
iThaosTM 6 months ago
@iThaosTM the method was created in the same class as the one you are referring it in. if the method was created in Menu.java and you're using the method in TextPlay.java then you would do Menu.baconAndEggs(); or something like that (it's not completely correct but I cant be bothered to do the whole code)
so basically you dont need to use 'this' most of the time. We actually used it in one of the tutorials without having too but it makes things alot clearer.
mangopearandapples 6 months ago
@mangopearandapples hmmm so this has a different usage in Java. Alright thx for your time
iThaosTM 6 months ago
@iThaosTM Uh.. I don't know how it's used in PHP but this is the same as the class you're using it in.
So if I used this.helloWorld() in Menu.java it would be the same as Menu.helloWorld()
mangopearandapples 6 months ago
@mangopearandapples ...but in Java you *have to* use it while calling a method of the same class?
iThaosTM 6 months ago
@iThaosTM nope. If you call a method in the same class that it was created, you dont have to use the class name or this
mangopearandapples 6 months ago
@mangopearandapples OK clear. Thx :-)
iThaosTM 6 months ago
For The Most Part For The Win !
casvanmarcel 6 months ago in playlist Android Development thenewboston