A text field allows the user to type text into your app. It can be either single line or multi-line. Touching a text field places the cursor and automatically displays the keyboard. In addition to typing, text fields allow for a...
The TextView view is used to display text to the user. This is the most basic view and one that you will frequently use when you develop Android applications. If you need to allow users to edit the text displayed, you should...
Android devices come in many shapes and sizes all around the world. With a wide range of device types, you have an opportunity to reach a huge audience with your app. In order to be as successful as possible on Android, your app...
The screenOrientation is the attribute of activity element. The orientation of android activity can be portrait, landscape, sensor, unspecified etc. You need to define it in the AndroidManifest.xml file. For...
What You Will Learn In This Chapter The various ViewGroups you can use to layout your views How to adapt and manage changes in screen orientation How to create the UI programmatically How to listen for UI notifications In this...
Moving From One Activity to Another Activity Start Another Activity You can start another activity within the same application by calling startActivity(), passing it an Intent that describes the activity “class name” you...
Starting Another Activity In this tutorial I will be discussing about switching between one activity to another activities. First Method :- In Android Studio, from the res/layout directory, edit the content_my.xml file. Add...
Now we need to add some action buttons in Toolbar, Let’s open menu_main.xml located under res ⇒ menu and add the search menu item as mentioned below. <menu xmlns:android="" xmlns:app="" xmlns:tools="" ...
In this tutorial we are going to learn the basic steps of Material Design development Customize the Material Color Material Design provides set of properties to customize the Material Design Color theme. But we use five primary...
After completing the previous lesson, you have an android application that shows an activity with a text field and a button. In this lesson, you’ll add some code to MainActivity that show a Toast Message when the user clicks...