Android tutorial Part 2 working with Buttons Edittext and arithmetic operators by Ukvalley

android tutorial part 2:
Workiing with buttons Edittext and arithmetic operators

Android Button Example
android button
Android Button represents a push-button. The android.widget.Button is subclass of TextView class and CompoundButton is the subclass of Button class.

There are different types of buttons in android such as RadioButton, ToggleButton, CompoundButton etc.

Here, we are going to create two textfields and one button for sum of two numbers. If user clicks button, sum of two input values is displayed on the Toast.

Drag the component or write the code for UI in activity_main.xml
First of all, drag 2 textfields from the Text Fields palette and one button from the Form Widgets palette as shown in the following figure.
The generated code for the ui components will be like this:
Activity class
Now write the code to display the sum of two numbers.

File: MainActivity.java

22 SUPER FOOD HACKS & TRICKS

22 great food tips and tricks you can use in your home kitchen.

1. Shakey cutting board DIY fix
2. Oreo pop simple fun recipe
3. How to close a crisp packet hack
4. How to open a jar simple trick
5. Nutella and banana sandwich fun recipe
6. Jelly bears DIY recipe
7. Chocolate mint leaves trick
8. Simple tomato peeling hack
9. Easy poached egg hack! cant go wrong
10. Chocolate writing
11. Coca cola cake, crazy but tasty.
12. Spider sausages trick, fun food 🙂
13. Easy French toast hack!
14. Simple salad dressing tip
15. Delicious stuffed baguette trick
16. Easy homemade croissant hack!
17. Food substitution for eggs
18. Food substitution for chocolate
19. Food substitution for breadcrumbs
20. Food substitution for baking powder
21. Simple crisp packet bowl hack!
22. New apple pie recipe making the apple the pie!

hope you enjoy these cooking tricks that will make your time in the kitchen easier if you did enjoy them and want to see more check out these videos here:
https://www.youtube.com/watch?v=BZiQiiGfAeA&list=PLRlsPGYi1jsc9YLYsl2zjaOY3O0VUCEZ2

also, follow us on our youtube channel for more videos:
https://www.youtube.com/channel/UCmefVEskU8lrtQV5t2bwe7w/

Channel: Simple Tricks & Hacks
Published: 2018-02-26 14:41:01
Duration: 12M50S
Views: 297440
Likes: 1627
Favorites: 0

Database Design Tutorial

Database Design Tutorial utilizing Visio and Microsoft SQL Server Express 2014. This is an introduction to database design through the first three normal forms.
Channel: GoSparker
Published: 2016-01-09 23:38:33
Duration: 17M10S
Views: 194888
Likes: 605
Favorites: 0

Best Makeup Transformations 2018 | New Makeup Tutorials Compilation

★ Don’t forget like, comment & subscribe! THANK YOU SO MUCH!
Channel: Beauty Tricks
Published: 2018-01-30 13:04:26
Duration: 10M9S
Views: 3412420
Likes: 26516
Favorites: 0

Trick to remember Trigonometry Values-PALM TRICK [In Hindi]

Please watch: “Cell and its Types| Lucent GK | for SSC and RAILWAY [IN HINDI]”
https://www.youtube.com/watch?v=NtCdmmitqhY
-~-~~-~~~-~~-~-

In this video i am explaining a very fantastic trick to remember Trigonometry values very easily.After this you dont have to mug up the values.You just need your palm thats it.

FOLLOW ME MY FACEBOOK PAGE- https://www.facebook.com/MDSACADEMY6/

• RAILWAY GK QUESTION & ANSWER-https://www.youtube.com/playlist?list=PLLEJ2IKrIGS595oB34jgAvFvG20AMmDoR

• BIOLOGY MCQs FOR SSC & RAILWAY EXAMS-https://www.youtube.com/playlist?list=PLLEJ2IKrIGS5vggHOybEaMHqe7ycWR4i0

• ONE WORD SUBSTITUTION FOR SSC CGL|CHSL|CPO-https://www.youtube.com/playlist?list=PLLEJ2IKrIGS668rFbEQu8KzbGhvxBfl6Q

