全幅を取っていない。これは私のfooterviewである相続人は私がリストビューFooterview
View footerView1 = View.inflate(mContext, R.layout.layout_footerview1, null);
listView1.addFooterView(footerView1);
私のListView footerviewを膨張させるのですかfooterView、すなわちボタンがmatch_parentとして幅を取っていない
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="1">
<Button
android:id="@+id/button_add_location1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_top_10"
android:layout_weight="1"
android:text="+ Add more location"
android:textColor="@color/grey3"
android:textSize="@dimen/size_15" />
</LinearLayout>
むしろそれがあります幅をwrap_contentにします。
私の結果を守るために私を助けてください。前もって感謝します。
あなたはLinearLayout' 'で単一のビューの重みを使用している理由を使用fill_parent –
ボタンのために単に 'match_parent'を使用してください。 –