hello everyone i'm blake the awesome and for my first android tutorial in this tutorial i will teach you how to set up eclipse to develop Android applications and in the following tutorials I will teach you how to make your very first Android application no programming skills needed I will teach you everything so the first thing that you do is open up your internet browser go to developer.android.com then then click on get the sdk now this SDK bundle will come with the development environment Eclipse the ADT plugin Android SDK tools Android platform tools latest Android app platform and the latest Android system image or the Android emulator this is a very handy bundle because in pack in the past you would have to you'd have to download this whole tool separately from eclipse and sometimes it really didn't like you now we're gonna do is click download the SDK and choose you were your architecture and agree to the vault conditions click download the SDK now since I don't want you to wait 18 17 18 17 minutes for this to get done I will pause the recording alright it's done now the next thing that you're gonna do is open it up open it up here now this is where it is it's ADT bundle windows x86 64 let's just start going to the zip here copy this go back to the folder that you want to paste in that you want what Android stuffin taste it wait for the canopy which is a lot stuff to copy 584 million bytes big guys already almost time you got four and a half minutes left to copy hopefully this will go faster has been irritating okay so well that's doing that let's let's just see what's all right so it's done now first thing we're gonna need to do is to make a desktop shortcut which I just aquiver any of doing so desktop and it's right there that's pretty neat looking isn't it probably take a while to load you need to specify that the workspace so I'm gonna set mine to the entire tutorial folder that I made before us workspace a workspace is every it contains everything that you do and I'll show you that later alright alright and it's up now the first thing that you'll see is this page now this has a bunch of Handy tools including a tutorial on how to build your first app design your yeah and test your app however that's what I'm here for so let's just click that little restore button now this is the package Explorer this show this is what is in your workspace if we open up your workspace here right now efficient I'll think about the metadata folder that means that you haven't created any projects at all so the first thing that we're going to do is create a brand new Android application project yeah a name our application this is gonna in this case it's going to be first now what you should name your package is the name of your specific website backwards so if it was WWE google.com it would become Google www-what what I'm gonna do is I'm just gonna make an example website man it doesn't actually have to be a real website name it could just be something like com dot Blake is awesome dot anything else so what I'm gonna make it is example dot first now the minimum required SDK generally if you want to reach the maximum number of users set it to 3.0 and the for the target SDK that is which which version of Android do you want to use to make this application we're just going to leave that a standard 4.1 and 4.2 now we can choose the theme now which holo dark is pretty neat-looking how light is to but I like how old light with dark action bar some will leave that to no they're gonna create a custom launcher I cannot create activity mark and not mark this product project as a library otherwise it will not run now this is the next step cleaning your launcher icon you can either choose from clipart look at all these options here it turns out great are the way yo or you can choose the default Android image file or a custom image file from your computer or you just make a text I don't what I'm gonna do is I'm just gonna make this world it's nothing that I'm not gonna explain too much of what this is but additional padding that just makes a smaller larger just like for safety purposes really makes a difference now you can make the shape of the outline:none square or circle that's pretty self up then I'm gonna make my nun because I think it's pretty cool that's up so with that said let's move on then off right now let's just create a blank activity because honestly we you don't need to learn how do you use all this this is all pretty fast stuff all right so this is name of our main activity this is the thing that that runs first it's generally okay if you name it main activity unless you have multiple multiple activities that you use that have many functions so but for IT activity that's gonna be fine so let's just click finish so this is our app and first of all let's delete this hello world because we don't want it now what can we do we can't well the answer to that question is pretty much anything we want so what I'm gonna show you how to make is a program that solves the quadratic formula for you now this might be a little bit hard in which case skip to the next tutorial this is our first application funny stuff so what I'm going to do on this application it show you how to make a functional application that's easy to make you can do a bunch of stuff with so let's see first thing that comes to mind is a program that adds two numbers or multiplies two numbers so we're going to delete the whole world to start out with and yeah now so the first thing we need to add is a layout and what it's called is a linear layout for vertical and this so click and drag onto here should fill up the entire thing now what this linear layout does is it stacks all these little widgets as they're called on top of each other and makes a really easy organization it looks like crap but it's really easy to organize so once we have this linear layout here on the and go back to form widgets and a textview which basically shows text on the screen so click and drag right here uh-oh and that's an issue so delete that click on the linear layout one looks like we forgot to set some parameters so now what we're going to do is set the width and height of this linear layout all right right click on it set the layout width to match parent and then do the same thing for height you know expand that all the way to the left and you should have a pretty pretty neat-looking white when you're layout oh so we're gonna rehab that textview to our linear layout you should just snap right there that's good now we are going to edit the text but see Android does not like anything that is not a string value basically imagine a string with a bunch of letter beads on it that's what we're gonna make you so we are going to make a new string we're going to type out the string or then the letters that we want it to say right here so we're going to say num or 1 and this will be this will have an ID it's that way we can I'd eat it later of num1 look okay and you're good click on num 1 okay and it should update to say number 1 there we go now we're gonna do is assign an ID to this textview we're just going to call this the same as the string ID that we just made which is num 1 so next thing we need to do is add a text box which is a place to put in text right under the number 1 textview so click on text fields see this plain text I wish it with ABC inside of it click and drag that under number one should snap right here and that's pretty much good we're gonna need to assign another ID to this an ID to this widget as well and we're gonna call this num one text because the text that we're gonna use as number one now let's just duplicate this entire thing again so let's add text view right click edit text new string type in number two - okay - okay sorry the ID to this oh no - text field ABC edit text assign assign an ID to this add text and this going to be known to text all right now we're gonna get some interesting stuff now which is placing the button actually does it so we're going to add a button drag it out same way now make this the entire size of the thing here and right click on it it over here and click Edit ID this is going to be you know I'll bless your students button
Thursday, September 21, 2017
How serius
No comments:
Post a Comment