Background image android xamarin - styles

I tried to set a background image for the main activity in android (using xamarin). The image is shown in the design but when I emulate to my phone (Galaxy S4) is not show. Here is the code. What is wrong here ?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="#drawable/home"
android:scaleType="fitXY" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<GridLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:columnCount="1"
android:layout_gravity="bottom"
android:minHeight="250dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:minHeight="125dp">
<Space
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button 1"
android:layout_gravity="center" />
<Space
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Button 2" />
<Space
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:minHeight="125dp">
<Space
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button 3"
android:layout_gravity="center" />
<Space
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Button 4" />
<Space
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>
</GridLayout>
</LinearLayout>
</RelativeLayout>

It maybe to big. Show in console for error like this: Bitmap too large to be uploaded into a texture (4350x2448, max=4096x4096)
Try to put the image to drawable-nodpi
Android background image memory usage

Related

Image won't center with android:layout_centerHorizontal

my image wont center using the code "android:layout_centerHorizontal" even using gravity wont solve it. Is there any other way or are there wrong inputs in my relativelayout and scroll view.
scale layout bounds
landscape view of with scale layout bounds
screen size 768x1280 nexus api23
I am not having problems with android version 4 maybe this is api related? since my minimum sdk is android version 2?
Here is the code:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:fillViewport="true"
android:layout_height="fill_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
tools:context="com.capstone.jmilibraryapp.Login">
<EditText
android:layout_width="300dp"
android:layout_height="wrap_content"
android:id="#+id/etUsername"
android:hint="Enter Sr-Code"
android:layout_below="#+id/imageView3"
android:layout_centerHorizontal="true" />
<ImageView
android:layout_centerHorizontal="true"
android:layout_width="500dp"
android:layout_height="200dp"
android:src="#drawable/jmilogo"
android:id="#+id/imageView3"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<EditText
android:layout_width="300dp"
android:layout_height="wrap_content"
android:id="#+id/etPassword"
android:inputType="textPassword"
android:hint="Password"
android:layout_below="#+id/etUsername"
android:layout_centerHorizontal="true" />
<Button
android:layout_width="300dp"
android:layout_height="wrap_content"
android:id="#+id/bLogin"
android:text="Log In"
android:layout_below="#+id/etPassword"
android:layout_alignLeft="#+id/etPassword"
android:layout_alignStart="#+id/etPassword" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Log In as Guest"
android:id="#+id/guest"
android:layout_marginTop="20dp"
android:layout_below="#+id/bLogin"
android:layout_centerHorizontal="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Log In as Guest"
android:id="#+id/testinguser"
android:layout_marginTop="20dp"
android:layout_below="#+id/guest"
android:layout_centerHorizontal="true"
/>
</RelativeLayout>
</ScrollView>
Probably your image donĀ“t have the same ratio of your ImageView, you can check it enabling showLayoutBounds in the developer tools in the device. You will see the real size of the imageView.
To solve that you can make you ImageView to be proportionally to your ImageView or ad a scaleType="fitCenter" to your ImageView.
Try below xml this is work with me..
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerHorizontal="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="20dp"
android:orientation="vertical">
<ImageView
android:id="#+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="200dp"
android:layout_gravity="center_horizontal"
android:layout_weight="1"
android:scaleType="fitCenter"
android:src="#drawable/school" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:layout_weight="1">
<EditText
android:id="#+id/etUsername"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:hint="Enter Sr-Code" />
<EditText
android:id="#+id/etPassword"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_below="#+id/etUsername"
android:layout_centerHorizontal="true"
android:hint="Password"
android:inputType="textPassword" />
<Button
android:id="#+id/bLogin"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/etPassword"
android:layout_alignStart="#+id/etPassword"
android:layout_below="#+id/etPassword"
android:text="Log In" />
<TextView
android:id="#+id/guest"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/bLogin"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:text="Log In as Guest"
android:textAppearance="?android:attr/textAppearanceSmall"/>
<TextView
android:id="#+id/testinguser"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/guest"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:text="Log In as Guest"
android:textAppearance="?android:attr/textAppearanceSmall"/>
</RelativeLayout>
</LinearLayout>
</ScrollView>

Spinners in my layout is over lapping the text-view

