Hire everyone in this story we're going to go ahead and we're going to create a new activity called
update martial arts activity in order to allow the users to update our specific martial art objects.
That is safe to say to this database.
So here open it up for them and then offered this job for that.
And he opened this actually the first package.
Right click on it.
New activity empty activity.
So the name of this activity is going to be up date martial arts activity.
So here you can see that it's going to create a lay out for us.
It's going to generate Ali outfight for us called Actually with the Underland update Underland Marshall
Underland art.
So it is not going to be a lot of activity.
Backwards compatibility enabled the package and then click on finish.
So let's wait a little bit here.
So now that this activity is created this update activity is created.
Again we are going to design the user interface programmatically because we do not know how many art
optics are needed to be updated.
OK we do not know how many Marshall objects are saved to escalate database.
So we are going to design the user interface programmatically.
So as you can see we have this update marshal activity less publicly tried to stop here in order to
make this area a wider.
So here first of all we need to have a reference to database handler.
OK.
So inside this class update Mosteller activity.
I'm going to just type in a private database handler database handler semicolon.
Let's go into this.
Uncreate method and let's initialize this valuable database handler assignment operator new database
handler and we are going to pass the context.
So the context is going to be a great martial art activity that this right semicolon.
And here we are going to actually call the modify user interface method here again and you're going
to actually create it here.
So modify user interface modify user interface and then put up at a fancy Pattis is your semicolon.
So now let's go inside this class after the curly brace of this uncreate method and before the ending
curly brace of this class we are going to create this method because we want to.
These are designed to use an interface programmatically.
So again private.
So now let's specify the return type of the Smurfette which is void and the name of this method is modify
the user interface and then put a pair of practice's here and then open and close the Smurfette by using
these curly braces inside the Smurfit.
Let's create an array list of martial art objects so that they can hear aerialist and instead the angle
brackets we need to specify the type of the objects that we want to put inside this aerialist.
So it is martial art and the name of this actually is going into martial art objects martial art objects
assignment operator.
So here we have an instance that is actually of type database handler right.
We have a reference to the state of his handler instance so we can't say databus handler that return
all martial art objects semicolon.
And here I can say.
So let me create a new line here so that you can see this line of code there.
Now let's create an if statement so if Marshal or objects is actually that size if the number of elements
that are inside of this at a radius actually is greater than zero and then I can open and close this
if statement but using the curly braces.
So here let's create a scroll view scroll view scroll view.
Assignment operator new scroll view and inside Apprentice's meaning to press the context.
So the context is update Marshlack activity that this update Marshlack activity.
This semicolon.
Now let's create a great layout so you are already familiar with discretely out in the app.
Actually in the animal quiz app application I taught you how to use grittily out into the user interface.
Actually by using the Examen quotes but here we want to create are greatly out by using Java codes programmatically
right.
So now let's specify the name of discretely out here.
Assignment operator new grid layout and we need to pass again the context update motional activity that
this semicolon.
And here we need to specify the number of rows that we want to have inside our greedily.
So just they've been here greatly out it that sets low count.
So here for the count I can just refer to this Matia that objects that size.
OK so the number of elements that are inside of these are a list of objects is going to specify the
number of rows that we have inside are really out.
OK.
So now now actually we need to specify that number of columns that we want to have inside our great
layout.
So I can't say great lay out that sets column count OK here.
The number of column.
So the number of columns is going to be actually number 5.
We want we need a column for the ID.
The idea of the motion of the object.
We need a column for the name of the martial art object.
We need a column for that.
Actually the price of that Marshall object and we need another color for the color of that monster object.
And we also need actually another color for the button that is going to actually let the user to update
or modify that specific martial art object right.
So not just that this is our update martial art activity class.
Right.
So inside each row if you have to have five columns and are the name price color and there and a button
for actually allowing the user to update or modify that specific motion or object.
So that's why we want to have five columns inside our row.
Now let's create an array of text views because we want to put our IDs inside a text view right so that
history is going to be the representation of all of the ID of each motional object.
So I see text view and then put a pair of brackets here in order to specify that this is going to be
an array of takes views and the name of this part is going to be an ID text views ID text views assignment
operator new text view.
And then here inside the brackets I need to specify the size of this of this at a right.
I need to specify that how many elements how many actually takes use that you want to have inside array.
So if we want to have actually the number of elements of our emotional objects.
OK so much for objects that size for each monster that object we need to have an ID right because each
martial artist has a specific ID.
So we might we want to have the size of this object to be the number of elements of this arey.
So here after this line of code I can't say.
So now we want to create a two dimensional array.
Actually it is going to be an array of edit texts.
So let's create that here.
And it takes just typing here.
It takes put a pair of brackets here and put another proft brackets here.
It is going to be a two dimensional array and add a that actually contains abbes.
So now let's specify the name of these two dimensional at 8.
It is going to be EDT name's prices colors names places and colors.
It's more meaningful in this way.
Assignment operator.
So now we need to say new edit text this is going to be a two dimensional array right.
So we need to specify the size of the first at a.
OK.
The size of the elements that you want to put in in there first.
So the size is going to be again Marshall objects that size right now for the second actually.
Are they here for this one.
This is this is going to be at a site.
This big area inside is one.
So here for this one that we need to specify the exact number of elements it is going to be free.
Notice that we have names Price's colors.
So it actually takes for the name we need and it takes for the price and we need another and it takes
for the colors.
Right.
So at the end of your statement just put a semicolon here.
Let me create a new line here so that you can see this line of code better.
Now after this line of code I can't say so remember here I told you that in each row you must have a
button in order to allow the user to modify or update that specific martial art object.
So we need to also have an array of buttons.
So after this line of code I can see a button I put a pair of brackets in order to specify that this
is going to be an array of buttons and the name of this variable is going to be modified partons modify
buttons assignment operator right new button.
OK.
And inside the brackets meaning to specify the size all you need to specify the number of elements that
this area is going to hold.
So again it is going to be modular objects that size for each Marshall object if you want to have a
modified button an update button right after this and of course I can't say.
So we need to also be notified that vendor use that actually to interacts with these modify buttons.
If you want to be notified right this class should be notified.
So in order to do that first this update module activity class must implement the view that Uncle Clisson
or interface.
So just scroll to the top here it says update motional activity X pens app compact activity.
And then here just typing implements view that unclick listener because the school has now implements
this interface.
We must actually implement or we must provide an implementation for the method that we have in say the
view that we consumer interface just scroll down here and before the end in calibrates of this class
marshal activity just like in here unclick.
That's it.
Right.
So we have this unclick my faith and this method is going to be executed whenever the user interacts
with that modified button.
OK.
So if we also have this argument which is going which is the user interface component or that specific
button that is clicked or touched.
So let's go up here.
Now after descent of what inside this method right inside this modify user interface method after creating
this idea is this idea of buttons here I can't say.
So here we want to actually access the width of the screen of the user's device right.
So in order to do that you need to create a variable of type point.
So I can say point the name of this variable is going to be screen size screen size assignment operator
new point by semicolon.
Now they've been here.
Get window manager that get default display that get size and now you need to pass an argument to this
get seismic.
So that is going to assign the size of the screen to this screen size body of it.
So I'm going to actually pass this screen size to this effect.
And now this screen size variable holds there actually the size of the screen of the user's device.
So in this way I can actually access the width of this screen but let's create a value of that integer
int and then of this by the body's screen with assignment operator and I can refer to this screen size
variable which is a point that X semicolon.
Now this variable holds the width of this screen.
Let's create a counter variable so in counter as I mean operator zero semicolon.
Now let's create a for loop for.
Now I want to iterate over each marshal or object that we have inside this at least right marginal objects.
So I can say actually martial arts martial art object martial arts object.
So this is actually a valuable right now here I need to put a call in here.
And then after this call I can refer to this at a.
Martial art objects.
So you know that this fall in love here is going to actually execute for each martial artist.
This fall is going to be executed for each motion of objects that we have inside this at least.
Right.
So inside this for loop we want to populate the areas that we created here.
Look at these areas here.
So for example in number 47 We created an array of type text view here.
It takes views and they said that the number of elements that this area can accept is actually the size
of the multiple objects frailest.
Right.
Give me a specified this are here.
But we did not populated populate this area yet.
So it is for a loop here because this is going to be executed for each Monserrat object that we have
inside these multiple objects array.
And it is actually we want to create a text view for the ID of each monstrous object.
So let's refer to this right here.
All it takes to use and let's put a pair of brackets here.
So I want to go inside the index zero of this array and I want to assign a value or text view to the
index zero of this.
So index 0.
So why should I actually put index 0 here.
We actually created a variable of type counter here.
So in this way because this for loop this folly in loop here is going to be executed for each Montral
object that we have inside this at least in this way we can populate or Aurelia's or takes you actually
the artist view a.
And if we can put a text view for each Marshall object.
So instead of passing the value 0 that's passed the value counter here.
Right.
And because this counter here should be must be actually incremented after executing after each execution
of this for loop here.
Let's put it here so that we don't forget it.
So just at the design of coaches they can here a counter plus plus a.
Right now.
So for the first time that this will appear is going to be executed the first object that we have inside
is at.
Right.
This is our latest.
So now we have this counter the counter is now zero.
Right.
So if we passed it the counter here which means index number 0.
I want to pass over to assign a text view to the index number zero of this it takes views.
So assignment operator Miyu takes you right.
So here I just need to pass the context which is this one update multiple activity to this semicolon.
Let me tell you a very important point.
This is very important Pay attention here.
Look at this great out here.
We have a gradely right.
And we are going to put our great grittily out inside this scroll you village that we haven't still
put the codes in order to actually put the crudely out inside this scroll.
But for now just know that we are going to do that later and notice that we have here this line of code
in line number 44.
I said that you are going to have the size of a Marshall object that is going to be the number of elements
or the number of rows that we have inside discretely out and inside each you know we are going to have
five columns.
The first column is going to be for the ID of that Monserrat object.
Right.
So this means that here when I actually create a new text view and I put it inside the index number
zero of this ID takes viewers at a later event when I want to actually put this text view inside are
greatly out this text is going to be inside the index number one actually is that column number 1 in
so the column number one of this Goodley are automatically OK.
This process is going to be executed automatically.
So after this thing of course of not just don't vote.
If it's actually a little bit complex don't worry I'm going to explain it more in a later here.
Don't worry just like these courts here.
But if you have any questions you can post the discussion in the course or you can message me in with
me and then I do my best to answer all of your questions.
So here we created a text view and we assign it to the index counter of this idea takes use.
So here instead of saying that the name of this variable is counted let's change it to index its more
meaningful index.
Let's also change this counter to index.
And here let's say index plus plus index plus plus.
So that's it.
Now I can say so let me tell you that each text view has a gravity attribute which is going to specify
the position of the text of that takes you inside the parent.
So we have a text view which is the parent.
Right.
And we have a text inside that takes a view which is going to be the child of that takes you right.
So I want to center the text of that text view on the center at the center of the text view OK.
So I can say Id takes views and I put a pair of brackets here.
Index that set gravity write that says gravity.
And then I can say gravity with capital G that center.
That's it.
I want to center the text of that takes you inside that takes you right the habit takes you the parent.
We have the text insert atus view which is the choice.
So you want to position the child in the center at the at the center of the takes of you so that's it
gravity that's it.
So now it's time to specify the text of that takes you right.
I can see why it takes views and then they just put a pair of brackets index that said text so the text
is going to be martial art object.
So we have this martial object valuable right.
That gets a D gets.
Marshall ID and because this is of type integer they get Marshall the idea if it is going to return
a value of an integer and this takes and if it needs a value of type String we must convert this value
twice think value.
So here we just need to put up the contamination OPERATOR Two coats.
OK.
Marshall object that did that Id plus two calls.
So now it is converted to a string value.
And now we can assign it this value to the text actually a property of this ID takes you index.
So now after this line of code we need to specify actually the text actually the text that we have that
you are going to have inside this edit takes great.
This is going to be a two dimensional array.
Right.
So we need to create an edit text for the name of the monster that we need to create another edit text
for the price of that market.
And we need to create another taste for the color of that martial art.
So here you can see these two dimensional art.
Right.
I can refer to that dimension or a.
Here it is.
He names places and colors and he just put a pair of brackets.
So this is going to be the first arii.
Right.
So now we have this index here.
So if you want to go to actually index number to zero so just put poost put a value index here because
this is the first time.
For example assume that this is the first time that this for loop is going to be executed.
So we just passed the value index here and now currently the value of the index is zero right.
So I just passed the index here.
So vatos index mean he here this index.
So I told you we have an array of arrays.
Right.
So its going to go inside the first Aure inside this area here.
Index and we are going to actually go ahead and we are going to just put a pair of brackets here.
And we are going to specify.
So I told you that we have three actually which are three elements in each array here.
Right.
So this is the first array.
And inside that first array we are going to have three elements.
So the first element is going to be 0 right which is going to specify the name actually the name ID
text for their Monserrat object.
And I put an assignment operator here.
Now you edit text and I just adjacent to pass the context update marshal activity that this.
So here lets put a semicolon at the end of our statement.
Let me show you that here we created an edited X for the first A-Day and inserted a for the first element
right.
We created it we created an edit text for that here which is going to be for the name.
And that's why the name of this valuable is names prices and colors.
The name is going to be the first element.
Inside each aere the price is going to be the second element inside each area and the color is going
to be the first element inside the static.
So that's why I passed the index 0.
So I'll tell you that in programming we always count from number zero.
So after this line of code I can't say EDT names prices and coloreds just put a pair of brackets here.
So again pass the value index here.
Still we are inside.
Actually the first R8 is that the index number zero of that beach area which is going to be the first
that is right.
So now if you want to actually create another it it takes for the second element of that a which is
going to be the price.
So just put another of brackets and put number one here.
Right.
Assignment operator again new text.
Hopefully that makes sense.
It can be a little complex to actually figure out what's going on here.
But don't worry about it.
I'm going to explain it again here.
Just write these lines of code here.
And if you have actually problems always you can always opposed the discussion in the course and then
I do my best to answer all of your questions.
So what it takes.
And I just need to pass the context update martial activity that this that this semicolon.
So here we have a typo here.
So now the error is caught.
OK.
And now we need to actually create another text for the word color.
Right.
So after this line of code I can't say the names and prices and colors and just put up have brackets.
So again index and then I put a pair of brackets again and here index number two.
OK.
Assignment operator again new edit text.
So I just need to pass this context update marshal activity to this semicolon So now we created actually
free edit texts for each grade that we have inside these editing names and prices are edited edited
names prices and colors.
Right.
So we have actually a beach area that holds other areas.
So inside each tree that we have inside that area inside each R8 we are going to have three texts OK.
The first one is for the name.
The second is going to be for the price.
And the first editor he's going to be for the color of that martial art object.
So here it's time to specify the text of each edit text that we have inside these two dimensional array.
So again let me create a new line here and here I can say edit the names prices and colors and put a
pair of Ratchet's again index.
And here again put another prop brackets index number 0 because I want to specify the name right dot
set text.
So here I just need to pass the text.
So what is the text the text is going to be martial art object that gets martial art name.
That's it.
So we are inside that Arey editing names prices and colors.
This is a two dimensional array an array that holds other arrows.
You are going to go inside the index 0 of that array.
So it is going to be an add another array right.
And if you are going to go inside that array and if you are going to go inside the index number zero
of that Arey index number zero that rabbit is going to be for the name Marshall name.
And we say that said text is actually text right.
That's a text Marshall object that get Marshall that name again the same scenario for the price of that
Marshall update.
So it is names prices and color is again put a pair of brackets index.
This time we are going to insert an index number one that set text Marshall object dot and this time
I want to get the Marshall dot price right get martial art price.
So because this is going to be of type double here you need to convert this value to our string value
so I can just put a concatenation operator and two cards right.
And because inside that it the user is supposed to only enter a number not a text.
You can specify the input type of that text so I can just say it it names prices and colors and put
a pair of brackets your index again.
Index Number 1 dot set input type that set in pooch's type
inside the apprentice is it's just a pinhead input type
number.
That's just typing here.
Number type class number so in this way the user can only enter a number inside this edit text because
this is going to be the price of the martial art object.
After this line of code here we need to specify actually the text of the for the color or text for it
it takes which is for the color of that art object.
So it names places and colors index.
Just put the value index inside the first pair of brackets and again put on another pair of brackets.
And this time we are going to insert the index number two of that at a time and up and just type it
here.
That said text.
And he'll just refer to this martial art object that get martial art color.
Right.
That's it's not at the specified the text of each edit text that we have inside our two dimensional
array.
We need to specify an ID for each edit text that we're going to have inside these two dimensional array.
OK.
Because later we need to use this ID.
OK this is very important.
This must be this ID must be a unique ID.
So let me show you how you can create a unique ID for each ID text.
So here I can actually create a new line here so I can say edit the names prices and colors right.
I put a pair of brackets index and again where is the index number 0.
Because I want to specify the ID for the index for the editor that is instead of index number zero of
these two dimensional r.e.
Right.
What sets ID.
So the ID is going to be marshal or object that gets Id get ID plus 10 right.
This is going to be a unique ID.
I am referring to and getting the ID of that object and I am adding the value 10 to that value.
So this is going to be the ID of this ID text which is for that name ID text right after this line of
code.
I'm going to specify an ID for the price of that monster not so it the names prices and colors put up
that approach its index.
And now we are going to go into the index number one way to get the value that the editor that is inside
the index number one of this area.
That said Id again marshal or object that gets martial art ID.
This time we are going to add the value number 20 to this value which is going to be a unique ID.
Right.
We are not going to use the same idea here because each marshal of each text must have a unique ID.
This is very important.
So thats why I added the value 20 to this ID.
And again even to specify an ID for the color edit text so it is in names and names places and colors
put a pair of brackets index.
And here I passed the value number to that set id martial art object that get martial art ID at this
time V.A to the value of fretty to this idea here.
So it is going to generate a unique ID for the for the color of the text.
So now that we created this edit text for are actually greatly We are going to put these added text
inside the columns that we are going to have inside the rows of our greedily.
So we created edit text free edit takes actually for the name price color you specify the text of each
edit text here.
And then we specified the idea of each eritis year.
Now its time to work on the button that youre going to have inside each row.
Right so now so a lot is that we are going to have an ID which is going to be inside the first column
of our row and then we have these two dimensional array.
So which is going to have a free editor.
So the first one here the name is going to be in in the column the second column the price you're in
is going to be in the first column and the color here is going to be in the fourth column right.
And finally we are going to create a pattern that is that is going to be actually in the final column
of our row right.
So thats why we created 5 columns inside each row.
So here after these lines of code I can say modified but hands free.
I am referring to this modified pitance Arey right I put a bit of righteous index which is currently
is actually 0 for example right.
So instead of index 0 of this array we are going to create a new pattern so new pattern and that we
need to pass the context of that martial art activity toward this that's a semicolon.
So for the index 0 of these modified buttons are they are going to have a new bottom and I can't say
so here it's time to specify the text of these buttons so modify the buttons again put a pair of brackets
index Dot said text.
The text is going to be just put two coats here.
Modify and then after this line of code here.
So it's time to specify the ID of this button.
So modify buttons Zendiks that said ID.
So the idea can be marshal object that gets marshal ID here this get module it is going to actually
refer to the ID of that module object and it is going to be a unique ID.
Here we did not use this ID anywhere else inside our codes.
For example for the ID of these editors here you can see that.
Actually created a unique ID for each ID text but here for that.
But in here for that button that you are going to have for each martial art object in order to allow
the user to modify or update that Marshall object their unique ID can be at Marshall ID the ID of each
martial art.
And then at the after design of code I need to say that each BOTTEN each modified button is going to
have a listener.
Right.
So thats why we said that the update marshal that active declasse is actually implementing the view
that Uncle listen or that means that this class is going to listen to the interactions of the user with
the button.
So I can say modified buttons and I put a pair of brackets index and I can see a set of click listener.
So the president is going to be what update marshal activity to this.
So this class is going to listen to the clicks of the user of it that should be on the button on the
modified buttons index of each button.
So thats why here if you scroll down here you can see that we implemented this method here unclick.
So let's scroll to the top.
And now here inside this update using interface Meffert here and the inside is a modified user interface
Meffert after this line of code.
I can say now it's time to add these components.
For example Thisted this takes view this as it takes.
And finally the Spartan two are greatly out.
So I notice that all Gridley's is going to have rows and columns inside each row.
You're going to have columns.
So now I can't say great lay out thought at VU.
So not just that we're going to pass the child here.
Right.
So we do have different versions of this Smif at the first one only accepts the child.
The second version accepts the child and the index.
There's a further version here access the child and the width and the height of that child you are going
to have to lay out a part.
And if you have the index and the layout perhaps here for our application we are going to use the first
version of the Smurfette which is going to be the child width and height so the child is going to be
actually there.
It takes a view for the ID.
So I can't say the takes views index right come up.
So now I need to specify the width of the space for.
So there is going to be actually the I'm going to eyeball this text view I want this year which is going
to be for the ID to take only 8 percent of the vote of the screen.
So that's why we actually created a variable here in order to get their video of the screen here right
in line number 57.
So now with so here it is the screen is right screen which divided by eight.
In this way it is going to take only 8 percent of the width of the screen and for the height you want
this it takes you to be actually wrapped content.
So I can refer to this view group class view group that lay out perhaps that rap content.
So this is actually going to be a value for the height of this.
It takes your view group is going to be the parent here which actually holds this view here.
So just by just referring to this vehicle if we can just the out perhaps and the raw content.
So let me create a new line so that you can see these values better after this line of code here.
I can't say now it's time to add the first text the the name it it takes two or to greedily out.
So just I here it greatly out that at you and here just referred to that multi-dimensional Arey which
is going to be a two dimensional at a EDT names prices and colors so names prices and colors and put
a lot of brackets and forth for the first black to step in here.
Index and let's put another profe brackets here.
And here inside the brackets just put the value zero index number zero right comma.
And here I want to specify the width of this it it takes inside.
It is true.
So that is what I want.
This name it it takes to take to any 8 percent of the width of the screen so I can actually just type
in here with the screen V.
Multiplied by zero point twenty eight comma.
So not in this way it's going to actually take into.
Twenty eight percent of the width of this screen.
This is the formula.
Ok screen with multiplied by 0.2 88.
Now I just need to specify the height of this and it takes.
Is going to be wrapped content.
So I can't just type here via a group that Lay have poems that rap content.
So now let me create a new line here so that you can see these values better.
But here you can see that for the second argument here we need to pass a value of type integer.
But the result of this operation is actually of type float like float or double or decimal value.
So here I need to cast the result of this operation here.
Screen is multiplied by zero point twenty eight to an integer value.
So let's put this operation inside the apprentice's screen which multiplied by zero point eight in say
the practice is.
And before this prentices I can put another pair of practices and I can't just put a value integer here.
So in this way it's going to actually first is isn't as acute this operation here.
Screen which multiplied by zero point twenty eight.
And the result is going to be Chastity's an integer value so this means that the decimal value is going
to be actually the decimal number after the decimal is going to be actually eliminated.
So that's why it is Cester to an integer value here and now you can see that the error is gone.
So now after this line of code I can say let's add the second it takes two or Gridley out inside each
room.
Right.
So after adding the name it takes.
Now it's time to add the price it takes.
So I can't say great lay out that add value.
And again I refer to these two dimensional array.
It is the names prices and colors.
Put a pair of brackets index and again put a pair of brackets again and this time pass the value.
Number one index number one right comma.
And here I need to specify the weight of these idiots.
So I want this editor to take 25 percent of the width of the screen.
So I just put a pair of first again on it which has this value to an integer value so I just put a set
of practices here.
And again I put another pair of practices screen with multiplied by 0.25 write come on.
So this is our second argument.
And finally you need to specify the height of our text so the height is going to be the content view
group that lay out the poems that rap content.
So let me create a new line here.
Now it's time to add our color takes to our greatly.
So lay out that view and I put it here.
I just need to refer to these two dimensional area names prices and colors.
And here just put a pair of brackets index and index number one in this number two actually you are
going to go inside the next number to which is going to be for the color text comma and then here I
just need to specify which of these editors.
So again I want these it takes to take 25 percent of the vote of the screen.
So put up her Apprentice's integer and again put another pair of practices and here refers to this screen
which multiplied by zero is 0.25 0.25.
Come on.
Finally we need to specify the height which is going to be of our content group that lay out perhaps
that wrapped content.
So let me create a new line here.
So that's it.
We added our takes or it takes two or three play out.
Now it's time to add our part into our grittily out.
So here I think 25 percent can be a little bit larger a little bit a bit.
It's going to take a lot of space.
So I think let's change it to 20 percent so just typing zero point 20 percent for the for this it it
takes that you can see this one here.
Index number one which is going to be for the price of that much.
And for this one also it's better to specify that this as it takes to only take 20 percent of the vote
of the screen.
So let's just pass the values 0.20 percent which is 0.20.
So it's Greivis multiplied by 0.20 is going to actually give us that the value of the V which is going
to take only 20 percent of the VIF of this group.
So after this line of code I can't say grittily out duds at view and in here I just need to refer to
these modified buttons at a well if it turns out he just put a pair of brackets index.
So this is going to be the child that I need to specify the width of this button.
So I want this button is modified button to take 30 percent of the width of the screen.
So just refer to this screen be valuable multiplied by zero point fifty.
So because again the result of this operation is going to be off the decimal.
So let's put this operation inside the apprentice's and that here before this prentices with another
proft prentices instead of has just passed a value integer the name integer OK.
And then here finally you need to specify the height of this button which is again going to be that
content view group that lay out columns that wrap content.
So let me create a new line here again.
So now you can see these values better.
So we added all these components to our really out to be added the text view these as it takes.
And finally the button.
Right.
So now it's time to actually put more logic's here.
So not notice that.
Finally here in line number 100 we are adding one value to the value of this index here.
Right.
So now this is our For Look this is our for in loop.
After the ended curly brace of this for in loop here I want to add discretely out to our scroll view.
OK I want to add this Greenly out to our scroll view.
So here after the ending curly brace of this for loop and before the ending curly brace of this modified
user interface Smurfette here I'm going to say scroll view thought I view Great out and I can actually
say set content view scroll view right.
We are calling the set content view here this Mefford here.
So that is going to actually specify that these components are going to be on the screen and we want
the user interface to be actually created programmatically OK not by just referring to us as XML file
we are creating the user interface programmatically.
So we must call sets content to view scroll view the content view is going to be the scroll view.
And finally we need to specify that what is going to happen when the user actually clicks or touches
that modify button.
So that's why we created these Uncle Meffert inside this update Marcheline activity class.
So let's go inside the curly braces of this method here.