Monday, July 28, 2014

How to Make Tabs in Android



1. Click the Windows 'Start' button and type 'eclipse' in the search text box. Press 'Enter' to open a list of Eclipse files. Double-click 'eclipse.exe' to open and start the Eclipse development software.

2. Eclipse opens to the most recently used project. Open the project you want to edit, then double-click the XML file for your Android app layout. Click 'Designer' to view the layout's visual design.

3. Click the 'XML Code' tab. Android uses XML to set up the layout and determine the tab's size and text. A Layout XML node is automatically created, but you must manually add all the tabs you need for the layout.

4. Add the tabs for the layout. The following code is an example of a tab layout with two tabs:

5. Save the new file and click the 'Run' button in the main Eclipse toolbar. The file runs on the computer in the Android emulator installed in the Eclipse environment. After the emulator runs, you see your Android app button. Click the button to review your tab layout.

No comments:

Post a Comment