私はこのコミュニティだけでなく、アンドロイドの開発に慣れています。 私の研究のために、(はい/いいえ)アンケートを3つのグループに分けて作成する必要があります。質問の一部がかなり長いので、その一部を大きなテキストとして、下の他の部分を小さなものとして作りたいと思います。 dev.and.comとTabLayoutを作ったのチュートリアルから各タブのチェックボックス付きリスト
私は一瞬のために私はまた私の質問のためのLinearLayout同じ
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/LinearLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
>
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="2dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/text_large"
android:textSize="16sp">
</TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/text_small"
android:textSize="12sp">
</TextView>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="2dp"
android:gravity="right">
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/checkBxc">
</CheckBox>
</LinearLayout>
</LinearLayout>
は、すべてのグループのためになるだろうしています。
tabLayoutのコードはhere
のようなもので、AgroupActivityだけ(テスト目的のために)今のテキストの行を表示します。
レイアウトを自分の各タブのリストのようにするにはどうすればよいですか?あるいは、他にもいくつかの可能性がありますか?私が理解したように、単純なListViewは、そのタグに何も(私の場合はチェックボックス)を持つことができません?
しかし問題は、質問の横にチェックボックスが必要ですが、リストビューにはテキスト行しか格納できないということですか? – user1232884
TextView、ImageView、Checkbox ...をListViewに格納することができます。私はあなたに行を表示するためにTableLayoutを使用するカスタム行の例を示しました – PhatHV
list_rowを水平レイアウトに設定し、隣り合わせに項目を配置することができます。 – maebe