Searched refs:viewModel (Results 1 – 6 of 6) sorted by relevance
/developers/samples/android/ui/graphics/PdfRendererBasic/kotlinApp/Application/src/androidTest/java/com/example/android/pdfrendererbasic/ |
D | PdfRendererBasicViewModelTest.kt | 33 private val viewModel = PdfRendererBasicViewModel( constant 38 assertThat(viewModel).isNotNull() in allPages() 39 assertThat(viewModel.pageInfo.value).isEqualTo(0 to 10) in allPages() 40 assertThat(viewModel.previousEnabled.value).isFalse() in allPages() 41 assertThat(viewModel.nextEnabled.value).isTrue() in allPages() 42 assertThat(viewModel.pageBitmap.value).isNotNull() in allPages() 43 repeat(9) { viewModel.showNext() } in allPages() 44 assertThat(viewModel.pageInfo.value).isEqualTo(9 to 10) in allPages() 45 assertThat(viewModel.previousEnabled.value).isTrue() in allPages() 46 assertThat(viewModel.nextEnabled.value).isFalse() in allPages() [all …]
|
/developers/samples/android/notification/Bubbles/app/src/test/java/com/example/android/bubbles/ui/chat/ |
D | ChatViewModelTest.kt | 42 private lateinit var viewModel: ChatViewModel in <lambda>() variable in com.example.android.bubbles.ui.chat.ChatViewModelTest 51 viewModel = ChatViewModel(ApplicationProvider.getApplicationContext(), repository) in <lambda>() 57 viewModel.setChatId(1L) in <lambda>() 58 viewModel.foreground = true in <lambda>() 59 assertThat(viewModel.contact.observedValue()).isEqualTo(dummyContacts.find { it.id == 1L }) in <lambda>() 60 assertThat(viewModel.messages.observedValue()).hasSize(2) in <lambda>() 66 viewModel.setChatId(1L) in <lambda>() 67 viewModel.send("a") in <lambda>() 68 val messages = viewModel.messages.observedValue() in <lambda>() 76 viewModel.setChatId(1L) in <lambda>() [all …]
|
/developers/samples/android/ui/graphics/PdfRendererBasic/kotlinApp/Application/src/main/java/com/example/android/pdfrendererbasic/ |
D | PdfRendererBasicFragment.kt | 45 val viewModel = ViewModelProviders.of(this).get(PdfRendererBasicViewModel::class.java) in <lambda>() constant 46 viewModel.pageInfo.observe(viewLifecycleOwner, Observer { (index, count) -> in <lambda>() 49 viewModel.pageBitmap.observe(viewLifecycleOwner, Observer { image.setImageBitmap(it) }) in <lambda>() 50 viewModel.previousEnabled.observe(viewLifecycleOwner, Observer { in <lambda>() 53 viewModel.nextEnabled.observe(viewLifecycleOwner, Observer { in <lambda>() 58 buttonPrevious.setOnClickListener { viewModel.showPrevious() } in <lambda>() 59 buttonNext.setOnClickListener { viewModel.showNext() } in <lambda>()
|
/developers/samples/android/notification/Bubbles/app/src/test/java/com/example/android/bubbles/ui/main/ |
D | MainViewModelTest.kt | 42 var viewModel: MainViewModel? = null in <lambda>() variable 44 viewModel = MainViewModel( in <lambda>() 51 return viewModel!! in <lambda>() 56 val viewModel = createViewModel() in <lambda>() constant 57 val contacts = viewModel.contacts.value in <lambda>()
|
/developers/samples/android/notification/Bubbles/app/src/main/java/com/example/android/bubbles/ui/chat/ |
D | ChatFragment.kt | 64 private lateinit var viewModel: ChatViewModel in <lambda>() variable in com.example.android.bubbles.ui.chat.ChatFragment 108 viewModel = ViewModelProviders.of(this).get(ChatViewModel::class.java) in <lambda>() 109 viewModel.setChatId(id) in <lambda>() 127 viewModel.contact.observe(viewLifecycleOwner, Observer { chat -> in <lambda>() 144 viewModel.messages.observe(viewLifecycleOwner, Observer { in <lambda>() 168 viewModel.foreground = foreground in <lambda>() 173 viewModel.foreground = false in <lambda>() 177 val contact = viewModel.contact.value ?: return in <lambda>() 189 viewModel.send(text) in <lambda>() 196 viewModel.showAsBubbleVisible.observe(viewLifecycleOwner, Observer { in <lambda>() [all …]
|
/developers/samples/android/notification/Bubbles/app/src/main/java/com/example/android/bubbles/ui/main/ |
D | MainFragment.kt | 48 val viewModel = ViewModelProviders.of(this).get(MainViewModel::class.java) in <lambda>() constant 53 viewModel.contacts.observe(viewLifecycleOwner, Observer { contacts -> in <lambda>()
|