我需要发送一个像我发送字符串"标题"的imageview,但我不能,我怎样才能将主视图中的imageview(R.drawable.image)发送到第二个活动?
谢谢
主要活动
public void NewActivity(View view){
Intent intent = new Intent(this, SecondActivity.class);
intent.putExtra("title", getString(R.string.title));
startActivity(intent);
}
Run Code Online (Sandbox Code Playgroud)
第二次活动
@Override
public void onCreate(Bundle bundle)
{
super.onCreate(bundle);
setContentView(R.layout.pantalla);
Bundle extras = getIntent().getExtras();
if (extras == null)
{
return;
}
String title = extras.getString("title");
TextView textview = (TextView)findViewById(R.id.titulo);
textview.setText(title);
}
Run Code Online (Sandbox Code Playgroud) 我一直在安装OpenCV(这是教程),我阅读了教程但是出现了这个错误(Video.java(PHOTO)中的错误).我已经安装了最新版本.我不明白.任何人都可以帮助我并解释发生了什么?谢谢
