Android Practical File
Android Practical File
• Drag and drop objects in the Layout Editor allow you to create UI components.
• Built-in support for Google Cloud Platform enabling integration with Firebase Cloud
Messaging (formerly known as ‘Google Cloud Messaging’) and Google App Engine.
system requirements
The following requirements are necessary before downloading and installing Android
Studio.
Step 2
Step 3
Step 4
Step 5
Step 6
Now, find the location where you want to install Android Studio and click "Next" to
proceed.
Step 7
Step 8
Step 9
• Android Emulator.
Android SDK construct equipment are used for constructing actual binaries of
Android App. The primary capabilities of Android SDK Build tools are built, debug, run
and take a look at Android programs. The cutting-edge model of the Android SDK
Build device is 30.0.3. While downloading or updating Android in our System, one
ought to ensure that its latest model is down load in SDK Components.
3. Android Emulator
Android SDK Platform-tools are helpful while working on Project and error messages
will be shown at the same time. It is mainly used for testing purposes. This includes:
• Android Debug Bridge (ADB), a command-line tool that helps communicate with the
device. It allows us to perform actions like Installing App and Debugging App.
• Fastboot allows you to flash the device with a new system image.
• Systrace tools help compile and manage systems. Very important for App
Debugging.
The Android SDK tool is part of the SDK tool. It has some tools and other utilities
which are important for developing Android application. It has complete Debugging
and Development tools for android.
6. SDK settings
These are numbered according to Android version. The new version of the SDK
platform has more features and is more compatible but the older version is less
compatible with fewer features. As in Android 11.0(R) it is more compatible and has
more features but below versions like Android 10.0(Q), Android4.4(KitKat) have
fewer features and not compatible it is more consistent.
7. SDK update sites
SDK Update Sites have some built-in sites to check Android SDK Updates Tools. In
this case, we need to make sure that we do not uncheck the bottom button because
these are checked by default which will check for updates if we remove it it will not
check for updates for them.
Student(){
System.out.println("this a default constructor");
}
Student Id : 0
Student Name : null
Student Id : 10
Student Name : David
1. Variable
2. Method
3. Class
The final keyword can be applied with the variables, a final variable that have no
value it is called blank final variable or uninitialized final variable. It can be initialized
in the constructor only.
OUTPUT
The static keyword in Java is specially used for reminiscence control. The static
keyword in Java is used to percentage the same variable or approach of a given
class. The customers can observe static keywords with variables, techniques, blocks,
and nested classes. The static key-word belongs to the class than an example of the
magnificence. The static keyword is used for a constant variable or a technique that
is the equal for every instance of a class.
class Student {
String name;
int rollNo
// static variable
static String cllgName;
this.rollNo = setRollNo();
}
// static method
static void setCllg(String name) { cllgName = name; }
// instance method
void getStudentInfo()
{
System.out.println("name : " + this.name);
System.out.println("rollNo : " + this.rollNo);
• src - Java source documents related to your project. This includes the Activity
"controller" documents as well as your models and helpers.
• res - Resource files related to your mission. All pics, strings, layouts, and different
resource files are saved within the aid document hierarchy below the res listing.
• res/format - XML layout documents that describe the views and layouts for each
pastime and for partial views inclusive of list objects.
• res/mipmap - most generally used for application icons. See this segment for extra
information.
• gen - Generated Java code files, this library is for Android internal use only.
• bin - Resulting utility bundle documents associated with your assignment as soon
as it’s been built.
• libs - Before the advent of Gradle construct system, this listing become used for
any secondary libraries (jars) you may want to link to your app.
The res/values folder is used to keep the values for the resources which can be used
in many Android tasks to consist of functions of coloration, patterns, dimensions etc.
Colorings.Xml: The colorings.Xml is an XML report that's used to keep the colors for
the sources. An Android project contains three essential colorings namely:
• colorPrimary
• colorPrimaryDark
• colorAccent
dimens.xml: The dimens.xml is used for defining the dimensions for different
widgets to be included in the Android project. It is a good coding practice to use
dimens.xml to define a dimension rather than just writing the dimension in the
resource, due to the fact that if ever any need arises to change the dimension,
instead of making a change to all, only the dimens.xml can be changed once and
the change is reflected in all.
The implementation of dimens.xml resource:
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="nav_header_vertical_spacing">8dp</dimen>
<dimen name="nav_header_height">176dp</dimen>
<dimen name="fab_margin">16dp</dimen>
</resources>
strings.xml: One of the most important as well as widely used values file is the
strings.xml due to its applicability in the Android project. Basic function of the
strings.xml is to define the strings in one file so that it is easy to use same string in
different positions in the android project plus it makes the project looks less messy.
The implementation of strings.xml resource:
<resources>
<string name="app_name">Workshop app</string>
styles.xml: Another important file in the values folder is the styles.xml where all the
themes of the Android project are defined. The base theme is given by default
having the option to customize or make changes to the customized theme as well.
Every theme has a parent attribute which defines the base of the theme. There are
a lot of options to choose from depending on the need of the Android project.
The implementation of styles.xml resource:
<resources>