Android Development Basic - Supercoders | Web Development and Design | Tutorial for Java, PHP, HTML, Javascript Android Development Basic - Supercoders | Web Development and Design | Tutorial for Java, PHP, HTML, Javascript

Breaking

Post Top Ad

Post Top Ad

Monday, May 28, 2018

Android Development Basic

Android Development Basic

Android Project Structure


Android Project Structure -

Before we Start to make our first Android app, we first see the basic parts of an Android application project, in order to recognize them and be able to understand them better.


AndroidManifest.xml

Androidmanifest.xml

 

AndroidManifest is A xml file Which information of our app. it contains : -

1. App Permission.
2. Our Running Activites which we have to Register in AndroidManifest.xml
3. Our Broadcaster
4. Our Receiver
5. Our Services.
 

Activities

android activity

 

The Activities are the main Java classes with a layout design file  , that contain the Android code with which we are going to develop, what do we want the application to do.

Res Directory

android res

 


Res Directory also called Resource directory where all our resource file be stored like design,layout,images,menu etc.

  

Layouts 

android layout

 

The Layouts are the xml files, that contain the Android xml code with which we are going to develop, how will our application UI look like.

Values

android values

 

The Values are Also XML file Which Contain The Values of Strings,Style, Colors in To Use them in Your App.

Following are Thing Comes in Values : -

– Animation Resources
– Color State List Resource

android color




– Drawable Resources

android drawable


– Layout Resource

android layout




– Menu Resource

android menu






– String Resources

android string



– Style Resource 

android style



Drawables 

 A drawable resource is a directory in res which contain our images,layout drawable,shapes , vector graphics.
Following are The Things Comes is Drawable : -

Bitmap File
-  A bitmap graphic file (.png, .jpg, or .gif). Creates a Bitmap Drawable.
Nine-Patch File
-  A PNG file with stretchable regions to allow image resizing based on content (.9.png). Creates a Nine Patch Drawable.
Layer List
-  A Drawable that manages an array of other Drawables. These are drawn in array order, so the element with the largest index is be drawn on top. Creates a LayerDrawable.
State List
-  An XML file that references different bitmap graphics for different states (for example, to use a different image when a button is pressed). Creates a StateListDrawable.
Level List
-  An XML file that defines a drawable that manages a number of alternate Drawables, each assigned a maximum numerical value. Creates a Level List Drawable.
Transition Drawable
-  An XML file that defines a drawable that can cross-fade between two drawable resources. Creates a Transition Drawable.
Inset Drawable
- An XML file that defines a drawable that insets another drawable by a specified distance. This is useful when a View needs a background drawble that is smaller than the View’s actual bounds.
Clip Drawable
- An XML file that defines a drawable that clips another Drawable based on this Drawable’s current level value. Creates a Clip Drawable.
Scale Drawable
-  An XML file that defines a drawable that changes the size of another Drawable based on its current level value. Creates a Scale Drawable
Shape Drawable
- An XML file that defines a geometric shape, including colors and gradients. Creates a Shape Drawable.


build.gradle

build.gradle is a file which contain information of our project library,modules,
application id,version name,version code etc.


build.gradle

 

Android Hello World Example

Start Android Studio and Create a new Project.

android hello world

 Select Minimum Api Level  (Api Level Means Which Lowest Android Which You Want to Run That App).

android  api

Android Activity (Selecting Here Simple Empty Activity)

android empty activity

Android Launcher Activity Name 

mainactivity

Android Project is Ready Now Click on Green Play Button To Run Your Android Project.

Make Sure You Created Your Emulator. 
Or Connected Your Device With USB Debugging is Permission is  (For Enable USB Debugging .
Just Go To Phone-> Setting -> About -> Click on Build Number 7 times .
 then back then you see a developer option just enable the usb debugging)

android project ready

Android Hello World Example. 

android devices
 

android hello world

No comments:

Post a Comment

Post Top Ad