Skip to content

Commit

Permalink
3.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
HuanTanSheng committed Mar 30, 2021
1 parent e0dba05 commit b3caf82
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ allprojects {
```gradle
dependencies {
implementation 'com.github.HuanTanSheng:EasyPhotos:3.1.2' //androidx版本,支持android 10、11,永久维护
implementation 'com.github.HuanTanSheng:EasyPhotos:3.1.3' //androidx版本,支持android 10、11,永久维护
//implementation 'com.github.HuanTanSheng:EasyPhotos:2.4.5' //还没有升级到androidx的同学可以用这个版本,但不支持android 10,暂停维护
 
Expand Down Expand Up @@ -151,7 +151,7 @@ QQ交流群:[288600953](https://jq.qq.com/?_wv=1027&k=5QGgCDe)

## 更新日志

**3.1.2**
**3.1.3**
- 优化:线程安全
- 优化:防止用户在外部多次点击重复打开相册页

Expand Down
Binary file modified demo/release/demo-release.apk
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {


} else if (RESULT_CANCELED == resultCode) {
Toast.makeText(this, "cancel", Toast.LENGTH_SHORT).show();
Toast.makeText(getApplicationContext(), "cancel", Toast.LENGTH_SHORT).show();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,11 @@ private void toAndroidCamera(int requestCode) {
cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);//将拍取的照片保存到指定URI
startActivityForResult(cameraIntent, requestCode);
} else {
Toast.makeText(this, R.string.camera_temp_file_error_easy_photos,
Toast.makeText(getApplicationContext(), R.string.camera_temp_file_error_easy_photos,
Toast.LENGTH_SHORT).show();
}
} else {
Toast.makeText(this, R.string.msg_no_camera_easy_photos, Toast.LENGTH_SHORT).show();
Toast.makeText(getApplicationContext(), R.string.msg_no_camera_easy_photos, Toast.LENGTH_SHORT).show();
}
}

Expand Down Expand Up @@ -679,11 +679,11 @@ private void initView() {

if (albumModel.getAlbumItems().isEmpty()) {
if (Setting.isOnlyVideo()) {
Toast.makeText(this, R.string.no_videos_easy_photos, Toast.LENGTH_LONG).show();
Toast.makeText(getApplicationContext(), R.string.no_videos_easy_photos, Toast.LENGTH_LONG).show();
finish();
return;
}
Toast.makeText(this, R.string.no_photos_easy_photos, Toast.LENGTH_LONG).show();
Toast.makeText(getApplicationContext(), R.string.no_photos_easy_photos, Toast.LENGTH_LONG).show();
if (Setting.isShowCamera) launchCamera(Code.REQUEST_CAMERA);
else finish();
return;
Expand Down Expand Up @@ -797,7 +797,7 @@ public void onClick(View v) {
processSecondMenu();
} else if (R.id.tv_original == id) {
if (!Setting.originalMenuUsable) {
Toast.makeText(this, Setting.originalMenuUnusableHint, Toast.LENGTH_SHORT).show();
Toast.makeText(getApplicationContext(), Setting.originalMenuUnusableHint, Toast.LENGTH_SHORT).show();
return;
}
Setting.selectedOriginal = !Setting.selectedOriginal;
Expand Down Expand Up @@ -1006,29 +1006,29 @@ public void onPhotoClick(int position, int realPosition) {
public void onSelectorOutOfMax(@Nullable Integer result) {
if (result == null) {
if (Setting.isOnlyVideo()) {
Toast.makeText(this, getString(R.string.selector_reach_max_video_hint_easy_photos
Toast.makeText(getApplicationContext(), getString(R.string.selector_reach_max_video_hint_easy_photos
, Setting.count), Toast.LENGTH_SHORT).show();

} else if (Setting.showVideo) {
Toast.makeText(this, getString(R.string.selector_reach_max_hint_easy_photos,
Toast.makeText(getApplicationContext(), getString(R.string.selector_reach_max_hint_easy_photos,
Setting.count), Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, getString(R.string.selector_reach_max_image_hint_easy_photos,
Toast.makeText(getApplicationContext(), getString(R.string.selector_reach_max_image_hint_easy_photos,
Setting.count), Toast.LENGTH_SHORT).show();
}
return;
}
switch (result) {
case Result.PICTURE_OUT:
Toast.makeText(this, getString(R.string.selector_reach_max_image_hint_easy_photos
Toast.makeText(getApplicationContext(), getString(R.string.selector_reach_max_image_hint_easy_photos
, Setting.complexPictureCount), Toast.LENGTH_SHORT).show();
break;
case Result.VIDEO_OUT:
Toast.makeText(this, getString(R.string.selector_reach_max_video_hint_easy_photos
Toast.makeText(getApplicationContext(), getString(R.string.selector_reach_max_video_hint_easy_photos
, Setting.complexVideoCount), Toast.LENGTH_SHORT).show();
break;
case Result.SINGLE_TYPE:
Toast.makeText(this, getString(R.string.selector_single_type_hint_easy_photos),
Toast.makeText(getApplicationContext(), getString(R.string.selector_single_type_hint_easy_photos),
Toast.LENGTH_SHORT).show();
break;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public void onClick(View v) {
updateSelector();
} else if (R.id.tv_original == id) {
if (!Setting.originalMenuUsable) {
Toast.makeText(this, Setting.originalMenuUnusableHint, Toast.LENGTH_SHORT).show();
Toast.makeText(getApplicationContext(), Setting.originalMenuUnusableHint, Toast.LENGTH_SHORT).show();
return;
}
Setting.selectedOriginal = !Setting.selectedOriginal;
Expand Down Expand Up @@ -371,14 +371,14 @@ private void updateSelector() {
return;
}
if (Setting.isOnlyVideo()) {
Toast.makeText(this, getString(R.string.selector_reach_max_video_hint_easy_photos
Toast.makeText(getApplicationContext(), getString(R.string.selector_reach_max_video_hint_easy_photos
, Setting.count), Toast.LENGTH_SHORT).show();

} else if (Setting.showVideo) {
Toast.makeText(this, getString(R.string.selector_reach_max_hint_easy_photos,
Toast.makeText(getApplicationContext(), getString(R.string.selector_reach_max_hint_easy_photos,
Setting.count), Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, getString(R.string.selector_reach_max_image_hint_easy_photos,
Toast.makeText(getApplicationContext(), getString(R.string.selector_reach_max_image_hint_easy_photos,
Setting.count), Toast.LENGTH_SHORT).show();
}
return;
Expand All @@ -390,17 +390,17 @@ private void updateSelector() {
item.selected = false;
switch (res) {
case Result.PICTURE_OUT:
Toast.makeText(this,
Toast.makeText(getApplicationContext(),
getString(R.string.selector_reach_max_image_hint_easy_photos,
Setting.complexPictureCount), Toast.LENGTH_SHORT).show();
break;
case Result.VIDEO_OUT:
Toast.makeText(this,
Toast.makeText(getApplicationContext(),
getString(R.string.selector_reach_max_video_hint_easy_photos,
Setting.complexVideoCount), Toast.LENGTH_SHORT).show();
break;
case Result.SINGLE_TYPE:
Toast.makeText(this, getString(R.string.selector_single_type_hint_easy_photos), Toast.LENGTH_SHORT).show();
Toast.makeText(getApplicationContext(), getString(R.string.selector_single_type_hint_easy_photos), Toast.LENGTH_SHORT).show();
break;
}
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public void onBackPressed() {
@Override
public void onPhotoClick(int position) {
if (selectedPhotos.size() > 8) {
Toast.makeText(this, getString(R.string.selector_reach_max_image_hint_easy_photos, 9), Toast.LENGTH_SHORT).show();
Toast.makeText(getApplicationContext(), getString(R.string.selector_reach_max_image_hint_easy_photos, 9), Toast.LENGTH_SHORT).show();
return;
}

Expand Down

0 comments on commit b3caf82

Please sign in to comment.