我必须将一个字符串从一个类传递到另一个类。但我不能做到这一点..将一个字符串从一个类传递到另一个
我试试这个:
String descricao = getIntent().getExtras().getString("valor");
我有树选项卡每个人有:
public void onItemClick(AdapterView<?> parent, View view, int position, long arg3)
{
Intent i = new Intent(Contas.this, Registros.class);
i.putExtra("valor", data.get(position).getDescricao_conta().toString());
startActivity(i);
}
在接收我把这个值类
活动,该活动的列表视图与数据有界。我想单击tab1中列表中的项目,然后在tab2中,我在列表中看到在tab1中单击的项目中的设置。我已经拥有了数据库,我只需要传递我想让班级换到另一个班级的字符串。
为什么这段代码不工作,发生错误或什么? – jamapag