リストビューが、文字のところしかタップの反応しません。
参考
http://blog.bgbgbg.net/archives/1949
layaout_widthをmatch_parentにしているのですが、反映されていない??
listviewも、テキストビューもmatch_parentにしたのですが変わらないようです。
なぜでしょうか?
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" > <ImageView android:id="@+id/image" android:layout_width="60dip" android:layout_height="60dip" android:src="@drawable/logo" /> <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/text" android:choiceMode="singleChoice" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="名前" android:layout_marginTop="10dp" android:layout_marginLeft="10dp" /> <TextView android:id="@+id/text2" android:choiceMode="singleChoice" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="役職名" android:textSize="12sp" android:layout_marginLeft="10dp" /> </LinearLayout> </LinearLayout>
content_main.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:context="com.example.tsuyoshiokaprofile.Main" tools:showIn="@layout/activity_main" android:orientation="horizontal" android:weightSum="1"> <ListView android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/listView1" android:layout_above="@+id/button1"/> <Button android:layout_width="match_parent" android:layout_height="55dp" android:text="Button" android:id="@+id/button1" android:layout_alignParentBottom="true"/> </RelativeLayout>
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。