点击后, 我将部件项目同步化, 我想启动细节活动( 它将发送 ID 给该活动) 。
Cursor currentCursor = dbHelper.getWidgetCursor();
for(int k=0; k < currentCursor.getCount(); k++){
currentCursor.moveToPosition(k);
RemoteViews rw = new RemoteViews(context.getPackageName(), R.layout.w_calendar_item);
Intent intentRow = new Intent(context, DetailsActivity.class);
Log.v("a", "index: "+currentCursor.getInt(currentCursor.getColumnIndex(SqlHelper.COLUMN_ID)));
intentRow.putExtra("index", currentCursor.getInt(currentCursor.getColumnIndex(SqlHelper.COLUMN_ID)));
PendingIntent pendingIntentRow = PendingIntent.getActivity(context, 1, intentRow, PendingIntent.FLAG_CANCEL_CURRENT);
rw.setOnClickPendingIntent(R.id.w_li, pendingIntentRow);
views.addView(R.id.w_list, rw);
}
我的问题是"细节活动"总是收到103号指数(这是清单中的最后一项),