Hello everyone
I would like to show process of making my birthday card application
<I will start by going> this is newly created project. I will start by going to resources
to put pictures in right folders
So ... to drawable
I will copy
this picture and to mipmap hdpi
I will copy these pictures because of their large size and resolution
And now going to Android studio, I will start editing application layout it will be based on
this schema
This picture actually will be used
but
So we have image views, text views. I will organize them using
linear layout with vertical orientation, I think that it fits this application well because
this views are placed it below the other and
Also linear layout gives us weight attribute which can be used for
dividing screen size proportionally between
views so no matter if we have landscape or portrait orientation, or if
We have small or large device nothing will be cut off the screen and proportions will be
saved so
I will start by replacing
constraint layout with
It needs layout height which will be match parent to cover whole screen
the same with
width
What is a problem here
Ah, wrong attribute
Alright so I will start with ImageView
I wanted to cover the whole width of screen so I will chose
"match_parent" for height I will use 0d because I will be using
android:layout_width attribute
For now lets set it to 0.3
<I didn't> I did not specify the orientation
Now I will actually put picture in here
I think this is it, yes this is it
Next we have textview
Also "match_parent" when it comes to width and here
<...> I will rely on
weight
This card will be written for
Let's say in some fantasy setting, for dragon so for
text I
Will use something like that
Shiny scales and lots of treasures
This text should have large font, so I will use appearance attribute
All right and
Maybe I will use.... gravity doesn't seem to work
So maybe I will think about it later
Alright, I will be setting exact
Exact weights after I put everything in here
so the next
Next are thesetwo views, so give this a place for another LinearLayout
I will also use weight attribute for it
And here will be ImageView
Now we'll be using quite fun
Width not height
Parent and for width 0dp
All right and next will text view
Here for the beam
And sorry for that this is my first videos I;m a little bit stressed
All right for image view I could use
android:scaleType
Maybe center crop
And for this image view
Fits "fitXY"
All right, so here, we don't need this LinearLayout, we have image
All right it start it starts to look like something
Maybe, maybe some background color will be helpful here
Maybe something
like this
And I think that I
Have achieved this schema here
Probably it will not look pretty on landscape orientation
But maybe next time I will create separate layout for landscape orientation
The idea was to design this layout for portrait orientation so I think that this is it oh
I forgot I almost forgot for this
I will use background
What else I could change ... oh, here is a typo in this text
That was gravity
Attribute to center text inside view
Maybe some
Color of this text could be quite pretty
And what we have here
Maybe something more like .... Oh, this I was looking before, for this colour :
And maybe we can make this
Text
This could be also smaller
And I think that my card is finished so
thanks for watching I
Apologize for my poor pronunciation and slow pace of this video, but it was really my very very first
video of this kind that I ever recorded
I hope that maybe it will help some beginners in the Udacity Android course
And that's all thanks for your time
No comments:
Post a Comment