我有一个 TableRow,单击时会打开一个新活动:
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:stretchColumns = "1"
android:shrinkColumns = "1">
<TableRow
android:id="@+id/tableRow1"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:gravity="center_vertical">
//content
</TableRow>
TableRow row1 = (TableRow) item.findViewById(R.id.tableRow1);
row1.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Log.i("click detected", "yes");
Bundle bundle = new Bundle();
bundle.putString("noticeID",String.valueOf(data[pos].getID()));
bundle.putString("title",data[pos].getTitle());
Intent newIntent = new Intent(activity, ReadNotice.class);
newIntent.putExtras(bundle);
}
});
Log写好了,但是新的Activity没有打开,是不是漏了什么?