Droid X issue, Buttons not appearing. (Android)
When running on droid X my app does not show buttons that are written in xml. I only found this after releasing my app and users reported it. This XML code does not appear on Droid X. Any ideas?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/name"
android:text="NAME"
android:textColor="#FF0000"
android:textSize="10pt"
android:maxLines="1"
android:layout_width="120dip"
android:layout_height="wrap_content"/>
<TextView
android:text=" DAY: "
android:textColor="#FF0000"
android:textSize="7pt"
android:gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/days"
android:text="DAY"
android:textColor="#FF0000"
android:textSize="7pt"
android:gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:text=" "
android:textColor="#33CC33"
android:textSize="7pt"
android:gravity="right"
android:layout_width="125dip"
android:layout_height="wrap_content"/>
<TextView
android:text="CASH: $"
android:textColor="#33CC33"
android:textSize="7pt"
android:gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/cash"
android:text="0"
android:textColor="#33CC33"
android:textSize="7pt"
android:gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<View android:layout_height="2dip"
android:layout_width="fill_parent"
android:background="#FF0000" />
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/note1"
android:text=""
android:textColor="#FF0000"
android:textSize="15dip"
android:gravity="right"
android:layout_width="wrap_content"
android:maxLines="1"
android:layout_height="wrap_content"/>
<View android:layout_height="1dip"
android:layout_width="fill_parent"
android:background="#FF0000" />
<TextView
android:id="@+id/note2"
android:maxLines="1"
android:text=""
android:textColor="#FF0000"
android:textSize="15dip"
android:gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<View android:layout_height="3dip"
android:layout_width="fill_parent"
android:background="#FF0000" />
</LinearLayout>
<include android:id="@+id/bank"
layout="@layout/bank"
android:layout_height="330dip"
android:layout_width="fill_parent"
/>
<include android:id="@+id/buysell"
layout="@layout/buysell"
android:layout_height="330dip"
android:layout_width="fill_parent"
/>
<include android:id="@+id/travel"
layout="@layout/travel"
android:layout_height="330dip"
android:layout_width="fill_parent"
/>
<include android:id="@+id/info"
layout=开发者_开发问答"@layout/info"
android:layout_height="330dip"
android:layout_width="fill_parent"
/>
<View android:layout_height="2dip"
android:layout_width="fill_parent"
android:background="#FF0000" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:id="@+id/buy_btn"
android:text="BUY/SELL"
android:textColor="#FF0000"
android:textSize="7pt"
android:gravity="right"
android:visibility="visible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/bank_btn"
android:text="BANK"
android:textColor="#FF0000"
android:textSize="7pt"
android:gravity="right"
android:visibility="visible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/move_btn"
android:text="RELOCATE"
android:textColor="#FF0000"
android:textSize="7pt"
android:visibility="visible"
android:gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/info_btn"
android:text="INFO"
android:textColor="#FF0000"
android:textSize="7pt"
android:gravity="right"
android:visibility="visible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
could a mod please edit this. i cant get the xml file to display correctly
Your xml view is still messed up, however... at the beginning of you file are you adding this into the beginning of your xml layout? xmlns:android="http://schemas.android.com/apk/res/android"
I do not see it there in the unmodified version of your xml. Try adding that into your linearlayout tag at the top of your xml and maybe that will solve your problem.
Example:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android">
</LinearLayout>
精彩评论