I am having image slider which are containing images through image url.So,when I select any particular image that image on button click should go to another activity.I am getting image url but its not displaying image on another activity.So please help me.Thanks in advance.
I am having String[] imageUrl in Main
String[] imageUrl={"http://l.yimg.com/a/i/us/we/52/21.gif","https://devimages.apple.com.edgekey.net/contact/images/technical-icon.png","https://devimages.apple.com.edgekey.net/contact/images/technical-icon.png"};
On button click I am sending these url to another activity
Main.java
String[] imageUrl={"http://l.yimg.com/a/i/us/we/52/21.gif","https://devimages.apple.com.edgekey.net/contact/images/technical-icon.png","https://devimages.apple.com.edgekey.net/contact/images/technical-icon.png"};
Button btnNextScreen = (Button) findViewById(R.id.btnNextScreen);
btnNextScreen.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent = new Intent(Main.this, OpenImage.class);
intent.putExtra("some_key", imageUrl);
startActivity(intent);
}
});
In another activity I am getting these url but not a image
OpenImage.java
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.screen2);
String[] data = getIntent().getExtras().getStringArray("some_key");
for(String x:data) {
Log.i(TAG, "x="+x);
Toast.makeText(OpenImage.this, x, Toast.LENGTH_SHORT).show();
}
}