This is my layout。我的問題是,該ID是「below_button」LinearLayout
無效,在手機上運行。手機沒有顯示這個LinearLayout
,但其他人的佈局是正確的。怎麼來的?爲什麼layout_below在手機上運行無效?
<?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">
<include
android:id="@+id/title"
layout="@layout/toptitlebar" />
<LinearLayout
android:id="@+id/query_detail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_below="@+id/title"
android:background="#e2dfdf"
android:layout_alignParentLeft="true">
<EditText
android:id="@+id/ram_assistinqnum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:layout_weight="0.45"
android:hint="通知書編號"
android:maxLines="1"
/>
<TextView
android:id="@+id/ram_operate_date"
style="@style/SpinnerCtl_Wrap"
android:gravity="center"
android:layout_margin="10dp"
android:layout_weight="0.45"
android:hint="操作時間"
android:textColor="@color/black"/>
<ImageView
android:id="@+id/ram_query"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="0.1"
android:src="@drawable/ram_querry"
android:layout_margin="10dp"/>
</LinearLayout>
<com.sdrcu.operatingdecisions.view.scrollabletbv.ScrollTableView4
android:id="@+id/scrollTableView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/query_detail"
/>
<LinearLayout
android:id="@+id/below_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="#e2dfdf"
android:layout_below="@+id/scrollTableView"
>
<ImageView
android:id="@+id/ram_arrow_previous"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="center"
android:layout_weight="0.3"
android:src="@drawable/ram_arrow_previous"/>
<TextView
android:id="@+id/paging"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.3"
android:gravity="center"
android:text="翻頁"
android:textColor="@color/text_blue"
android:textSize="20sp"
/>
<ImageView
android:id="@+id/ram_arrow_next"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="center"
android:layout_weight="0.3"
android:src="@drawable/ram_arrow_next"/>
<ImageView
android:id="@+id/ram_agree"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.1"
android:src="@drawable/ram_agree"/>
<ImageView
android:id="@+id/ram_disagree"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.1"
android:src="@drawable/ram_disagree"/>
</LinearLayout>
</RelativeLayout>
我沒有錯過這兩個屬性。我用這個樣式引用了SpinnerCtl_Wrap的佈局。 – Seal
@Seal我剛剛在Android設備上添加了這個佈局的「截圖」。你在Android設備上看到了相同的內容嗎? (顯然我已經註釋掉了com.sdrcu.operatingdecisions.view.scrollabletbv.ScrollTableView4,因爲我沒有這個類) –
是的,「ScrollTableView4」是我定義的類。我該怎麼做?對不起,我是一位新的Android開發者!謝謝! – Seal