0
私はlinearlayoutを使うと、私のボタンを除いてすべてが想定どおりに動作します。 relativelayoutは私のボタンが動かなくなるようにします
私は私のボタンrelativelayout使用
は...<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<Button android:id="@+id/plus"
android:background="@drawable/selector"
android:layout_width="fill_parent"
android:layout_height="75dp"
android:layout_alignParentBottom="true"
/>
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
</ListView>
<TextView android:id="@android:id/empty" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="@string/helptxt1"
/>
</RelativeLayout>
..
public void addListenerOnButton() {
final Context context = this;
button1 = (Button) findViewById(R.id.plus);
button1.setOnClickListener(new OnClickListener() {
// @Override
public void onClick(View arg0) {
createNote();
// Intent intent = new Intent(context, QuoteEdit.class);
// startActivity(intent);
}
});
}
private void createNote() {
Intent i = new Intent(this, QuoteEdit.class);
startActivityForResult(i, ACTIVITY_CREATE);
}
。リストビューは無期限に拡張でき、スクロールビュー内に配置することはできません。このため、おそらくリストビューの下にボタンを表示することはできません。 – Shellum