Supporting Different Devices

Supporting Different Devices

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 needs to adapt to various device...
Android Screen Orientation

Android Screen Orientation

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 example: <activity android:name=".MainActivity"...
Getting to Know the Android User Interface

Getting to Know the Android User Interface

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 chapter, you learn the details about...
Passing Data Between Activities

Passing Data Between Activities

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 want to start. An intent contains the action...
Moving From One Activity To Another Activity

Moving From One Activity To Another Activity

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 the android:id="@+id/button" attribute to...
Adding Action Buttons In Toolbar

Adding Action Buttons In Toolbar

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="http://schemas.android.com/apk/res/android"...
Page 3 of 41234