Professional Documents
Culture Documents
Outputs: 1813 Chavan Meet Dinesh: Practicall 4img
Outputs: 1813 Chavan Meet Dinesh: Practicall 4img
Outputs:
Aneotd emulator •
Android • Andro.d • 7T
2.36
listvieweg Practicall 4img Practica114img
4)
Hello World 7
Hello World 1
Hello World 8
10 11 12 Hello World 2
13 14 15
Hello World 9
Hello World 3
Hello World 10
Hello World 4
0 Hello World 11
Hello World 5
Hello World 12
ello World 6
Hello World 13
Hello World 7
Hello World 14
Helto World 8
Hello World 15
Mobile Application Developnwnt (226 17)
(WID.*2. usQA.
o.ve.x.azki .
.i.s usa CA-Q
oc A. O..TOas4 rnssa.,e
oc Class. .inc-ud:es
2.t..Q1ßÄ/L
3:..GßfWL.g.m.CEtJ..T.æH4.P4.Zo.eUn.ld
4.1..Qteeruug.Ä.cA.1.Tee.-.v.eßT.1cAv
GlßfrJ$.T..%..- END.
cl.nss
cXmsS... GRY.Q„
X. Exercise
(Use blank space provide for answers or attachedmore pages if needed)
1. Write a program to display following toast message.
Toast Example
Hello World.Toast Example
Show Toast
2. Write a program to display three checkboxesand one button named "Order "as
shown below. Once you click on button it should toast different selected
checkboxes along with items individual and total price.
Education
Maharashtra State Board of Technical 78
1813 Chavan Mcct I)incgh
pack»qe co•.eeet.practicaV15cvsto•,•
import
Android Emulator -
11:33
11:32
Practicall 5custom
Practicall 5custom
Hello Word. Toast
Examp:e
SHOW TOAST
SHOWTOAST
O o
manifests Code
SPIR
java version:" 1.0"
7' com meetoractica115custom <LinearLayout xnlns:android="http://schemas.android.com/apk/res/andro
MainActivtty android:
com meet, practica115custom android : layout_height- "natch_parent 'i
com meet.practicat15custom android :
lava ;generated' android:orientation:
drawable <TextView
layout "wrap_content"
android :
acttvtty_main.xml "wrap_content"
android :
custom_toast.xml
android: World, Toast Example"
mtpmap
Y values
<Button
(generated) android:
Gradle Scnpts android: "wrap_content"
build.gradle (Pt0'ect: PracticallS android :
butld.gradle (Module. Practica115 android: text:" Show
gradle-wrapper.properues (Grad
proguard-rules.pro (ProGuardRu </LinearLayout>
gradie.properties (Project Proper
LinearLayout
p Verston Control Run TODO O Problems Terminal Logcat App Inspection Build Profiler Event Log Layo•t
c Launch succeeded (a mnute ago) 271 LF ur;-e 4
ECode EISplit
version:" 1.0"
<androidx. cardview. widget. CardView
xm1ns : android="http : //schemas.android.com/apk/res/android"
android : i'
android :
android : 12Cdp"
xntns : app: "http : //schemas.android.com/apk/res-auto"
android: "2Gdp"
app :
android :
<LinearLayout
android : "match_parent"
android :
"
android :
android : orientation: J' vert
<.TextView
android: "match_parent"
android: "wrap_content 'i
for you:'
android :
android :
<TextV iew
android :
android :
android: text:" You have got nail!"
android : textSize= "18dp "
android : "
*Split
version: "1.0" encoding- nut
<LinearLayout xmtns:android="http://schemas.android.com/apk/res/android"
android : layout_width: "match _ parent "
andro id : " match_parent"
android: gravity: "center"
android : orientation: nvertical ">
<CheckBox
android : id/checkBox"
android : "wrap_content"
android : layout _height: "wrap_content"
android :
<CheckBox
android :
android: "wrap_content"
android :
android: " 20dp"
android : text:" Coffee"
<CheckBox
android : 0@+id/checkBox3"
android:
android :
android :
android:
<Button
android : "wrap_content
android :
android :
android.
android : 100dp"
Transforms
Vüew
V VersionControl Run TODO O Problems Terminal Logcat App inspection Build Profiler Event Log Layout inspector
Launch succeeded (3 minutes ago) 4 spaces
1813 Chavan Mcct I)incsh
Write a Program to display three checkboxes and show total selected toa.stmessage.
ApoCoeatActivitv (
cpp
Cyea' e(Bundle savedInstanceState) (
. qetText IOORs\n";
if(c3.
contente=c3.
ctal : *total;
Toast -makeText( context HainActivity. this, text- "Selected Items .• +content , Toast. LENGTH_LONG). show() ;
1147 11:48
mzza
Coffee
ORDER ORDER
Coffe •S(m
ZORS
Total
(Space for an€"cr«)
CC-D oc
elks.
CAFQ-o.V..
seÅQ-cleÅ
+43.
l. Write a program to display following output. Use TimePicker with Spinner Mode.
[Practica116TimePicker.app.mainl
Practica116TimePicker—activity_main.xml
app Ptxel 6 API 27
Practicall6TimePicker app main res layout activity_mam.xml
manifests version-"1.0"
java <LinearLayout xnlns:android="http://schemas.android.com/apk/res/android"
com.meet.practica116timepick
android:
C MainActivtty
android :orientation: "vert icat"
com.meet.practica116timeptck
com.meet.practica116timepick android : layout _height:" match_parent
java
> res <TimePicker
res android:id="@+id/timePicker"
Gradie Scripts android
build.gradle (Project. Practtcai16 android.
build.gradle (t.'od'J!c: Practicat16 android.• "wrap_content"
gradle-wrapper.properties (Grad <TimePicker
proguard-rules.pro(ProGuardRu
android :
gradle.propertles (Project Proper
android
settings.gradle (Pro:ect Settings)
local-properties (SDK Location) android : timePickerMode= spinner"
android. • "wrap_content "
<TimePicker
package com.meet.practicat16timepicker;
import .
(é(lverrlde
{
protected void onCreate(BundtesavedInstanceState)
super. onCreate(savedInstanceState) ;
setContentView(R.layout. activity_main) ;
timePicker) ;
TimePicker timePicker findV iewById(R.id.
timePicker. setls24HourView(true) ;
TimePicker.0nTineChangedListener()
timePicker. setOnTimeChangedListener( new
(dOverride
view, int hourOfDay,int minute) (
public void onTimeChanqed(TinePicker
int hours hourOfDay;
String
Toast .makerext( context'HainActivity. this, text: "Selected Time is: "*hour." Toast . LENGTH.SHORT). show() ;
C) Eventcog inspector
Run 1000 O proNems Termjnal E Logcat App inspection Build t". Profiler
p Versm Contre UTE-8 4 spaces
3884
Launch succeeded (2 muuÄesago)
1813 —Chavan Meet I)inesh
Write a program to display following output. Use 'limelhckcr with Spinncr Mode.
• mainl
t . set se) ;
V TOOO O Prouems Terrt€nal App Inspection Build Profiler Event Log Layt*lt
(2 tngunes ago) 56•.1LF UTF-g asoaces
12:26 12:27
12 26 14 28
12 26 12 27
11 11
10 10