NicheTech is the best web development company in India. We are offering Android live project training Ahmedabad.
MSC IT students can select Android for final sem project.
MSC IT students can also get live project training Ahmedabad.
http://www.nichetechsolutions.com/
http://www.liveprojecttraining.in/
5. If we are interested to perform the progress dialog, then
what we suppose to do is first create the instance or
object of a class named ProgressDialog class and then
after set the various properties of it.
_progressDialog = new ProgressDialog(this);
_progressDialog.setIcon(R.drawable.icon);
_progressDialog.setTitle(“Downloading files...”);
_progressDialog.setProgressStyle(ProgressDialog.STYLE_
HORIZONTAL);
Prepared By, NicheTech (C) Nichetech Com. Sol. Pvt. Ltd
6. Then set the two button .
Next is if you want to display the progress status in the
progress dialog , you need to use a Handler Object to run
the background thread.
The background thread counts up to 100, with each
count delayed by 100 milliseconds.
Prepared By, NicheTech (C) Nichetech Com. Sol. Pvt. Ltd
7. Our mobile application Android, contain zero or more
than one activity.
Using the Intents, we can navigate between activities.
Please check out the image in the next slide.
Prepared By, NicheTech (C) Nichetech Com. Sol. Pvt. Ltd
9. Write the code inside AndroidManifest.xml file
The name of the new activity added is “Activity2”.
The label for the activity is named “Activity 2”.
The intent filter name for the activity is
“net.learn2develop.ACTIVITY2”. Other activities that
wish to call this activity will invoke it via this name.
The category for the intent filter is
“android.intent.category.DEFAULT”. You need to add this
to the intent filter so that this activity can be started by
another activity using the startActivity()
method.
Prepared By, NicheTech (C) Nichetech Com. Sol. Pvt. Ltd
10. Right Click on the src folder and create new class and give
the name Activity2.
Prepared By, NicheTech (C) Nichetech Com. Sol. Pvt. Ltd
11. Create one copy of main.xml file by right click on the
res/layout folder, and click on the paste button and give
the file name activity2.xml.
Now it is the time to modify the activity2.xml file.
Prepared By, NicheTech (C) Nichetech Com. Sol. Pvt. Ltd
12. Inside the Activity2.java file write the code below
Prepared By, NicheTech (C) Nichetech Com. Sol. Pvt. Ltd
13. Here come the main file FirstBasicAndroidActivity.java
Prepared By, NicheTech (C) Nichetech Com. Sol. Pvt. Ltd
14. In the FirstBasicAndroidActivity.java file, you
implemented the onKeyDown event handler. This event
is fired whenever the user presses one of the keys on the
device.
When the user presses the center key on the directional
pad (as represented by the
KeyEvent.KEYCODE_DPAD_CENTER constant), you use
the startActivity() method to display Activity2 by creating
an instance of the Intent class and passing it the intent
filter name of Activity2 (which is
net.learn2develop.ACTIVITY2):
Prepared By, NicheTech (C) Nichetech Com. Sol. Pvt. Ltd