Adk Ans
Adk Ans
Adk Ans
1. Implicit Intent
Implicit Intent doesn’t specify the component. In such a case, intent provides
information on available components provided by the system that is to be invoked.
For example, you may write the following code to view the webpage.
startActivity(intent)
2. Explicit Intent
Explicit Intent specifies the component. In such a case, intent provides the
external class to be invoked.
startActivity(intent)
Drawable Folder
Layout Folder
Mipmap Folder
Values Folder
Gradle Scripts
Manifests Folder
. This file contains information about our application such as the Android version, metadata, states
package for Kotlin file, and other application components.
Java folder
The Java folder contains all the java and Kotlin source code (.java) files that we create during the
app development, including other Test files.
res/layout folder
The layout folder contains all XML layout files which we used to define the user interface
of our application. It contains the activity_main.xml file.
res/mipmap folder
This folder contains launcher.xml files to define icons that are used to show on the home screen. It
contains different density types of icons depending upon the size of the device such as hdpi, mdpi,
xhdpi.
res/values folder
Values folder contains a number of XML files like strings, dimensions, colors, and style
definitions. One of the most important files is the strings.xml file which contains the
resources.
Q . Login page
<!-- activity_login.xml -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp">
<EditText
android:id="@+id/etEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Email" />
<EditText
android:id="@+id/etPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Password"
android:inputType="textPassword" />
<Button
android:id="@+id/btnLogin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Login" />
<Button
android:id="@+id/btnCancel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
</LinearLayout>
Q . Android Activity Lifecycle methods
Method Description
onResume called when activity will start interacting with the user.