On a cell phone form factor, ONLY the list fragment shows, or the detail fragment shows. Demo
this and clearly describe why it works. On a tablet or foldable, the list and detail are displayed
side by side. There is a bug in the starter project, describe what the defect(s) was(were). You
need to do this even if you build from scratch. Demo this on a large screen format (foldable,
tablet) and describe how it works differently than on a cell phone form factor Compete the
challenge provided in 6.7.1. Demo and describe how it works. Describe another way 6.7 .1 could
be achieved without creating the layout-w600dp file(hint: 6.7 .1 specifies creation of a Layout
for phone in landscape orientation.)
private class Bandadapter (private vat bandList: List( ) i vat layoutinflater - L Layoutinflater,
fren (parent, context) return BandHoldor(layoutinflater, parent) ? override fun
orbineviewHelese(helder: Banaliotder, position: ist) ( vat band = bandListtoosition] hotbec
;olnd(band) potder.iteavien.tag = bandide holder, itenview, setancuchlistener (oncucktistenor) +
override fun getitencount 0 : int 1 return bandList.sire + ) private elass BandHoldec(infloter:
Leyoutinflatec, parent: Viewlicosp?) : orivate vat nanelextviaw textvins Init 1
Create an app using the Primary/Detail pattern. You will provide a responsive app similar to
what is shown here on a cell phone form factor: And, on a foldable form factor: Finally, on a
phone in landscape mode (challenge from section Try 6.7.1) You can build from scratch or start
with the starter project provided in Canvas.
2. Aodralathanifent umi val band = baadlistiposifion] holder bind (band) botden.iteuviow.tog w
band. 20 holder , itenViow, setonclickistener (ancticklistener) sverride fun petitencount (): Int if
return bandist.aize 1) private olass Bandfolder (inflatec: Layoutinflater, parant: YiewGroupr) :
private vat nanefextvirw: Textvien indt 4 fun bind(colar: Catar) 1 naberextview, text = cotor, tant
package edu.piednont. cs. fragstuff import android, content. Context Netass Colochepositony 1
//3 ctass Cotoriepository private constructor(context: Context) if var colorlist: Nutabletistecplors
= autabletistofo) coepanion object 1 private var instance: Cotorfepository? = nutt fun
getinstance(context: Context) : Cotorkepository 1 if (instance ai nutt) i instance *
colorRedository (context) return instancell 1. init 1 val bands = context, reseurces,
getstringArroy (R,array, celecs) val descriptions = context, resources-getstmingAfroy (R. array.
desceiations) for ( i in bands, indices) i cotorlist, add (Color ( igi 1,1 , Dands[1], deseriptions [1])
)
s1.. cin: (4). Stin. erextrieons ef.. andcofd:Layout, height " "notch_parent"-., ch
android:text="getring/helto_olabk_fragment" /sw. si- endeoidiorientotions"verticat*... 4) -..
androidapedainge"sedp" caedroiax, censtraintlayout. widget, Constraintlayout selna:app
*hetp://achesas android, eos/agk/ras-aute? andreididen"endo/iten_tist,oantainer" andreid:
Lyout_nidth" "aatch.
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
On a cell phone form factor, ONLY the list fragment shows, or the .pdf
1. On a cell phone form factor, ONLY the list fragment shows, or the detail fragment shows. Demo
this and clearly describe why it works. On a tablet or foldable, the list and detail are displayed
side by side. There is a bug in the starter project, describe what the defect(s) was(were). You
need to do this even if you build from scratch. Demo this on a large screen format (foldable,
tablet) and describe how it works differently than on a cell phone form factor Compete the
challenge provided in 6.7.1. Demo and describe how it works. Describe another way 6.7 .1 could
be achieved without creating the layout-w600dp file(hint: 6.7 .1 specifies creation of a Layout
for phone in landscape orientation.)
2. private class Bandadapter (private vat bandList: List( ) i vat layoutinflater - L Layoutinflater,
fren (parent, context) return BandHoldor(layoutinflater, parent) ? override fun
orbineviewHelese(helder: Banaliotder, position: ist) ( vat band = bandListtoosition] hotbec
;olnd(band) potder.iteavien.tag = bandide holder, itenview, setancuchlistener (oncucktistenor) +
override fun getitencount 0 : int 1 return bandList.sire + ) private elass BandHoldec(infloter:
Leyoutinflatec, parent: Viewlicosp?) : orivate vat nanelextviaw textvins Init 1
Create an app using the Primary/Detail pattern. You will provide a responsive app similar to
what is shown here on a cell phone form factor: And, on a foldable form factor: Finally, on a
phone in landscape mode (challenge from section Try 6.7.1) You can build from scratch or start
with the starter project provided in Canvas.
2. Aodralathanifent umi val band = baadlistiposifion] holder bind (band) botden.iteuviow.tog w
band. 20 holder , itenViow, setonclickistener (ancticklistener) sverride fun petitencount (): Int if
return bandist.aize 1) private olass Bandfolder (inflatec: Layoutinflater, parant: YiewGroupr) :
private vat nanefextvirw: Textvien indt 4 fun bind(colar: Catar) 1 naberextview, text = cotor, tant
package edu.piednont. cs. fragstuff import android, content. Context Netass Colochepositony 1
//3 ctass Cotoriepository private constructor(context: Context) if var colorlist: Nutabletistecplors
= autabletistofo) coepanion object 1 private var instance: Cotorfepository? = nutt fun
getinstance(context: Context) : Cotorkepository 1 if (instance ai nutt) i instance *
colorRedository (context) return instancell 1. init 1 val bands = context, reseurces,
getstringArroy (R,array, celecs) val descriptions = context, resources-getstmingAfroy (R. array.
desceiations) for ( i in bands, indices) i cotorlist, add (Color ( igi 1,1 , Dands[1], deseriptions [1])
)
3. s1.. cin: (4). Stin. erextrieons ef.. andcofd:Layout, height " "notch_parent"-., ch
android:text="getring/helto_olabk_fragment" /sw. si- endeoidiorientotions"verticat*... 4) -..
androidapedainge"sedp" caedroiax, censtraintlayout. widget, Constraintlayout selna:app
*hetp://achesas android, eos/agk/ras-aute? andreididen"endo/iten_tist,oantainer" andreid:
Lyout_nidth" "aatch_parent" androstelsyout_heightereatch, perent"s? candrosdx, recyclerviea,
widget, Recyoterview android:1du"piddoand_Lst"
babdtinchass - DetailFragment,kt [PrimaryDetailColorsFRagmentLikediandsinClass.app.main]
As Oetalifragment kt Androblevintenteres Af Coloch if Detaifragment kt In tragmentedetar 17
Get thit band to froa the frogsent arguaents oreugents?. Let { colorId =1t.getInt (
ARG_COLOR_IO) }1/ Gut the setected cotor color = ColorRepository.getInstance (
requireContext O) , getColor(colorid ) 1 override fun oncreateviea(inflater: Layoutinflater,
container: Viesbroup?. savediastancestate: gundie?): Viem 1 if (color 1= nut2) 1 vat
naneTextView = cootVies. findViewByIdeTextViens (A. id. cotor.ngane) nase TextView. fext =
eqlor 11 , nate descriptionfextvient text = colorll. description descriptionTextView,
setBackgroundCotoo 6 }. return rootview )
inport agorouix, appeonpat.apg. Appcenpatactivity inpart androlt, os Aundte 1eport android .05.
Parcel fmpent andrate, os, Parselable inport asdcoiox, aavigattoo, havigation isport
ahdeoldx.navigatioo.fregaent, MavkastFragnent inport androidx, navigatioe. ul.
Apptaeconfiguration inport androidx, navigation, ui. Kavigationi cosstructer (obreet: Parcet) :
this 0 i 1 override fun writeToparcet (garcel: Parcel, flags: Int) t override fon cescribesontents() t
tet t retura 0 1 companios object ceEsTeR : Parcelable.CreatorohaseAotivity i override fun
createFreaparcex(earces: Parced): Maishetivity f retura Kaindetivity (parcet) override fun
newarray(size: int): Arraystainketivity?s if ratuen erroyefnutts (size) ) everride fun
secreate(savedisstanesstate: Bunde?) f. soper; OnCretate(asvotostancestate) setconteotviaw(R,
tayout, astivity sain)
class Folor(var id: Int =0, var nane: String =m, var descrigtion: Steing x"= )
val selectedbandid = ttenviea, toi as int vat args = Bunde() 1/ heplose tist with detorts If
(eetaitfragCantainer aviv 4 // Replece List insth dotultr Y etse 1 1/ Snew dotalts on the right , 1/
Sond berdo to Rosyetervier recvelervisw, adsoter = Handdaoter (bands, oncliekL fstanse) return
pootview peivate clast handhdapter(private vol sandisti Listecotues, Anoveterview.
Adeptenchandstotderso 0 ?