0% found this document useful (0 votes)
35 views17 pages

Android Assignment - 1

Uploaded by

dexter216003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
35 views17 pages

Android Assignment - 1

Uploaded by

dexter216003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 17
BL Assign 2 clascmate Gi) | what is Activino Fics cana Lo tifecucle Fn aa came: ! - — An attivity is the single ‘Screen in android It ig’ jike window or frame | of Java. | Android. atl vity lifecycle is controlled by Amethods ot “android -app- Activity class. | The android atHvity is the subclass | o£ conketThemewrappey clags. + | Following ave the Seven lifeuycle muthods | of android athvity + | onCreate called when activity is firstly i Created . onStomt i called when activity is becoming visible fo the use.’ OnResume + called when actvity will Stoset intwacting with the use. onPause :- called when activity 4S not visible. +o +he use. onStop :- called when activity is no. Jonge) visible to th on Restos + called affs (Zia oF Aawity——) launched 2 Aner Pe = onStasé 0) on Restartt), ey NaviIdars activity onResum0)| a App [process Acuity 1 \ted cvunnin ets atHvity g regroun ess Use rer APPS 8 on Pause t) or ighey priori ivity is no_ need memor {OQSta VI S'ETE yaa g on sto t). navig Llbisinisy’ 20 Lathu inishin or _datro: : _by the s skim aaa ROLL . | —_ G4 | Exploin Listvias wing adaploy with pf the help of eccampie | A listViao is: a type of Adaplovien * orFt)} thor displays a youtcal list of i rel Scvollable views and each View ie fo} placed one ibelowoto other, __ |) + | Using adaptey items gre tnserted into y i the” list from an arrayor datahase. + || Androfd ListView igi q ~WrewGroup thal | | is used to display the list of ‘items » t in__nultiple rows an containg an ' Gdapky Hat automatically thseat 4 the iteme into the. list . ity i + | The imain Purpose of the adapksy E is sto fetch data’ from an array ov 4 ¥ | database and insert each item that gots | placed into the list for the desired uty | esute ghia «| for displaying the ilems in the list. 0 rot yaad tle} is used. This method conjoins an adaptey with the ligt» brit 1 1 = -4] | Develop a simple android high pe an Palast ites het 4 | uses and print its reverse and Factorial. Design suitable acky | with preferred views Cwidgets) Fioenes i Activity main. xm] File: => | <2 xm) version ="l-0" encoding ="Utf-3"9) 4 Or" shraint€nd_tpEnd oF =" parent” lapp: layout __llapp: layout, conshraintHorizontal_ bia e pp: ayout conStraintStart. pStart of : app: layout _conshafntTop feTopOt = lapp: layout constrain}Vertical_ bras = "o- < TextVrew android: id= "@tid | HxtView 3" | andvoid : layout width =" wrap content andvotd + layout hefght ="w con Hunt |_androtd : layout marginTop . "246 dp" |_androfd: layout Constraint énd to endo = | “parent” || Ond-rotd « Lapp : layout conatraintStoxt toStosu OF = ee Tandrotd: Jayow height =" wrap content” | landroid : layouk marginRotton =" 22¢dp" [yy app: layout tonstraintH ovizonta| bias -"'0-a9 app: layout constraint Start ft Stars of -* app: layout compraintTop toBottomot . ee taf tug app: layous cons tuintVertical bras: "o-o¢y/ || < vesourceg CHECK <[Shtn Sting name="tyo"> Hee fs the number th reverse < [Shin tring name =“tv3"y <|string > LShing name ="pto"S ¥[ Shin bing name= “ptg"> LSbi ¥ UN Ses eM a fozicty eget in MainAcHuity fava file 3- BATS ABs ead n Bs sind Cx while Cho] = o) mem = No+}s 10 5 atue reve LOFTEM 4 mo: Mol 105 cn | String number = Inkeger- toString ev); vo -settext (anumber) 5 no: Inkqev - parselwr (vi. gerText t). tp String ()) 5 if Cao

You might also like