【开源】Android-Ultra-Photo-Selector

当前位置: 主页 > 开源代码 >

Android-Ultra-Photo-Selector

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
   Intent intent = new Intent(context, activity);
    intent.putExtra(PhotoSelectorActivity.KEY_MAX, maxImage);
    intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
    context.startActivityForResult(intent, requestCode);
 
 
@Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (resultCode != RESULT_OK)
            return;
        if (requestCode == SELECT_IMAGE_CODE) {// selected image
            if (data != null && data.getExtras() != null) {
                @SuppressWarnings("unchecked")
                List<PhotoModel> photos = (List<PhotoModel>) data.getExtras().getSerializable("photos");
                if (photos == null || photos.isEmpty()) {
                    UIHelper.ToastMessage(this, R.string.no_photo_selected);
                else {
                    Intent intent = new Intent(this, YourOwnLogic.class);
                    Bundle b = new Bundle();
                    b.putSerializable("album_pojo", albumPojo);
                    b.putSerializable("photos", (Serializable) photos);
                    intent.putExtras(b);
                    startActivity(intent);
                    finish();
                }
            }
        }
    }

 

相关代码

  • MultiImageSelector
 
 

posted on 2015-04-22 09:42  wasdchenhao  阅读(191)  评论(0)    收藏  举报

导航