package Ġcom . example . mi w ok app Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . graphics . Color Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . provider . User Dictionary Ċ import Ġandroid . util . Log Ċ import Ġandroid . widget . Array Adapter Ċ import Ġandroid . widget . LinearLayout Ċ import Ġandroid . widget . ListView Ċ import Ġandroid . widget . TextView Ċ Ċ class ĠNumbers Ġ: ĠAppCompatActivity () Ġ{ ĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . activity _ numbers ) ĊĊĠĠĠĠĠĠĠ Ġval ĠArray ad p ater : Word Adapter ; ĊĠĠĠĠĠĠĠ Ġval Ġnum Ġ= ĠArrayList < word >() ĊĠĠĠĠĠĠĠ Ġnum . add ( word (" one "," Ð± Ñĸ ÑĢ ", R . drawable . number _ one )) ĊĠĠĠĠĠĠĠ Ġnum . add ( word (" two "," ÐµÐº Ñĸ ", R . drawable . number _ two )) ĊĠĠĠĠĠĠĠ Ġnum . add ( word (" three "," Ò ¯ ÑĪ ", R . drawable . number _ three )) ĊĠĠĠĠĠĠĠ Ġnum . add ( word (" four "," ÑĤ Ó © ÑĢ ÑĤ ", R . drawable . number _ four )) ĊĠĠĠĠĠĠĠ Ġnum . add ( word (" five "," Ð± ÐµÑģ ", R . drawable . number _ five )) ĊĠĠĠĠĠĠĠ Ġnum . add ( word (" six "," Ð°Ð» ÑĤ Ñĭ ", R . drawable . number _ six )) ĊĠĠĠĠĠĠĠ Ġnum . add ( word (" se ven "," Ð¶ ÐµÑĤ Ñĸ ", R . drawable . number _ se ven )) ĊĠĠĠĠĠĠĠ Ġnum . add ( word (" eight "," Ñģ ÐµÐ³ Ñĸ Ð· ", R . drawable . number _ eight )) ĊĠĠĠĠĠĠĠ Ġnum . add ( word (" n ine "," ÑĤÐ¾ Ò ĵ Ñĭ Ð· ", R . drawable . number _ n ine )) ĊĠĠĠĠĠĠĠ Ġnum . add ( word (" ten "," Ð¾Ð½ ", R . drawable . number _ ten )) ĊĊĠĠĠĠĠĠĠ Ġval ĠlistView Ġ= ĠfindViewById < ListView >( R . id . list View ) ĊĠĠĠĠĠĠĠ ĠArray ad p ater Ġ= ĠWord Adapter ( ĊĠĠĠĠĠĠĠĠĠĠ Ġthis , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġnum , ĊĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ ĠlistView . adapter = ĠArray ad p ater ĊĊĊĊĊĊĊĊĊĊĊĊĊĊĊĊ ĊĊĊĊĊĊĊĊ ĊĊĊĊĊ Ċ // ĠĠĠĠĠĠĠ Ġval Ġlinear Ġ= ĠfindViewById < LinearLayout >( R . id . root ) Ċ // ĠĠĠĠĠĠĠ Ġvar Ġindex Ġ= Ġ 0 Ċ Ċ // ĠĠĠĠĠĠĠ Ġwhile Ġ( index < num . size ){ Ċ // Ċ // ĠĠĠĠĠĠĠĠĠĠĠ Ġvar ĠtextView Ġ= ĠTextView ( this ) Ċ // ĠĠĠĠĠĠĠĠĠĠĠ ĠtextView . set Padding ( 4 0 , 5 8 , 4 0 , 5 8 ) Ċ // ĠĠĠĠĠĠĠĠĠĠĠ ĠtextView . setText Size ( 1 8 . 0 F ) Ċ // ĠĠĠĠĠĠĠĠĠĠĠ ĠtextView . setText ( num [ index ]) Ċ // ĠĠĠĠĠĠĠĠĠĠĠ Ġlinear . addView ( textView ) Ċ // Ċ // ĠĠĠĠĠĠĠĠĠĠĠ Ġindex ++ Ċ // Ċ // ĠĠĠĠĠĠĠ Ġ} ĊĊĊĊ ĊĊĊĊĠĠĠ Ġ} Ċ }