Browse Source

Fix bug that don't allow simple selection on recent device

tags/release-v2.5
Schoumi 2 years ago
parent
commit
2218b47975
2 changed files with 6 additions and 3 deletions
  1. 5
    2
      app/src/main/java/fr/mobdev/goblim/activity/UploadActivity.java
  2. 1
    1
      build.gradle

+ 5
- 2
app/src/main/java/fr/mobdev/goblim/activity/UploadActivity.java View File

@@ -525,13 +525,16 @@ public class UploadActivity extends AppCompatActivity {
public void onActivityResult(int requestCode, int resultCode,Intent returnIntent) {
if(resultCode == RESULT_OK){
//retrieve uri from the request image activity and prepare
if(Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
ClipData clip = null;
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2)
clip = returnIntent.getClipData();

if(clip == null) {
Uri imageUri = returnIntent.getData();
uris.add(imageUri);
updateSpanCount();
adapter.addUri(this,imageUri);
} else {
ClipData clip = returnIntent.getClipData();
for(int i = 0; clip != null && i < clip.getItemCount(); i++) {
Uri imageUri = clip.getItemAt(i).getUri();
uris.add(imageUri);

+ 1
- 1
build.gradle View File

@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.android.tools.build:gradle:2.3.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

Loading…
Cancel
Save