开发者

Design view problem in .xml file with gallery

i can only see the gallery view..any help please?

<?xml version="1.0" encoding="utf-8"?>

<ScrollView
 xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
      and开发者_运维百科roid:background="@drawable/back"
      android:orientation="vertical"

>
<RelativeLayout
 android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  >


 <Button  android:id="@+id/btn1"
   android:layout_width="wrap_content"
android:layout_height="81px"
    android:background="#aa0000"
    android:layout_marginTop="30px"
       android:textColor="#dcd3b6"
                    android:layout_weight="1"       

    /> <Button  android:id="@+id/btn2"
   android:layout_width="wrap_content"
android:layout_height="81px"
    android:background="#aa0000"
    android:layout_marginTop="30px"
       android:textColor="#dcd3b6"
        android:layout_below="@id/btn1"
                    android:layout_weight="1"       

    />

     <Button  android:id="@+id/btn4"
   android:layout_width="wrap_content"
android:layout_height="81px"
    android:background="#aa0000"
    android:layout_marginTop="30px"
       android:textColor="#dcd3b6"
        android:layout_below="@id/btn2"
                    android:layout_weight="1"       

    />

    <Gallery 
    android:id="@+id/gallery"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_below="@id/btn4"

/>

</RelativeLayout>

</ScrollView>


You declare your buttons as android:layout_width="wrap_content" but you don't use android:text="whatever" on that button, so your button will have a width of 0

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