Hey guys/girls Im creating a food tracker app for a class project. Where the user adds a spinner that has an array of items "food".
Problem: when the user adds 6 food in the breakfast section it over laps the next section which would be lunch. How would I fix this? I tried doing it in a listview but had problems.
content_main.xml
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="#dimen/activity_horizontal_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
app:layout_behavior="#string/appbar_scrolling_view_behavior"
tools:context=".MainActivity"
tools:showIn="#layout/activity_main">
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="49dp"
android:text="#string/breakfast"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="#+id/textView2"
android:layout_marginTop="127dp"
android:text="Lunch"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/textView3"
android:layout_marginTop="130dp"
android:paddingBottom="130dp"
android:text="#string/dinner"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_alignRight="#+id/LLL"
android:layout_alignEnd="#+id/LLL"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<LinearLayout
android:id="#+id/BLL"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1"
android:layout_below="#+id/textView2"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<Spinner
android:layout_width="240dp"
android:layout_height="37dp"
android:id="#+id/bkSpinner"
android:layout_weight="0.21"
android:entries="#array/allFoodItems" />
</LinearLayout>
<LinearLayout
android:id="#+id/LLL"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="#+id/addNewDItem"
android:layout_below="#+id/textView3"
android:orientation="vertical"
android:layout_centerHorizontal="true">
<Spinner
android:layout_width="240dp"
android:layout_height="37dp"
android:id="#+id/LSpinner"
android:layout_weight="0.21"
android:entries="#array/allFoodItems"/>
</LinearLayout>
<Button
android:id="#+id/addNewLItem"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/textView3"
android:text="#string/LButton" />
<Button
android:id="#+id/addNewDItem"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/textView4"
android:text="#string/DButton" />
<LinearLayout
android:id="#+id/DLL"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignBottom="#+id/textView4"
android:layout_alignEnd="#+id/LLL"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignRight="#+id/LLL"
android:orientation="vertical"
android:layout_below="#+id/addNewDItem">
<Spinner
android:layout_width="240dp"
android:layout_height="37dp"
android:id="#+id/dnSpinner"
android:entries="#array/allFoodItems" />
</LinearLayout>
<TextView
android:id="#+id/calories"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/total"
android:layout_alignEnd="#+id/addNewDItem"
android:layout_alignRight="#+id/addNewDItem"
android:text=""
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ff0000"
android:textSize="12dp"/>
<Button
android:id="#+id/total"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="#+id/textView4"
android:text="#string/totalCal" />
<Button
android:id="#+id/addNewBItem"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/BButton"
android:layout_column="13"
android:layout_alignTop="#+id/BLL"
android:layout_alignLeft="#+id/addNewDItem"
android:layout_alignStart="#+id/addNewDItem" />
</RelativeLayout>
design your xml 'row by row' using LinearLayout :
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="BrekFast"
android:id="#+id/textView"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Spinner
android:layout_width="240dp"
android:layout_height="37dp"
android:id="#+id/bkSpinner"
android:layout_weight="0.21"
... />
<Button
android:text="Add Breakfast"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
... />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="BrekFast"
android:id="#+id/textView2"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Spinner
android:layout_width="240dp"
android:layout_height="37dp"
android:id="#+id/bkSpinner2"
android:layout_weight="0.21"
... />
<Button
android:text="Add Breakfast"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
... />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="BrekFast"
android:id="#+id/textView3"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Spinner
android:layout_width="240dp"
android:layout_height="37dp"
android:id="#+id/bkSpinner3"
android:layout_weight="0.21"
... />
<Button
android:text="Add Breakfast"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
... />
</LinearLayout>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Calories Total"/>
</LinearLayout>
</ScrollView>

Scroll view of center aligned linear layout is wrapping top content in small resolution devices and landscape mode

Scroll view of center aligned linear layout is wrapping top content in small resolution devices as well as landscape mode too.
but when i removed the center_vertical in linear lay out it is working fine, but i want that linear layout to be in center_vertical only.
Below is my code:!
<ScrollView
android:id="#+id/bodyscrollview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:fillViewport="true" >
<LinearLayout
style="#style/app_update_alert_bg"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_gravity="center_vertical"
android:layout_marginBottom="5dp"
android:orientation="vertical" >
<TextView
style="#style/app_update_alert_bg_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/updateinfo1" />
<TextView
style="#style/app_update_alert_bg_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/updateinfo2" />
<ImageView
style="#style/margin5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="#drawable/switching_image_border"
android:src="#drawable/switching_image_sb" />
<ImageView
style="#style/margin5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="#drawable/switching_image_border"
android:src="#drawable/switching_image_ucc" />
<CheckBox
android:id="#+id/chckbox_dontshow_again"
style="#style/margin5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="#drawable/custom_checkbox"
android:text="#string/updateinfo_dontshow" />
<Button
android:id="#+id/btn_updatealert_confirmation"
style="#style/buttonStyle.signInButton"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="5dp"
android:text="OK" />
</LinearLayout>
</ScrollView>
Try this way,hope this will help you to solve your problem.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center">
<ScrollView
android:id="#+id/bodyscrollview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp">
<LinearLayout
style="#style/app_update_alert_bg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
style="#style/app_update_alert_bg_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/updateinfo1" />
<TextView
style="#style/app_update_alert_bg_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/updateinfo2"
android:layout_marginTop="5dp"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="#drawable/switching_image_border"
android:src="#drawable/switching_image_sb"
android:layout_marginTop="5dp"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="#drawable/switching_image_border"
android:src="#drawable/switching_image_ucc"
android:layout_marginTop="5dp"/>
<CheckBox
android:id="#+id/chckbox_dontshow_again"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="#drawable/custom_checkbox"
android:text="#string/updateinfo_dontshow"
android:layout_marginTop="5dp"/>
<Button
android:id="#+id/btn_updatealert_confirmation"
style="#style/buttonStyle.signInButton"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="5dp"
android:text="OK" />
</LinearLayout>
</ScrollView>
</LinearLayout>

