Wednesday, 18 September 2013

Android layout not displaying in app

Android layout not displaying in app

Hi I am trying to develop an app with menu bar on the top and display
buttons in the layout i have four layouts for four different
purposes..When i edit the XML its displaying properly in graphical layout
but when i install and view the app in phone it does not show those
buttons or any extra addition like edit text in the tabs of menu bar..Can
anyone please help me with this. Here is my xml layout
<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<EditText
android:id="@+id/username"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_x="1dp"
android:layout_y="236dp"
android:clickable="true"
android:ems="10" />
<Button
android:id="@+id/signUp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_x="4dp"
android:layout_y="154dp"
android:text="Sign up!" />
</AbsoluteLayout>
This is my XML layout which integrates the layouts
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp" />
</LinearLayout>
</TabHost>

No comments:

Post a Comment