Hire everyone in this theater are really going to go ahead and create our first team Android application.
So we just need to click on this.
Start any 100 studio project.
And then here we need to actually assign a name to this application name so just type in here app 15.
And here you can actually specify the company domain package name and project location.
Click next choose API 16 Android 4.1 jellybean for your minimum STK next Blache activity next.
And here don't change anything.
And then click on finish.
Now delete this text view here.
Hello world.
And then double click on the rest folder layout and then click on this activity other learned men are.
And then here select this float in action button here and then press delete key on your keyboard.
OK so let's actually go back and say this content on the line made that example.
And now we need to actually design our user interface here.
OK OK now let's actually drag a linearly out vertical inside this relatively out OK.
Just put this linearly out vertical at the center of the screen and then lets actually drag linearly
out horizontal into this linear left vertical and now drag to large takes views into this linearly out
horizontally k 1 and 2.
Soon as we can see if we have to take our viewers inside this linearly out horizontal OK so just select
these two text views and for the layout we'd just assign the value zero.
And for the left vate assign the value zero point five.
So as you can see here these two values these two text views are actually taking only a half of the
width of these linearly out horizontally k.
We gave the value 0 to the left of each of these two text views and we assign the values 0.5 to the
lay out rate of these two takes use.
So that these two takes views can actually take the half of the linearly out horizontal.
That these two takes use are inside it.
So that's the purpose of actually assigning a value to lay out weight.
OK so so that we can actually position our components relative to other components.
OK so now let's actually.
And are there linearly out horizontal into these linearly out vertical.
OK and as you can see here we have another linearly and horizontal here and then let's drag a linearly
out vertical inside this linearly horizontal.
And let's drag another linearly out vertical inside these linearly horizontal OK.
So as you can see here we have two linear layouts vertical inside of these linearly out horizontal.
OK so now I want to actually drag a large takes you inside these are linearly out.
That is inside of this are linearly out horizontal and lets actually drag another large takes you into
this linearly vertical that is inside of this linearly and horizontally OK.
So just put it here.
So as you can see here I put another takes you inside this linearly out vertical OK.
So just select these two linear layouts and then for the layout.
Assign the value 0 and for the lay out weight assigned a values 0.5.
So as you can see here now these two linear layouts these linearly elsewheres equal and this linearly
with the call are actually taking only half of the weight of these linearly out horizontal that these
ticks views are inside it.
So as you can see here this linearly outward code is actually taking half of the width of this linearly
out is on top.
As you can see here and this linearly out vertical is actually taking a half of the V of these linearly
out horizontal.
Here as you can see and we actually put two text views inside of.
These are linearly have two articles.
So just double click on this text view here that is inside of this linearly I-30 call here.
And for the text I just delete the text of this takes you.
And for the ID just type in here ticks the index
and.
Select these this second text view and for the text delete the text of this text through and for the
ID.
Just typing here takes the value.
OK so now let's actually go back and say this main activity that job of file and then actually delete
these lines of code here that are actually related.
The options menu and here delete this block of code that is actually related to the fluting action.
But OK so now we can actually start coding here.
First of all let's actually create to test view objects.
So Takes Two takes the index to XTi index and then we need to actually put in an assignment operator.
And here we need to cast this object to our text view object find view by id our ID 30 x the index.
OK let's actually create another text view object takes the value text view find view by ID or that
ID that X the right.
OK now let's actually create two string objects strings.
All it takes the index value all it takes the index value here.
I don't actually instantiate this object.
So as you can see here I didn't assign any value to this object to this string object.
So this object inside the memory actually refers to a null value.
So strange.
All it takes the value.
Value OK.
OK so now let's actually create a constant fine on.
OK.
And here I need to specify the data type of y a constant int and I need to actually give a name to my
constant.
So I preferred to actually write my constants names by actually using capital letters.
OK the name of your constant names should be uppercase.
And I think it's a good convention in actually naming your constants.
OK.
So just step in here Len.
Underline of a.
OK.
And then I here assigned a value of 15 to this constant.
Now this actually creates an array.
So the data type of my ARA is float.
I want to actually create an array of floating point numbers.
OK so the data type of My error is flawed and because I want to actually create an array I need to actually
put a pair of brackets after my data type.
OK.
Now I need to actually give a name to my houri.
So just typing here float float numbers array and then put an assignment operator here and here I want
to actually create an array object.
New float.
And inside these brackets I need to actually specify the size of my arii.
So as you can see here I created a constant here LeDuff of Array and I assigned the value 15 to this
constant.
So inside of these brackets I can just refer to the name of this line of array constant here.
So at the size of my array is 15 I can actually assign 15 floating point numbers to disagree.
OK because I did specify that this area is going to actually accept only fifteen point fifteen our floating
point numbers.
OK but as you can see here yet I didn't assign any values to those of empty places that are inside of
this array.
I just specified that the size of this array is 15.
OK so let's actually create a for loop and inside the prentices.
Let's actually create an integer variable int index assignment operator 0.
Here I assigned the value 0 to this index valuable.
And now I need to actually specify the condition in which this loop is going to be executed.
So index less than.
And here I need to refer to the name of this array.
Float numbers are a total and so on until the value of these index variable is less than the value of
the length of this array.
This loop is going to be executed.
So here I just need to take an index plus plus and this piece of code determines of what would be the
value of this index variable every time.
This loop is actually finished executing.
And then it's going to actually check the condition in and then it's going to execute the lines of code
that are actually inside of this loop OK.
OK now you want to actually assign some values to these Arey OK.
The indexes of this.
I have a.