【发布时间】:2011-04-07 18:14:29
【问题描述】:
我对android中的意图和消息传递有点困惑。基本上我目前的困境:
当用户点击一行时,会向用户显示一个显示动物列表的屏幕,例如一只老虎,有关此动物的信息将显示在下一个屏幕/活动中。
我主要负责应用程序的框架,所以当用户从动物列表中选择时,他们会被带到 Animal 活动/类中,但在这个阶段它只是一个通用模型。
如何告诉应用程序选择了 TIGER,并向用户显示老虎数据。到目前为止我的方法
用户点击列表中的项目并调用活动:
protected void onListItemClick(ListView l, View v, int position, long id){
Intent animalIntent = new Intent(this, Animal.class);
startActivity(animalIntent);
}
【问题讨论】:
标签: java android android-intent message