Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ apply plugin: 'com.android.application'

android {

compileSdkVersion 27
compileSdkVersion 29


defaultConfig {
applicationId "gun0912.tedbottompickerdemo"
minSdkVersion 16
targetSdkVersion 26
targetSdkVersion 29
versionCode 1
versionName "1.0.0"
multiDexEnabled true
Expand Down Expand Up @@ -39,13 +39,13 @@ repositories {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation project(':tedbottompicker')
implementation 'com.android.support:multidex:1.0.3'
implementation 'androidx.multidex:multidex:2.0.1'

implementation 'gun0912.ted:tedpermission:2.2.0'
implementation 'com.github.bumptech.glide:glide:4.7.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
implementation "com.github.bumptech.glide:glide:$glide_version"
annotationProcessor "com.github.bumptech.glide:compiler:$glide_version"

debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.3'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.3'
Expand Down
10 changes: 8 additions & 2 deletions app/src/main/java/gun0912/tedbottompickerdemo/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.Manifest;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.util.TypedValue;
import android.view.LayoutInflater;
Expand All @@ -14,11 +13,14 @@
import android.widget.ImageView;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

import com.bumptech.glide.Glide;
import com.bumptech.glide.RequestManager;
import com.bumptech.glide.request.RequestOptions;
import com.gun0912.tedpermission.PermissionListener;
import com.gun0912.tedpermission.TedPermission;
import com.theartofdev.edmodo.cropper.CropImageView;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -64,6 +66,8 @@ public void onPermissionGranted() {
//.setPeekHeight(getResources().getDisplayMetrics().heightPixels/2)
.setSelectedUri(selectedUri)
//.showVideoMedia()
.setCropper(true)
.setResize(500, 500, CropImageView.RequestSizeOptions.RESIZE_INSIDE)
.setPeekHeight(1200)
.show(uri -> {
Log.d("ted", "uri: " + uri);
Expand Down Expand Up @@ -105,6 +109,9 @@ public void onPermissionGranted() {
TedBottomPicker.with(MainActivity.this)
//.setPeekHeight(getResources().getDisplayMetrics().heightPixels/2)
.setPeekHeight(1600)
.setCropper(true)
.setCropperRatio(1, 1)
.setResize(500, 500, CropImageView.RequestSizeOptions.RESIZE_INSIDE)
.showTitle(false)
.setCompleteButtonText("Done")
.setEmptySelectionText("No Select")
Expand All @@ -114,7 +121,6 @@ public void onPermissionGranted() {
showUriList(uriList);
});


}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package gun0912.tedbottompickerdemo;

import android.app.Application;
import android.support.multidex.MultiDexApplication;

import androidx.multidex.MultiDexApplication;

import com.squareup.leakcanary.LeakCanary;

Expand Down
9 changes: 7 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.glide_version = '4.9.0'
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'

classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
}

}

allprojects {
repositories {
jcenter()
google()
maven { url "https://jitpack.io" }

}

group = GROUP
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ LIBRARY_DESCRIPTION = 'TedBottomPicker is simple image picker using bottom sheet

POM_ARTIFACT_ID=tedbottompicker
POM_NAME=TedBottomPicker
android.enableJetifier=true
android.useAndroidX=true
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Wed Jun 05 20:54:30 KST 2019
#Thu Sep 05 11:11:10 NPT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

21 changes: 13 additions & 8 deletions tedbottompicker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ apply plugin: 'com.android.library'

android {

compileSdkVersion 27
compileSdkVersion 29


defaultConfig {
minSdkVersion 16
targetSdkVersion 24
targetSdkVersion 29
versionCode 1
versionName "1.0"
}
Expand Down Expand Up @@ -45,14 +45,19 @@ repositories {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:27.1.1'
api 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-annotations:27.1.1'
javadocDeps 'com.android.support:support-annotations:27.1.1'
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
api 'com.google.android.material:material:1.0.0'
implementation 'androidx.annotation:annotation:1.1.0'
javadocDeps 'androidx.annotation:annotation:1.1.0'
implementation "com.github.bumptech.glide:glide:$glide_version"
annotationProcessor "com.github.bumptech.glide:compiler:$glide_version"

implementation 'gun0912.ted:tedonactivityresult:1.0.6'
implementation "io.reactivex.rxjava2:rxjava:2.2.6"
api 'com.theartofdev.edmodo:android-image-cropper:2.8.0'



}

apply from: rootProject.file('publish.gradle')
3 changes: 2 additions & 1 deletion tedbottompicker/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@
}

# for DexGuard only
-keepresourcexmlelements manifest/application/meta-data@value=GlideModule
-keepresourcexmlelements manifest/application/meta-data@value=GlideModule
-keep class androidx.appcompat.widget.** { *; }
4 changes: 3 additions & 1 deletion tedbottompicker/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application>
<provider
android:name="android.support.v4.content.FileProvider"
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>
<activity android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:theme="@style/Base.Theme.AppCompat"/>
</application>


Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package gun0912.tedbottompicker;

import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import androidx.recyclerview.widget.RecyclerView;

/**
* Created by TedPark on 2016. 8. 30..
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package gun0912.tedbottompicker;

import android.support.v4.app.FragmentActivity;

import androidx.fragment.app.FragmentActivity;

public class TedBottomPicker extends TedBottomSheetDialogFragment {

Expand Down
Loading