In this post I will be discussing about the different view layouts in an android mobile application. The six different layouts are 1. Linear Layout 2. Relative Layout 3. Table Layout 4. Grid View 5. Tab Layout 6. List View
In Android user interface is displayed through an activity. In Android app development you might face situations where you need to switch between one Activity (Screen/View) to another. In this tutorial I will be discussing about switching between one Activity to another and sending data between activities.
In this post we need three separate activities for three tab screens. So let’s get started by creating a simple project by opening eclipse IDE. 1. Create a new project File -> New -> Android Project and give activity name as AndroidTabLayoutActivity. 2. Open your AndroidTabLayoutActivity and extend the class from TabActivity.
In android application menu is one of the important user interface entity which provides some action options for a particular view. In this tutorial i am discussing about creating android menus.
In this tutorial we are creating a simple menu with 6 menu items. On clicking on single menu item a simple Toast message will be shown.
1. Create a new project File ⇒ New ⇒ Android Project and give activity name as AndroidMenusActivity.
2. Now create an XML file under res/layout folder and name it as menu.xml.
3. Open menu.xml file and type following code. In the following code we are creating a single menu with 6 menu items. Each menu item has an icon and title for display the label under menu icon. Also we have id for each menu item to identify uniquely.
Creating alert dialog is very easy. In this tutorial i will be discussing about 1) Creating different alert dialogues with one button(ok button), 2) Two buttons(yes or no buttons) 3) Three buttons(yes, no and cancel buttons).Android alert dialog with One button,The following code will create a simple alert dialog with one button.
To achieve login/registration screen design I am merging multiple android layouts. I placed Scroll View as a parent element. This Scroll View makes your screen scroll in vertical direction to avoid hiding exceeding objects on the screen. Inside scroll view I placed Relative View. The main reason for using Relative View is to make footer always stick at the bottom. Finally I am using Linear Layouts for placing Header, Form and Footer. See the following diagram to get an idea about the layouts I used.
In most of the android applications it is essential that app may need to connect to internet and make some HTTP requests. In this article i’ll be demonstrating about making simple HTTP Requests in android.Below are the code snippets to handle HTTP requests.Creating HTTP Client and HTTP Post
In this tutorial i will be demonstrating how to build simple android ListView. This article is about creating listview and launching new activity on selecting single list item. Let’s get start by creating a project in Eclipse IDE. 1. Create a new project by going to File ⇒ New Android Project. Fill all the details and name your activity as AndroidListViewActivity. 2. Once the project is created open your main activity java file (in this case AndroidListViewActivity.java) and extend the class from ListActivity.
Android provides several ways to store user and app data. SQLite is one way of storing user data. SQLite is a very light weight database which comes with Android OS. In this tutorial I’ll be discussing how to write classes to handle all SQLite operations.