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