Android Development Basic
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 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
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
Res Directory also called Resource directory where all our resource file be stored like design,layout,images,menu etc.
Layouts
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
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
– Drawable Resources
– Layout Resource
– Menu Resource
– String Resources
– Style Resource
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
Following are The Things Comes is Drawable : -
– Bitmap File
– 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.
Android Hello World Example
Start Android Studio and Create a new Project.
Select Minimum Api Level (Api Level Means Which Lowest Android Which You Want to Run That App).
Android Activity (Selecting Here Simple Empty Activity)
Android Launcher Activity Name
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 Hello World Example.
No comments:
Post a Comment