Hi guys,
I am using the default photo picker (usually Gallery or CoolIris
Gallery3D) to pick an image from my application. The problem is that,
when using Gallery3D, the user always needs to choose the album (aka
"bucket") and then the image, while it would be more intuitive to open
directly the album the user was navigating on previously.
For instance, let's say the user is working on an image stored into
the sdcard. When she decides to choose another image, it is probable
that she wants another image from the sdcard. So my question is: is
there a way to tell CoolIris Gallery3D to open on a specific bucket? I
have taken a look at the source code and couldn't find any.
Testing on the emulator with Android 2.2 Google APIs. Here is the
skeleton of my test application:
public class GalleryTest extends Activity implements OnClickListener {
private static final int PICK_REQUEST_CODE = 0;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(R.layout.main);
this.findViewById(R.id.pickbutton).setOnClickListener(this);
}
public void onClick(View v) {
this.startActivityForResult(createIntent(), PICK_REQUEST_CODE);
}
@Override
public void onActivityResult(int requestCode, int resultCode,
Intent intent) {
if ((resultCode == Activity.RESULT_OK)
&& (requestCode == PICK_REQUEST_CODE)) {
Uri imageUri = intent.getData();
if (imageUri != null) {
((TextView) this.findViewById(R.id.photoname)).setText(
imageUri.toString());
}
}
}
private static Intent createIntent() {
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType("image/*");
return intent;
}
}
Thanks in advance,
Diego M. Rosa
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en