basic android
DESCRIPTION
Android Is the best technology for live project training. Android can change your career . Take the best Android Training Ahmedabad, you can change your career. www.LiveProjectTraining.inTRANSCRIPT
![Page 1: Basic Android](https://reader035.vdocuments.mx/reader035/viewer/2022062405/554fb81fb4c9050e7d8b46cc/html5/thumbnails/1.jpg)
Chapter 1 Basic Android
Prepared By,NicheTech
© NicheTech Com. Sol. Pvt. Ltd.http://www.nichetechsolutions.com/
![Page 2: Basic Android](https://reader035.vdocuments.mx/reader035/viewer/2022062405/554fb81fb4c9050e7d8b46cc/html5/thumbnails/2.jpg)
Various Files and Folder SRC :- Folder contain the .java extension files that means you can write you application code inside this file.
GOOGLE API 4.0:- Contain the file named android.jar
which contains all class library needed for running the android application.
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
![Page 3: Basic Android](https://reader035.vdocuments.mx/reader035/viewer/2022062405/554fb81fb4c9050e7d8b46cc/html5/thumbnails/3.jpg)
Conti… GEN:- Contains the R.java file, a compiler-generated file
that references all the resources found in your project.
Assets:- contains all the assets used by yourapplication, such as HTML, text files, databases,
etc
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
![Page 4: Basic Android](https://reader035.vdocuments.mx/reader035/viewer/2022062405/554fb81fb4c9050e7d8b46cc/html5/thumbnails/4.jpg)
Conti… res :- This folder contains all the resources used in your application.
This is the manifest file for your Android application.
Here you specify the permissions needed by your application, as well as other features (such as
intent- filters, receivers, etc.).Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
![Page 5: Basic Android](https://reader035.vdocuments.mx/reader035/viewer/2022062405/554fb81fb4c9050e7d8b46cc/html5/thumbnails/5.jpg)
Conti… MAIN.XML:-
The @string in this case refers to the strings.xml file located in the res/values folder. Hence, @string/hello refers to the hello string defined in the strings.xml file, which is “FirstBasicAndroid, MainActivity!”:
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
![Page 6: Basic Android](https://reader035.vdocuments.mx/reader035/viewer/2022062405/554fb81fb4c9050e7d8b46cc/html5/thumbnails/6.jpg)
Conti… R.JAVA
R.JAVA File using eclipse automatically generate the content, you are not suppose to modify the content of R.JAVA file
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
![Page 7: Basic Android](https://reader035.vdocuments.mx/reader035/viewer/2022062405/554fb81fb4c9050e7d8b46cc/html5/thumbnails/7.jpg)
Conti…
The Activity base class defines a series of events that
governs the life cycle of an activity. The Activityclass defines the following events: ( Check out
the next slides).
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
![Page 8: Basic Android](https://reader035.vdocuments.mx/reader035/viewer/2022062405/554fb81fb4c9050e7d8b46cc/html5/thumbnails/8.jpg)
Conti… ➤ onCreate() — Called when the activity is first created ➤ onStart() — Called when the activity becomes visible to the
user➤onResume() — Called when the activity starts interacting with the user
➤ onPause() — Called when the current activity is being paused and the previous activity isbeing resumed➤onStop() — Called when the activity is no longer visible to the user➤onDestroy() — Called before the activity is destroyed by the system (either manually or bythe system to conserve memory)➤onRestart() — Called when the activity has been stopped and is restarting again
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
![Page 9: Basic Android](https://reader035.vdocuments.mx/reader035/viewer/2022062405/554fb81fb4c9050e7d8b46cc/html5/thumbnails/9.jpg)
Apply Style & Theme In android site, user or web developer can also apply the designing .
if you apply the above designing theme then, your activity
will appear as dialog box.
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
![Page 10: Basic Android](https://reader035.vdocuments.mx/reader035/viewer/2022062405/554fb81fb4c9050e7d8b46cc/html5/thumbnails/10.jpg)
Hide the activity title If you are interested to hide the title of activity if required
WHAT YOU SUPPOSE TO DO?
import the library “ import android.view.window”;
As well as “ import android.util.Log;”
Use the requestWindowFeature() method and pass it the
Window.FEATURE_NO_TITLE constant, like this:
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
![Page 11: Basic Android](https://reader035.vdocuments.mx/reader035/viewer/2022062405/554fb81fb4c9050e7d8b46cc/html5/thumbnails/11.jpg)
Conti…
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
Your Activity title is hide now !
![Page 12: Basic Android](https://reader035.vdocuments.mx/reader035/viewer/2022062405/554fb81fb4c9050e7d8b46cc/html5/thumbnails/12.jpg)
Displaying a Dialog Window Write the code inside the main yourprojectname.java file
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
![Page 13: Basic Android](https://reader035.vdocuments.mx/reader035/viewer/2022062405/554fb81fb4c9050e7d8b46cc/html5/thumbnails/13.jpg)
Conti…
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
![Page 14: Basic Android](https://reader035.vdocuments.mx/reader035/viewer/2022062405/554fb81fb4c9050e7d8b46cc/html5/thumbnails/14.jpg)
Conti..
Out Put
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
![Page 15: Basic Android](https://reader035.vdocuments.mx/reader035/viewer/2022062405/554fb81fb4c9050e7d8b46cc/html5/thumbnails/15.jpg)
Conti…
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
![Page 16: Basic Android](https://reader035.vdocuments.mx/reader035/viewer/2022062405/554fb81fb4c9050e7d8b46cc/html5/thumbnails/16.jpg)
Thank You NicheTech Computer Solutions
http://www.liveprojecttraining.in/
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd