From 1c1e7cf8525d0794618ff6ac0528a7536bc57375 Mon Sep 17 00:00:00 2001 From: gun0912 Date: Tue, 30 Aug 2016 17:20:24 +0900 Subject: [PATCH] change bottomsheet class name --- app/build.gradle | 3 --- .../java/gun0912/tedbottompickerdemo/MainActivity.java | 8 ++++---- ...ottomSheetDialogFragment.java => TedBottomPicker.java} | 6 +++--- 3 files changed, 7 insertions(+), 10 deletions(-) rename tedbottompicker/src/main/java/gun0912/tedbottompicker/{CustomBottomSheetDialogFragment.java => TedBottomPicker.java} (97%) diff --git a/app/build.gradle b/app/build.gradle index e1368c7..5fa0d73 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -20,9 +20,6 @@ android { } -repositories { - maven { url "https://jitpack.io" } -} dependencies { diff --git a/app/src/main/java/gun0912/tedbottompickerdemo/MainActivity.java b/app/src/main/java/gun0912/tedbottompickerdemo/MainActivity.java index 55429ca..7dce25b 100644 --- a/app/src/main/java/gun0912/tedbottompickerdemo/MainActivity.java +++ b/app/src/main/java/gun0912/tedbottompickerdemo/MainActivity.java @@ -16,7 +16,7 @@ import java.util.ArrayList; -import gun0912.tedbottompicker.CustomBottomSheetDialogFragment; +import gun0912.tedbottompicker.TedBottomPicker; public class MainActivity extends AppCompatActivity { @@ -41,8 +41,8 @@ public void onClick(View view) { @Override public void onPermissionGranted() { - CustomBottomSheetDialogFragment bottomSheetDialogFragment = new CustomBottomSheetDialogFragment.Builder(MainActivity.this) - .setOnImageSelectedListener(new CustomBottomSheetDialogFragment.OnImageSelectedListener() { + TedBottomPicker tedBottomPicker = new TedBottomPicker.Builder(MainActivity.this) + .setOnImageSelectedListener(new TedBottomPicker.OnImageSelectedListener() { @Override public void onImageSelected(Uri uri) { Log.d("ted","uri: "+uri); @@ -58,7 +58,7 @@ public void onImageSelected(Uri uri) { .setPeekHeight(getResources().getDisplayMetrics().heightPixels/2) .create(); - bottomSheetDialogFragment.show(getSupportFragmentManager()); + tedBottomPicker.show(getSupportFragmentManager()); } diff --git a/tedbottompicker/src/main/java/gun0912/tedbottompicker/CustomBottomSheetDialogFragment.java b/tedbottompicker/src/main/java/gun0912/tedbottompicker/TedBottomPicker.java similarity index 97% rename from tedbottompicker/src/main/java/gun0912/tedbottompicker/CustomBottomSheetDialogFragment.java rename to tedbottompicker/src/main/java/gun0912/tedbottompicker/TedBottomPicker.java index b9b1910..0ffcf60 100644 --- a/tedbottompicker/src/main/java/gun0912/tedbottompicker/CustomBottomSheetDialogFragment.java +++ b/tedbottompicker/src/main/java/gun0912/tedbottompicker/TedBottomPicker.java @@ -35,7 +35,7 @@ import gun0912.tedbottompicker.adapter.ImageGalleryAdapter; -public class CustomBottomSheetDialogFragment extends BottomSheetDialogFragment { +public class TedBottomPicker extends BottomSheetDialogFragment { public static final String TAG = "ted"; static final int REQ_CODE_CAMERA = 1; @@ -336,7 +336,7 @@ public Builder setPeekHeightResId(@DimenRes int dimenResId) { return this; } - public CustomBottomSheetDialogFragment create() { + public TedBottomPicker create() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN && ContextCompat.checkSelfPermission(context, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { throw new RuntimeException("Missing required WRITE_EXTERNAL_STORAGE permission. Did you remember to request it first?"); @@ -346,7 +346,7 @@ public CustomBottomSheetDialogFragment create() { throw new RuntimeException("You have to setOnImageSelectedListener() for receive selected Uri"); } - CustomBottomSheetDialogFragment customBottomSheetDialogFragment = new CustomBottomSheetDialogFragment(); + TedBottomPicker customBottomSheetDialogFragment = new TedBottomPicker(); customBottomSheetDialogFragment.builder = this; return customBottomSheetDialogFragment;