Пример #1
0
 @Override
 protected void onDestroy() {
   // 清理图片
   FileUtil.deleteDirectory(FileSystemManager.getPostPath(EvaluationActivity.this));
   adapter.destoryBitmap();
   super.onDestroy();
 }
Пример #2
0
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (resultCode == Constants.CHOISE_MORE_PHOTO_112 && data != null) {
      ArrayList<ImgPicker> list = data.getParcelableArrayListExtra("imgUrlList");
      if (list != null && list.size() > 0) {
        addnewPho();
        imgList.addAll(list);
        syncListThumb();
      }
    } else if (requestCode == 210 && resultCode == Activity.RESULT_OK) {
      // 压缩原图得到缩略图
      String toPath = FileSystemManager.getPostPath(this);
      toPath += Constants.USER_INFO + "_" + System.currentTimeMillis() + ".jpg";
      toPath =
          BitmapUtil.getImageScaleByPath(
              new PicturePropertiesBean(capPath, toPath, IMG_SCALE, IMG_SCALE), this);

      ImgPicker img = new ImgPicker(toPath, capPath, 1);
      //            addnewPho();
      adapter.setNotifyPosition(-1);
      imgList.add(img);
      syncListThumb();
    }
  }
Пример #3
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.property_evaluation);
   id = getIntent().getStringExtra("id");
   if (savedInstanceState != null) {
     capPath = savedInstanceState.getString("path");
     imgList = savedInstanceState.getParcelableArrayList("imgList");
   }
   initView();
   initGridView();
   initData();
   commitLoading = new NetLoadingDailog(this);
 }
Пример #4
0
 @Override
 protected void onSaveInstanceState(Bundle outState) {
   super.onSaveInstanceState(outState);
   outState.putString("path", capPath);
   outState.putParcelableArrayList("imgList", imgList);
 }