<?xml version="1.0" encoding="utf-8"?>
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="#000000"
android:text="@string/number"/>
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="#000000"
android:text="@string/force"/>
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="#000000"
android:text="@string/angle"/>
<!-- 添加一个ListView控件 -->
<ListView
android:id="@+id/lv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
android:id="@+id/bt5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/bt5"
/>
朋友,能把你的代码理清楚一点吗。。。。。
<?xml version="1.0" encoding="utf-8"?> android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:layout_width="100dp"
android:layout_height="wrap_content"
android:textColor="#000000"
android:text="@string/number"
android:layout_alignParentTop="true"/>
android:layout_width="100dp"
android:layout_height="wrap_content"
android:textColor="#000000"
android:text="@string/force"
android:layout_alignParentTop="true"/>
android:layout_width="100dp"
android:layout_height="wrap_content"
android:textColor="#000000"
android:text="@string/angle"
android:layout_alignParentTop="true"/>
<ListView
android:id="@+id/lv"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
android:id="@+id/bt5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/bt5"
/>
首先,看这段代码好费劲。。。
上面的textview不显示,是你的水平的linearLayout的宽度设置的是wrapcontent,加上你textview设置的weight属性有冲突了,肯定显示不出来。你把水平的linearLayout的宽度设置为matchparent就能显示,或者设置一个固定的值。
接下来,下面的button没有显示,原因不太清楚,可能是你listview数据多了,把button挤到屏幕外,而且你又不支持滑动,所以没显示。
朋友就不能好好给全代码吗,连内外层的布局都不明白,这里没法帮你
看你的代码 很费劲啊