MAD Ques&Ans
MAD Ques&Ans
MAD Ques&Ans
1. What is OHA?
Ans:
1. Open Handset Alliance (OHA)
2. It is formed on 10 October 2007.
3. Created for purpose of developing open mobile device standards.
4. It has approx. 84 member companies, including HTC, Dell, Intel,
Motorola, and Google
5. Its main product is Android Platform
6. OHA members are primarily mobile operators, handset manufacturers,
software development firms, semiconductor companies and
commercialization companies.
7. Members share a commitment to expanding the commercial viability of
open platform development.
1 Beautiful UI
Android OS basic screen provides a beautiful and intuitive user interface.
Connectivity
2 GSM/EDGE, IDEN, CDMA, EV-DO, UMTS, Bluetooth, Wi-Fi, LTE, NFC,
and WiMAX.
Storage
3
SQLite, a lightweight relational database, is used for data storage purposes.
Media support
4 H.263, H.264, MPEG-4 SP, AMR, AMR-WB, AAC, HE-AAC, AAC 5.1,
MP3, MIDI, Ogg Orbis, WAV, JPEG, PNG, GIF, and BMP.
Messaging
5
SMS and MMS
Web browser
6 Based on the open-source Web Kit layout engine, coupled with Chrome's
V8 JavaScript engine supporting HTML5 and CSS3.
Multi-touch
7 Android has native support for multi-touch which was initially made
available in handsets such as the HTC Hero.
Multi-tasking
8 User can jump from one task to another and same time various application
can run simultaneously.
3. Draw and Explain Android Architecture (Draw for 2 marks, for 4/8
marks explain)
Application
Home Contact Phone Browsing
Application Framework
Activity Manager Window Manager Content Provider View System
Linux Kernel
Display Driver Camera Driver Flash Memory Driver Binder Driver
Android OS Windows OS
It doesn’t charge for any version. It charges for its original version
Executable file for the device is .jar Executable file for the devices is .apk
file file
9. Explain ADT.
Ans:
1. It’s a plugin for Eclipse IDE that is designed to give you powerful,
integrated environment in which to build Android Application.
<TableRow
android:id="@+id/tableRow1"
android:layout_width="match_parent"
android:layout_height="69dp"
android:background="#F8F5F5"
android:textAlignment="textStart"
android:visibility="visible"
tools:visibility="visible">
<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Row1" />
</TableRow>
<TableRow
android:id="@+id/tableRow2"
android:layout_width="168dp"
android:layout_height="69dp"
android:layout_marginTop="100dp"
android:background="#EFF0F4"
android:visibility="visible"
tools:visibility="visible">
<Button
android:id="@+id/button4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Row 2 Col 1" />
</TableRow>
<TableRow
android:layout_width="229dp"
android:layout_height="69dp"
android:layout_marginStart="180dp"
android:layout_marginTop="100dp"
android:background="#FFFFFF"
android:visibility="visible"
tools:visibility="visible">
<Button
android:id="@+id/button3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Row 2 Col 2" />
</TableRow>
<TableRow
android:layout_width="93dp"
android:layout_height="69dp"
android:layout_marginStart="10dp"
android:layout_marginTop="200dp"
android:background="#F9F9FA"
android:visibility="visible"
tools:visibility="visible">
<Button
android:id="@+id/button5"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Row 3 Col 2" />
</TableRow>
<TableRow
android:layout_width="93dp"
android:layout_height="69dp"
android:layout_marginStart="160dp"
android:layout_marginTop="200dp"
android:background="#F1F2F6"
android:visibility="visible"
tools:visibility="visible">
<Button
android:id="@+id/button6"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Row 3 Col 2" />
</TableRow>
<TableRow
android:layout_width="93dp"
android:layout_height="69dp"
android:layout_marginStart="310dp"
android:layout_marginTop="200dp"
android:background="#EFF0F6"
android:visibility="visible"
tools:visibility="visible">
<Button
android:id="@+id/button7"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Row 3 Col 3" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="69dp"
android:layout_marginTop="300dp"
android:background="#F0F1F4"
android:visibility="visible"
tools:visibility="visible">
<Button
android:id="@+id/button8"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Row 4" />
</TableRow>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
14. Develop an Android Application to place Name, age, Mobile on
screen using Absolute Layout.
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F8F5F5"
tools:context=".MainActivity">
<TextView
android:id="@+id/textView2"
android:layout_width="129dp"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:layout_marginTop="50dp"
android:layout_padding="40dp"
android:text="Name:"
android:textSize="35dp" />
<TextView
android:id="@+id/textView3"
android:layout_width="129dp"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="100dp"
android:layout_padding="40dp"
android:text="Age:"
android:textSize="35dp" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:layout_marginTop="150dp"
android:layout_padding="40dp"
android:text="Phone No:"
android:textSize="35dp" />
<EditText
android:id="@+id/editTextTextPersonName"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginStart="200dp"
android:layout_marginTop="50dp"
android:ems="10"
android:inputType="textPersonName"
android:textSize="20dp"
android:text="Name" />
<EditText
android:id="@+id/editTextTextPersonName2"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginStart="200dp"
android:layout_marginTop="100dp"
android:ems="10"
android:inputType="number"
android:textSize="20dp"
android:text="Age" />
<EditText
android:id="@+id/editTextTextPersonName3"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginStart="200dp"
android:layout_marginTop="150dp"
android:ems="10"
android:inputType="phone"
android:textSize="20dp"
android:text="phone No" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
15. Develop App to write Hello World.
Ans:
1. Manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.tutorialspoint7.myapplication">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"
/>
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
2. Java File.
package com.example.helloworld;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:padding="@dimen/padding_medium"
android:text="@string/hello_world"
tools:context=".MainActivity" />
</RelativeLayout>
TextView
1
This control is used to display text to the user.
EditText
2 EditText is a predefined subclass of TextView that includes rich
editing capabilities.
AutoCompleteTextView
3 The AutoCompleteTextView is a view that is similar to EditText,
except that it shows a list of completion suggestions automatically
while the user is typing.
Button
4 A push-button that can be pressed, or clicked, by the user to perform
an action.
ImageButton
5 An ImageButton is an AbsoluteLayout which enables you to specify
the exact location of its children. This shows a button with an image
(instead of text) that can be pressed or clicked by the user.
CheckBox
6 An on/off switch that can be toggled by the user. You should use
check box when presenting users with a group of selectable options
that are not mutually exclusive.
ToggleButton
7
An on/off button with a light indicator.
RadioButton
8
The RadioButton has two states: either checked or unchecked.
RadioGroup
9
A RadioGroup is used to group together one or more RadioButtons.
ProgressBar
10 The ProgressBar view provides visual feedback about some ongoing
tasks, such as when you are performing a task in the background.
Spinner
11
A drop-down list that allows users to select one value from a set.
TimePicker
12 The TimePicker view enables users to select a time of the day, in
either 24-hour mode or AM/PM mode.
DatePicker
13
The DatePicker view enables users to select a date of the day.