android ListView 实现表格如何获取到每个单元格内的值??? 用SimplieAdapter 实现了一个ListView表格, 现在要取出每个单元格内的内容,百度谷歌告诉我 只能获取到表格的行的值 取不到每个单元格的内容...论坛牛人很多,求指教....android listviewlistview 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="75dp" android:orientation="horizontal" > <RelativeLayout android:layout_width="fill_parent" android:layout_height="match_parent" > <RelativeLayout android:id="@+id/date_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="1dp" android:layout_alignParentLeft="true" > <ImageView android:id="@+id/date_image_view" android:layout_width="219dp" android:layout_height="75dp" android:layout_centerInParent="true" android:scaleType="fitXY" android:src="@drawable/bg_table" /> <TextView android:id="@+id/date_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:textColor="@android:color/white" android:textSize="30dp" /> </RelativeLayout> <RelativeLayout android:id="@+id/pre_of_breakfast_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="1dp" android:layout_marginLeft="1dp" android:layout_toRightOf="@+id/date_view" > <ImageView android:id="@+id/pre_of_breakfast_image_view" android:layout_width="110dp" android:layout_height="75dp" android:layout_centerInParent="true" android:scaleType="fitXY" android:src="@drawable/bg_table" /> <TextView android:id="@+id/pre_of_breakfast_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:textColor="@android:color/white" android:textSize="30dp" /> </RelativeLayout> <RelativeLayout android:id="@+id/post_of_breakfast_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="1dp" android:layout_marginLeft="1dp" android:layout_toRightOf="@+id/pre_of_breakfast_view" > <ImageView android:id="@+id/post_of_breakfast_image_view" android:layout_width="109dp" android:layout_height="75dp" android:layout_centerInParent="true" android:scaleType="fitXY" android:src="@drawable/bg_table" /> <TextView android:id="@+id/post_of_breakfast_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:textColor="@android:color/white" android:textSize="30dp" /> </RelativeLayout> <RelativeLayout android:id="@+id/pre_of_lunch_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="1dp" android:layout_marginLeft="1dp" android:layout_toRightOf="@+id/post_of_breakfast_view" > <ImageView android:id="@+id/pre_of_lunch_image_view" android:layout_width="110dp" android:layout_height="75dp" android:layout_centerInParent="true" android:scaleType="fitXY" android:src="@drawable/bg_table" /> <TextView android:id="@+id/pre_of_lunch_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:textColor="@android:color/white" android:textSize="30dp" /> </RelativeLayout> <RelativeLayout android:id="@+id/post_of_lunch_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="1dp" android:layout_marginLeft="1dp" android:layout_toRightOf="@+id/pre_of_lunch_view" > <ImageView android:id="@+id/post_of_lunch_image_view" android:layout_width="110dp" android:layout_height="75dp" android:layout_centerInParent="true" android:scaleType="fitXY" android:src="@drawable/bg_table" /> <TextView android:id="@+id/post_of_lunch_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:textColor="@android:color/white" android:textSize="30dp" /> </RelativeLayout> <RelativeLayout android:id="@+id/pre_of_dinner_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="1dp" android:layout_marginLeft="1dp" android:layout_toRightOf="@+id/post_of_lunch_view" > <ImageView android:id="@+id/pre_of_dinner_image_view" android:layout_width="109dp" android:layout_height="75dp" android:layout_centerInParent="true" android:scaleType="fitXY" android:src="@drawable/bg_table" /> <TextView android:id="@+id/pre_of_dinner_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:textColor="@android:color/white" android:textSize="30dp" /> </RelativeLayout> <RelativeLayout android:id="@+id/post_of_dinner_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="1dp" android:layout_marginLeft="1dp" android:layout_toRightOf="@+id/pre_of_dinner_view" > <ImageView android:id="@+id/post_of_dinner_image_view" android:layout_width="109dp" android:layout_height="75dp" android:layout_centerInParent="true" android:scaleType="fitXY" android:src="@drawable/bg_table" /> <TextView android:id="@+id/post_of_dinner_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:textColor="@android:color/white" android:textSize="30dp" /> </RelativeLayout> <RelativeLayout android:id="@+id/night_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" > <ImageView android:id="@+id/night_image_view" android:layout_width="138dp" android:layout_height="75dp" android:layout_centerInParent="true" android:layout_marginBottom="1dp" android:layout_marginLeft="1dp" android:scaleType="fitXY" android:src="@drawable/bg_table" /> <TextView android:id="@+id/night_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:textColor="@android:color/white" android:textSize="30dp" /> </RelativeLayout> </RelativeLayout></LinearLayout> <?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="75dp" android:orientation="horizontal" > <RelativeLayout android:layout_width="fill_parent" android:layout_height="match_parent" > <RelativeLayout android:id="@+id/date_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="1dp" android:layout_alignParentLeft="true" > <ImageView android:id="@+id/date_image_view" android:layout_width="219dp" android:layout_height="75dp" android:layout_centerInParent="true" android:scaleType="fitXY" android:src="@drawable/bg_table" /> <TextView android:id="@+id/date_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:textColor="@android:color/white" android:textSize="30dp" /> </RelativeLayout> <RelativeLayout android:id="@+id/pre_of_breakfast_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="1dp" android:layout_marginLeft="1dp" android:layout_toRightOf="@+id/date_view" > <ImageView android:id="@+id/pre_of_breakfast_image_view" android:layout_width="110dp" android:layout_height="75dp" android:layout_centerInParent="true" android:scaleType="fitXY" android:src="@drawable/bg_table" /> <TextView android:id="@+id/pre_of_breakfast_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:textColor="@android:color/white" android:textSize="30dp" /> </RelativeLayout> <RelativeLayout android:id="@+id/post_of_breakfast_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="1dp" android:layout_marginLeft="1dp" android:layout_toRightOf="@+id/pre_of_breakfast_view" > <ImageView android:id="@+id/post_of_breakfast_image_view" android:layout_width="109dp" android:layout_height="75dp" android:layout_centerInParent="true" android:scaleType="fitXY" android:src="@drawable/bg_table" /> <TextView android:id="@+id/post_of_breakfast_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:textColor="@android:color/white" android:textSize="30dp" /> </RelativeLayout> <RelativeLayout android:id="@+id/pre_of_lunch_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="1dp" android:layout_marginLeft="1dp" android:layout_toRightOf="@+id/post_of_breakfast_view" > <ImageView android:id="@+id/pre_of_lunch_image_view" android:layout_width="110dp" android:layout_height="75dp" android:layout_centerInParent="true" android:scaleType="fitXY" android:src="@drawable/bg_table" /> <TextView android:id="@+id/pre_of_lunch_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:textColor="@android:color/white" android:textSize="30dp" /> </RelativeLayout> <RelativeLayout android:id="@+id/post_of_lunch_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="1dp" android:layout_marginLeft="1dp" android:layout_toRightOf="@+id/pre_of_lunch_view" > <ImageView android:id="@+id/post_of_lunch_image_view" android:layout_width="110dp" android:layout_height="75dp" android:layout_centerInParent="true" android:scaleType="fitXY" android:src="@drawable/bg_table" /> <TextView android:id="@+id/post_of_lunch_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:textColor="@android:color/white" android:textSize="30dp" /> </RelativeLayout> <RelativeLayout android:id="@+id/pre_of_dinner_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="1dp" android:layout_marginLeft="1dp" android:layout_toRightOf="@+id/post_of_lunch_view" > <ImageView android:id="@+id/pre_of_dinner_image_view" android:layout_width="109dp" android:layout_height="75dp" android:layout_centerInParent="true" android:scaleType="fitXY" android:src="@drawable/bg_table" /> <TextView android:id="@+id/pre_of_dinner_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:textColor="@android:color/white" android:textSize="30dp" /> </RelativeLayout> <RelativeLayout android:id="@+id/post_of_dinner_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="1dp" android:layout_marginLeft="1dp" android:layout_toRightOf="@+id/pre_of_dinner_view" > <ImageView android:id="@+id/post_of_dinner_image_view" android:layout_width="109dp" android:layout_height="75dp" android:layout_centerInParent="true" android:scaleType="fitXY" android:src="@drawable/bg_table" /> <TextView android:id="@+id/post_of_dinner_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:textColor="@android:color/white" android:textSize="30dp" /> </RelativeLayout> <RelativeLayout android:id="@+id/night_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" > <ImageView android:id="@+id/night_image_view" android:layout_width="138dp" android:layout_height="75dp" android:layout_centerInParent="true" android:layout_marginBottom="1dp" android:layout_marginLeft="1dp" android:scaleType="fitXY" android:src="@drawable/bg_table" /> <TextView android:id="@+id/night_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:textColor="@android:color/white" android:textSize="30dp" /> </RelativeLayout> </RelativeLayout></LinearLayout>这是ListView 的样式...SimpleAdapter adapter = new SimpleAdapter(OmnylizerBsData.this, logListItem, R.drawable.list_view_item1, new String[]{ "date_text_view", "pre_of_breakfast_text_view", "post_of_breakfast_text_view", "pre_of_lunch_text_view", "post_of_lunch_text_view", "pre_of_dinner_text_view", "post_of_dinner_text_view", "night_text_view" }, new int[]{ R.id.date_text_view, R.id.pre_of_breakfast_text_view, R.id.post_of_breakfast_text_view, R.id.pre_of_lunch_text_view, R.id.post_of_lunch_text_view, R.id.pre_of_dinner_text_view, R.id.post_of_dinner_text_view, R.id.night_text_view} ); allLogListView.setAdapter(adapter); 目标效果是用户点击了单元格的内容,取出TextView里面的值... 你的list中的每个item都一样,可以自己写adapter继承BaseAdapter啊。 目标效果是用户点击了单元格的内容,取出TextView里面的值...目前只能取到用户点击所在的表格行号, 但每一行表格里面有7个TextView 取不到用户点击的那个的值... activity跳转后 service是否工作 控件复用的问题 求助如何能找到英文的android技术文档? 如何实现实时本地跟踪和绘图效果 抓狂了一晚上啊!!!! Android上Javamail的奇葩问题 安卓读取模拟GPS数据,,求大神解答 listView自动加载问题 要实现一个在andriod手机上通过“打开”按钮能读取服务器的文件 Android Studio中NDK开发C/C++代码无语法提示,无法debug或标红的问题。 cocos2d-x 2.0 iconv.h问题 android socket 两台手机通信 不用PC服务器
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="75dp"
android:orientation="horizontal" > <RelativeLayout
android:layout_width="fill_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:id="@+id/date_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_alignParentLeft="true" >
<ImageView
android:id="@+id/date_image_view"
android:layout_width="219dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" /> <TextView
android:id="@+id/date_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/pre_of_breakfast_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/date_view" >
<ImageView
android:id="@+id/pre_of_breakfast_image_view"
android:layout_width="110dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" /> <TextView
android:id="@+id/pre_of_breakfast_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/post_of_breakfast_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/pre_of_breakfast_view" >
<ImageView
android:id="@+id/post_of_breakfast_image_view"
android:layout_width="109dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" /> <TextView
android:id="@+id/post_of_breakfast_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/pre_of_lunch_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/post_of_breakfast_view" >
<ImageView
android:id="@+id/pre_of_lunch_image_view"
android:layout_width="110dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" /> <TextView
android:id="@+id/pre_of_lunch_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/post_of_lunch_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/pre_of_lunch_view" >
<ImageView
android:id="@+id/post_of_lunch_image_view"
android:layout_width="110dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" /> <TextView
android:id="@+id/post_of_lunch_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/pre_of_dinner_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/post_of_lunch_view" >
<ImageView
android:id="@+id/pre_of_dinner_image_view"
android:layout_width="109dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" /> <TextView
android:id="@+id/pre_of_dinner_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/post_of_dinner_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/pre_of_dinner_view" >
<ImageView
android:id="@+id/post_of_dinner_image_view"
android:layout_width="109dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" /> <TextView
android:id="@+id/post_of_dinner_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/night_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true" >
<ImageView
android:id="@+id/night_image_view"
android:layout_width="138dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:scaleType="fitXY"
android:src="@drawable/bg_table" /> <TextView
android:id="@+id/night_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
</RelativeLayout></LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="75dp"
android:orientation="horizontal" > <RelativeLayout
android:layout_width="fill_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:id="@+id/date_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_alignParentLeft="true" >
<ImageView
android:id="@+id/date_image_view"
android:layout_width="219dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" /> <TextView
android:id="@+id/date_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/pre_of_breakfast_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/date_view" >
<ImageView
android:id="@+id/pre_of_breakfast_image_view"
android:layout_width="110dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" /> <TextView
android:id="@+id/pre_of_breakfast_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/post_of_breakfast_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/pre_of_breakfast_view" >
<ImageView
android:id="@+id/post_of_breakfast_image_view"
android:layout_width="109dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" /> <TextView
android:id="@+id/post_of_breakfast_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/pre_of_lunch_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/post_of_breakfast_view" >
<ImageView
android:id="@+id/pre_of_lunch_image_view"
android:layout_width="110dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" /> <TextView
android:id="@+id/pre_of_lunch_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/post_of_lunch_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/pre_of_lunch_view" >
<ImageView
android:id="@+id/post_of_lunch_image_view"
android:layout_width="110dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" /> <TextView
android:id="@+id/post_of_lunch_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/pre_of_dinner_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/post_of_lunch_view" >
<ImageView
android:id="@+id/pre_of_dinner_image_view"
android:layout_width="109dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" /> <TextView
android:id="@+id/pre_of_dinner_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/post_of_dinner_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/pre_of_dinner_view" >
<ImageView
android:id="@+id/post_of_dinner_image_view"
android:layout_width="109dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" /> <TextView
android:id="@+id/post_of_dinner_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/night_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true" >
<ImageView
android:id="@+id/night_image_view"
android:layout_width="138dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:scaleType="fitXY"
android:src="@drawable/bg_table" /> <TextView
android:id="@+id/night_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
</RelativeLayout></LinearLayout>
这是ListView 的样式...SimpleAdapter adapter = new SimpleAdapter(OmnylizerBsData.this,
logListItem, R.drawable.list_view_item1, new String[]{
"date_text_view", "pre_of_breakfast_text_view", "post_of_breakfast_text_view",
"pre_of_lunch_text_view", "post_of_lunch_text_view", "pre_of_dinner_text_view",
"post_of_dinner_text_view", "night_text_view"
}, new int[]{
R.id.date_text_view, R.id.pre_of_breakfast_text_view, R.id.post_of_breakfast_text_view,
R.id.pre_of_lunch_text_view, R.id.post_of_lunch_text_view, R.id.pre_of_dinner_text_view,
R.id.post_of_dinner_text_view, R.id.night_text_view}
);
allLogListView.setAdapter(adapter);
目前只能取到用户点击所在的表格行号, 但每一行表格里面有7个TextView 取不到用户点击的那个的值...