• ENGLISH COMMON ERROR DETECTION-https://www.youtube.com/playlist?list=PLLEJ2IKrIGS6393CCVVNA9POq1pF6Krtf

• PHYSICS MCQs-https://www.youtube.com/playlist?list=PLLEJ2IKrIGS7oKxlBdcCQvs303rfXvOk6

• ACTIVE PASSIVE TRICKS FOR SSC EXAM-https://www.youtube.com/playlist?list=PLLEJ2IKrIGS6tkcFtaoUAXKTZAkwTbc1-

• DIRECT INDIRECT SPEECH TRICKS FOR SSC EXAM-https://www.youtube.com/playlist?list=PLLEJ2IKrIGS6V6RrOBbeb76Pb6GpGijWV

Channel: MDS ACADEMY
Published: 2017-02-02 19:26:39
Duration: 6M49S
Views: 1124397
Likes: 20749
Favorites: 0

Android Tutorials: GUI Designing part 3 by Ukvalley: Android Training Institute in nashik

In this chapter we will look at the different UI components of android screen. This chapter also covers the tips to make a better UI design and also explains how to design a UI.

UI screen components
A typical user interface of an android application consists of action bar and the application content area.

Main Action Bar
View Control
Content Area
Split Action Bar
These components have also been shown in the image below −

Anroid UI Tutorial
Understanding Screen Components
The basic unit of android application is the activity. A UI is defined in an xml file. During compilation, each element in the XML is compiled into equivalent Android GUI class with attributes represented by methods.

View and ViewGroups
An activity is consist of views. A view is just a widget that appears on the screen. It could be button e.t.c. One or more views can be grouped together into one GroupView. Example of ViewGroup includes layouts.

Types of layout
There are many types of layout. Some of which are listed below −

Linear Layout
Absolute Layout
Table Layout
Frame Layout
Relative Layout
Linear Layout
Linear layout is further divided into horizontal and vertical layout. It means it can arrange views in a single column or in a single row. Here is the code of linear layout(vertical) that includes a text view.

AbsoluteLayout
The AbsoluteLayout enables you to specify the exact location of its children. It can be declared like this.

TableLayout
The TableLayout groups views into rows and columns. It can be declared like this.

RelativeLayout
The RelativeLayout enables you to specify how child views are positioned relative to each other.It can be declared like this.

FrameLayout
The FrameLayout is a placeholder on screen that you can use to display a single view. It can be declared like this.

Apart form these attributes, there are other attributes that are common in all views and ViewGroups. They are listed below −

Sr.No View & description
1
layout_width

Specifies the width of the View or ViewGroup

2
layout_height

Specifies the height of the View or ViewGroup

3
layout_marginTop

Specifies extra space on the top side of the View or ViewGroup

4
layout_marginBottom

Specifies extra space on the bottom side of the View or ViewGroup

5
layout_marginLeft

Specifies extra space on the left side of the View or ViewGroup

6
layout_marginRight

Specifies extra space on the right side of the View or ViewGroup

7
layout_gravity

Specifies how child Views are positioned

8
layout_weight

Specifies how much of the extra space in the layout should be allocated to the View

Units of Measurement
When you are specifying the size of an element on an Android UI, you should remember the following units of measurement.

Sr.No Unit & description
1
dp

Density-independent pixel. 1 dp is equivalent to one pixel on a 160 dpi screen.

2
sp

Scale-independent pixel. This is similar to dp and is recommended for specifying font sizes

3
pt

Point. A point is defined to be 1/72 of an inch, based on the physical screen size.

4
px

Pixel. Corresponds to actual pixels on the screen

Screen Densities
Sr.No Density & DPI
1
Low density (ldpi)

120 dpi

2
Medium density (mdpi)

160 dpi

3
High density (hdpi)

240 dpi

4
Extra High density (xhdpi)

320 dpi

Optimizing layouts
Here are some of the guidelines for creating efficient layouts.

Avoid unnecessary nesting
Avoid using too many Views
Avoid deep nesting

Channel: Umesh Khivasara
Published: 2018-03-08 08:23:19
Duration: 37M51S
Views: 15
Likes: 2
Favorites: 0

Leave a Reply

Your email address will not be published. Required fields are marked *