我怎样才能获得的Android内置的图片库中我的应用程序? [英] how can i get android inbuilt image gallery in to my application?
本文介绍了我怎样才能获得的Android内置的图片库中我的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经实现了获得外部存储的图像时button.if上的按钮,用户点击一个图像在用户点击我可以从SD图像card.but我不能查看幻灯片放映得到应用上的图像由一个.......我已经实现了code如下:
I have implemented an application for get the images from external storage when user click on a image button.if user click on a button i can get the images from sd card.but i can't view the slide show for get the images on by one there.I have implemented code as follows:
((ImageView)findViewById(R.id.getImage)).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivity(intent);
}
});
从上面的code我得到从SD卡的所有图像,但我不能查看的Android内置的幻灯片图像浏览器。
From the above code i am getting all images from sdcard but i can't view android inbuilt slide show image viewer.
我怎样才能获得Android的幻灯片图像浏览器?
How can i get android slide show image viewer?
请任何机构帮助我....
please any body help me....
推荐答案
使用ViewFlipper
use ViewFlipper
ViewFlipper vf=(ViewFlipper)findViewById(R.id.ViewFlipper1);
ImageView img=(imageView)findviewById(R.id.imageView1);
Button btn=(Button)findViewById(R.id.button1);
img.setOnClickListener(this);
btn.setOnClickListener(this);
public void OnClick(View v)
{
Switch(v.getId())
{
case R.id.imageView1 :
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivity(intent);
vf.showNext();
break;
case R.id.button1:
vf.showPrevious();
break;
}
这篇关于我怎样才能获得的Android内置的图片库中我的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文