![]() ![]() You will see default icons and image files from your app, these files are generated by Android Studio when you first created your app.ĭelete those default files because we’re gonna use our own assets that you have downloaded. Now head back to our app and go to res/drawable and res/mipmap folder and expand both of it. While inside of each mipmap folder is our app launcher icons. Inside of each drawable folder contains image files that we will use for our app. I have some assets that will be used for this app and you have to download it from:Īfter you download my assets, unzip it and you’ll get list of folder like this: Buttonīutton is an Android widget that used to handle user feedback like tapping or pressing to perform an action. TextView is an Android widget that used to display text such as label, description, etc. You can display image from file, drawable, or even image online. ImageView is an Android widget that used to display image or picture. Wait until the Android Studio finish preparing your project.īefore we start writing the code, I think it might be good that you understand the basic fundamental of Android widget that we are gonna use for this app. After that give the Activity Name MainActivity like always. Give the Application Name MysteryBox and don’t forget to check the Include Kotlin Support checkbox. Open your Android Studio and choose Start a new Android Studio Project. The Kotlin version that I used is Kotlin 1.3.11. Note: In this post I used Android Studio 3.2.1 so the appearance might or might not be similar like yours and it’s okay though, but make sure you use the latest Android Studio, or if you already install it, be sure to check the latest update. As always, we’re gonna use Kotlin for this app. It’s a funny box actually and we will create it inside our app here. Some may get a good item and some may not. You won’t know what you get until you open it. Mystery Box is a box that contains unknown item. ![]() Hmm, basically we’re just gonna show a single image, text, and button inside this app, simple isn’t it? Okay then let’s get started shall we. ![]() In this tutorial we’re gonna learn about the most common Android widgets ( ImageView, TextView, and Button ) by creating a simple Mystery Box application. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |