Kotlin and XML codes from basic for Android app development
App to display Hello World on screen.
- TextView
- TextColor
- Background Color
- TextStyle
- TextSize
App to display Text and a button to show Toast message on screen.
- TextView
- TextColor
- Background Color
- Button
App to add two numbers and show the result on screen.
- EditText
- TextView
- Button
App that can add, subtract, multipy & divide two numbers and show the result on screen.
- EditText
- TextView
- Button
- Toast Message
App that takes different inputs from user and show it on the screen.
- EditText
- TextView
- Button
shows Logs in Logcat section about start, stop, pause, resume etc.
- Override Methods
App having radioButtons that shows the text of selected option when submit button clicked.
- RadioGroup
- RadioButton
- OnClickListener
App having Image-Button in the form of grid shows Toast message on clicking.
- GridLayout
- ImageButton
- Toast Message
App that can do basic mathematics operations like add, Sub, Multiplication, division, Percentage, etc. having phone calculator like UI.
- EditText
- TextView
- Button
- epx4j library to solve expressions
- append() function
App with multiple checkBox items which shows text of selected Box in toast message when pressed submit button.
- CheckBox
- Button
- append() function
- Toast
App with multiple items in ListView which changes background Color when clicked on listView item.
- ListView
- arrayAdapter
Form app with a drop-down (Spinner) options.
- EditText
- Spinner
- Adapter
Form app with two activity which take user input in one activity and display on another using Intent.
- Intent
- EditText
- Spinner
- Adapter
App having 3 imageButton which shows Toast message when clicked on them.
- ImageButton
- Toast
Dummy Food order app with three activity in which user have to choose an item from the list in 1'st activity, fill details in 2'nd activity and it will display values on last activity.
- Views
- Custom ListView
- ScrollView
- CardView
- Layouts
- Relative Layout
- Constraint Layout
- Linear Layout
- Grid Layout
- Intent
- Spinner
- Adapter
XML Codes | Kotlin Codes | Output |
---|---|---|
1'st activity | 1'st activity | |
2'nd activity | 2'nd activity | Output Screenshot |
3'rd activity | 3'rd activity | |
Custom List item design |
App with a Dynamic button which create new View-Group when clicked on it.
- Linear Layout
- LayoutParams
- Button
App with a button which generate a snackBar(with action) when clicked on it, And when clicked on Snackbar button it shows some text on screen.
- SnackBar
- Button
App with a set of buttons for: navigating any url and opening camera, call logs, contacts, gallery & dialler using Intent.
- Intent
- Button
- EditText
App with a couple of editText, having some operations(+,-,*,/) in form of radioButton. After giving inputs and clicking on Compute Button it transfer data & shows result on another activity using intent.
- Intent
- Button
- EditText
- RadioButton
- RadioGroup
XML Codes | Kotlin Codes | Output |
---|---|---|
1'st activity | 1'st activity | |
2'nd activity | 2'nd activity | Output Screenshot |
App with a couple of buttons to open map with a default location and open provided link in default browser using implicit intent.
- Implicit Intent
- Button
App with a button which shows alert dialog box when clicked on it.
- AlertDialog
- Button
- Toast
App with a set of button which shows different type of alert dialog box when clicked on it.
- AlertDialog
- Button
- Toast
- EditText
- CheckBox
App which is used to take picture on own app using camera and display it in ImageView.
- Implicit Intent
- Button
- Toast
For permission, in manifest file add this line:
<uses-permission android:name="android.permission.CAMERA" />
App with a action bar having menu items and a button which shows Toast message when clicked on it.
- Action Bar
- menu(res folder)
- Toast
- menu item
To make menu file, right click on res folder and select New -> Android Resource Directory. Then select menu folder and click on OK. Then right click on menu folder and select New -> Menu Resource File. Then give name to menu file and click on OK.
App with a floating action button which shows an alert dialog box when clicked on it. In alert dialog box user can add contact details and it will be displayed in list view. User can also update and delete contact details.
- Floating Action Button
- AlertDialog
- ListView
- menu(res folder)
- Toast
- menu item
To make contact_menu file, right click on res folder and select New -> Android Resource Directory. Then select menu folder and click on OK. Then right click on menu folder and select New -> Menu Resource File. Then give name to menu file and click on OK.
App with a option menu having menu items and shows toast message when clicked on it.
- Option Menu
- menu(res folder)
- Toast
- menu item
To make option_menu file, right click on res folder and select New -> Android Resource Directory. Then select menu folder and click on OK. Then right click on menu folder and select New -> Menu Resource File. Then give name to menu file and click on OK.
App with a button which shows popup menu when clicked on it. It shows toast message when clicked on any menu item.
- Popup Menu
- menu(res folder)
- Toast
- menu item
To make popup_menu file, right click on res folder and select New -> Android Resource Directory. Then select menu folder and click on OK. Then right click on menu folder and select New -> Menu Resource File. Then give name to menu file and click on OK.