由于某种原因,当我使用呼叫时,结果始终返回为0。我要做的就是弹出选择框,然后完成选择后,用户将命中后按钮。有人知道我可能会犯什么错误吗?

通话活动:

Intent i = new Intent(this, Selection.class);
Log.d("Front-End", "Launching Activity");
startActivityForResult(i, SELECTION);

调用活动:

bundle.putStringArray("selections", selected_array);
Intent resultIntent = new Intent();
resultIntent.putExtras(bundle);
setResult(RESULT_OK, resultIntent);
finish();

有什么建议么?如果我包含the the the Call()呼叫,则为我提供以下内容:

W/ActivityManager( 1030): Duplicate finish request for HistoryRecord{44802c90 com.android.TVitter/.Selection}
有帮助吗?

解决方案

好的,现在不要对我火焰。我花了两个小时的时间来调试:(只是写下来,以便其他人不会犯这个愚蠢的错误。我必须放一个“确定”按钮,然后处理事件,而不是让用户按“后背”按钮在电话上。这是一个明显的事情,但由于某种原因我错过了...

其他提示

您也可以实施 Activity.onBackPressed() 如果要在按下后按钮时从活动中返回一些特定数据。看起来只有2.0可用。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top