Insert ImageView inside ListItem

I have the following code which show me a listitem with name, score, sex, age and country:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="10dip" >
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="#+id/text_user"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:textSize="16sp"
android:textStyle="bold" />
<RatingBar
android:id="#+id/ratingBar"
style="?android:attr/ratingBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="5dp"
android:numStars="5"
android:rating="2.0" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:gravity="left"
android:orientation="vertical" >
<TextView
android:id="#+id/text_last_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp" />
<TextView
android:id="#+id/text_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp" />
<TextView
android:id="#+id/text_country"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp" />
</LinearLayout>
And this code looks like:
What I want to do now is to add an image profile and show the list item like following:
How could I modify my code to adapt the imageview. I have tryied several configuration of ImageView with no succes.
Thanks
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="10dip" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<RelativeLayout
android:id="#+id/relativeLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#+id/imageView1" >
<TextView
android:id="#+id/text_user"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:textSize="16sp"
android:textStyle="bold" />
<RatingBar
android:id="#+id/ratingBar"
style="?android:attr/ratingBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="5dp"
android:numStars="5"
android:rating="2.0" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/relativeLayout1"
android:layout_marginLeft="5dp"
android:layout_toRightOf="#+id/imageView1"
android:gravity="left"
android:orientation="vertical" >
<TextView
android:id="#+id/text_last_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp" />
<TextView
android:id="#+id/text_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp" />
<TextView
android:id="#+id/text_country"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp" />
</LinearLayout>
</RelativeLayout>
Try this..

my tabs dont work what should i do (android app eclipse)

i am using eclipse to make an android app and i have added tabs to it but when i run the app all of the stuff in the tabs overlap onto one page how can i fix this, here is my code:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TabHost
android:id="#android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TabWidget
android:id="#android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:showDividers="middle"
android:tabStripEnabled="true" >
</TabWidget>
<FrameLayout
android:id="#android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:id="#+id/tab1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:text="#string/Lat" />
<TextView
android:id="#+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView1"
android:layout_below="#+id/textView1"
android:layout_marginTop="20dp"
android:text="#string/Long" />
<TextView
android:id="#+id/TextView02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/TextView01"
android:layout_below="#+id/TextView01"
android:layout_marginTop="20dp"
android:text="#string/Alt" />
<TextView
android:id="#+id/TextView06"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/TextView01"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:text="#string/Current_Lat" />
<TextView
android:id="#+id/TextView05"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/TextView02"
android:layout_alignRight="#+id/TextView06"
android:text="#string/Current_Long" />
<TextView
android:id="#+id/TextView07"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/TextView02"
android:layout_alignBottom="#+id/TextView02"
android:layout_alignRight="#+id/TextView05"
android:text="#string/Current_Alt" />
<TextView
android:id="#+id/TextView03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/TextView02"
android:layout_below="#+id/TextView02"
android:layout_marginTop="20dp"
android:text="#string/Speed" />
<TextView
android:id="#+id/TextView04"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/TextView03"
android:layout_alignBottom="#+id/TextView03"
android:layout_alignRight="#+id/TextView07"
android:text="#string/Current_Speed" />
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:text="#string/start" />
</RelativeLayout>
<LinearLayout
android:id="#+id/tab2"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</LinearLayout>
<LinearLayout
android:id="#+id/tab3"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</LinearLayout>
</FrameLayout>
</LinearLayout>
</TabHost>
</RelativeLayout>
also i am trying to put a map into my app, how would i go about doing this?

Resources