その1つのボタンと1つのリストビュー内で線形レイアウトを使用しています..リストビューは実行時にその項目を動的に追加しています..そのとき、ボタンはリストビューの背後にあり、表示されず、リストビューは全体に収まりますレイアウト。
リストビューの上にボタンを配置したいのですが、リストビューを読み込んだ後もそのままにしておく必要があります
前もって感謝します
私の.xmlファイルは次のとおりです。
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#000000">
<Button
android:id="@+id/btn_searchNewDevices"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dip"
android:layout_gravity="left"
android:background="#000000"
android:textColor="#FFFFFF"
android:text="Search New Devices"
/>
<ListView
android:id="@+id/lst_add_newDevices"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="horizontal" >
</ListView>
</LinearLayout>
ここに新しいデバイスの検索ボタンがあります。
そのボタンをクリックして Bluetooth を検索し、リストビューに追加します
これは私のアプリケーションで起こることです..