package Ġorg . opp ia . app . testing Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . View Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . databinding . Data Binding Util Ċ import Ġorg . opp ia . app . R Ċ import Ġorg . opp ia . app . custom view . interaction . Fraction Input Interaction View Ċ import Ġorg . opp ia . app . custom view . interaction . Numeric Input Interaction View Ċ import Ġorg . opp ia . app . custom view . interaction . TextInput Interaction View Ċ import Ġorg . opp ia . app . databinding . Activity Input Interaction View Test Binding Ċ import Ġorg . opp ia . app . model . Interaction Ċ import Ġorg . opp ia . app . player . state . answer handling . Answer Error Category Ċ import Ġorg . opp ia . app . player . state . answer handling . Interaction Answer Error Receiver Ċ import Ġorg . opp ia . app . player . state . item view model . Fraction Interaction ViewModel Ċ import Ġorg . opp ia . app . player . state . item view model . Numeric Input ViewModel Ċ import Ġorg . opp ia . app . player . state . item view model . TextInput ViewModel Ċ import Ġorg . opp ia . app . player . state . listener . State Keyboard Button Listener Ċ Ċ /** Ċ Ġ* ĠThis Ġis Ġa Ġdummy Ġactivity Ġto Ġtest Ġinput Ġinteraction Ġviews . Ċ Ġ* ĠIt Ġcontains Ġ[ Fraction Input Interaction View ], Ġ[ Numeric Input Interaction View ], and Ġ[ TextInput Interaction View ]. Ċ Ġ*/ Ċ class ĠInput Interaction View Test Activity Ġ: ĠAppCompatActivity (), ĠState Keyboard Button Listener , ĊĠ ĠInteraction Answer Error Receiver Ġ{ ĊĠ Ġoverride Ġfun Ġon Editor Action ( action Code : ĠInt ) Ġ{ ĊĠ Ġ} ĊĊĠ Ġprivate Ġlateinit Ġvar Ġbinding : ĠActivity Input Interaction View Test Binding ĊĠ Ġlateinit Ġvar Ġfraction Interaction ViewModel : ĠFraction Interaction ViewModel ĊĠ Ġval Ġnumeric Input ViewModel Ġ= ĠNumeric Input ViewModel ( ĊĠĠĠ Ġcontext Ġ= Ġthis , ĊĠĠĠ Ġinteraction Answer Error Receiver Ġ= Ġthis ĊĠ Ġ) ĊĊĠ Ġval Ġtext Input ViewModel Ġ= ĠText Input ViewModel ( ĊĠĠĠ Ġinteraction Ġ= ĠInteraction . getDefaultInstance () ĊĠ Ġ) ĊĊĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠ Ġbinding Ġ= ĠData Binding Util . set ContentView < Activity Input Interaction View Test Binding >( ĊĠĠĠĠĠ Ġthis , ĠR . layout . activity _ input _ interaction _ view _ test ĊĠĠĠ Ġ) ĊĠĠĠ Ġfraction Interaction ViewModel Ġ= ĠFraction Interaction ViewModel ( ĊĠĠĠĠĠ Ġinteraction Ġ= ĠInteraction . getDefaultInstance (), ĊĠĠĠĠĠ Ġcontext Ġ= Ġthis , ĊĠĠĠĠĠ Ġinteraction Answer Error Receiver Ġ= Ġthis ĊĠĠĠ Ġ) ĊĠĠĠ Ġbinding . numeric Input ViewModel Ġ= Ġnumeric Input ViewModel ĊĠĠĠ Ġbinding . textInput ViewModel Ġ= Ġtext Input ViewModel ĊĠĠĠ Ġbinding . fraction Interaction ViewModel Ġ= Ġfraction Interaction ViewModel ĊĠ Ġ} ĊĊĠ Ġfun Ġget Pending Answer Error On Submit Click ( v : ĠView ) Ġ{ ĊĠĠĠ Ġfraction Interaction ViewModel . check Pending Answer Error ( Answer Error Category . SUBMIT _ TIME ) ĊĠĠĠ Ġnumeric Input ViewModel . check Pending Answer Error ( Answer Error Category . SUBMIT _ TIME ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Pending Answer Error ( ĊĠĠĠ Ġpending Answer Error : ĠString ? ĊĠ Ġ) Ġ{ ĊĠĠĠ Ġbinding . submit Button . isEnabled Ġ= Ġpending Answer Error Ġ== Ġnull ĊĠ Ġ} Ċ } Ċ