![]() ![]() class LoginActivity : AppCompatActivity() Īnd the test will become package io.codetheworld.viewmodelunittestdemo import io. import io.mockk.* import import import org.junit. Intinya, Intent merupakan mekanisme untuk melakukan sebuah action dan komunikasi antar komponen aplikasi. Intent juga dapat membawa dan mengirimkan data ke Activity lain, bahkan ke aplikasi lain (Gmail, Google Map dsb). Step 2 Add the following code to res/layout/activitymain.xml. Intent adalah sebuah jembatan yang menghubungkan interaksi antar Activity di aplikasi Android. Step 1 Create a new project in Android Studio, go to File New Project and fill all required details to create a new project. Android Intents As the name says Intent is something that’s used to perform some action with respect to the flow of the android application. ![]() This is a simple application with LoginActivity that accepts the user enter username, password, and press Login button to log in to the application. This example demonstrates how to pass an arrayList to another activity using intents in Android Kotlin. It may not be a best practice, but I think that is enough for me and my project for now. When I tried to write unit tests for my main logic - ViewModel class, it did not work! Some articles are out of date, library versions do not match… And some kind of error that I don't know where they come from.Īnd this story is just a simple note - “How to make it work?”. Im starting off by learning the basics of Android Studio and setting. ![]() When I develop an Android application, I follow some “best practice” articles about Coroutines, LiveData, MVVM patterns… There are a lot of things that need to be catchup, especially for a backend developer like me. Excited to be taking on the 30DaysChallenge with Saumya Singh Day 1 Im diving into Android development with Kotlin. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |