diff --git a/gradle.properties b/gradle.properties index e15f9104..e5909cdc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=2.2.3-non-native -VERSION_CODE=24 +VERSION_NAME=2.2.5-non-native +VERSION_CODE=25 GROUP=com.yalantis POM_DESCRIPTION=Android Library for cropping images diff --git a/sample/build.gradle b/sample/build.gradle index ce8dda60..fe59af37 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 28 + compileSdkVersion 29 buildToolsVersion '28.0.3' defaultConfig { applicationId "com.yalantis.ucrop.sample" minSdkVersion 14 - targetSdkVersion 28 + targetSdkVersion 29 versionCode 13 versionName "1.2.4" } diff --git a/sample/src/main/java/com/yalantis/ucrop/sample/SampleActivity.java b/sample/src/main/java/com/yalantis/ucrop/sample/SampleActivity.java index 3f8f919b..3bcacb9f 100644 --- a/sample/src/main/java/com/yalantis/ucrop/sample/SampleActivity.java +++ b/sample/src/main/java/com/yalantis/ucrop/sample/SampleActivity.java @@ -372,9 +372,9 @@ Tune everything (ノ◕ヮ◕)ノ*:・゚✧ // Color palette options.setToolbarColor(ContextCompat.getColor(this, R.color.your_color_res)); options.setStatusBarColor(ContextCompat.getColor(this, R.color.your_color_res)); - options.setActiveWidgetColor(ContextCompat.getColor(this, R.color.your_color_res)); options.setToolbarWidgetColor(ContextCompat.getColor(this, R.color.your_color_res)); options.setRootViewBackgroundColor(ContextCompat.getColor(this, R.color.your_color_res)); + options.setActiveControlsWidgetColor(ContextCompat.getColor(this, R.color.your_color_res)); // Aspect ratio options options.setAspectRatioOptions(1, diff --git a/sample/src/main/res/values/colors.xml b/sample/src/main/res/values/colors.xml index 6531d5c0..4f44e31e 100644 --- a/sample/src/main/res/values/colors.xml +++ b/sample/src/main/res/values/colors.xml @@ -3,4 +3,6 @@ #FF6E40 #CC5833 #FF6E40 + + #03A9F4 diff --git a/ucrop/build.gradle b/ucrop/build.gradle index dcb7d462..c230a1ff 100644 --- a/ucrop/build.gradle +++ b/ucrop/build.gradle @@ -8,8 +8,8 @@ android { defaultConfig { minSdkVersion 14 targetSdkVersion 28 - versionCode 24 - versionName "2.2.4-non-native" + versionCode 25 + versionName "2.2.5-non-native" vectorDrawables.useSupportLibrary = true } diff --git a/ucrop/src/main/java/com/yalantis/ucrop/UCrop.java b/ucrop/src/main/java/com/yalantis/ucrop/UCrop.java index 929784ac..28deadaa 100644 --- a/ucrop/src/main/java/com/yalantis/ucrop/UCrop.java +++ b/ucrop/src/main/java/com/yalantis/ucrop/UCrop.java @@ -1,5 +1,6 @@ package com.yalantis.ucrop; +import android.app.Activity; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; @@ -123,7 +124,7 @@ public UCrop withOptions(@NonNull Options options) { * * @param activity Activity to receive result */ - public void start(@NonNull AppCompatActivity activity) { + public void start(@NonNull Activity activity) { start(activity, REQUEST_CROP); } @@ -133,7 +134,7 @@ public void start(@NonNull AppCompatActivity activity) { * @param activity Activity to receive result * @param requestCode requestCode for result */ - public void start(@NonNull AppCompatActivity activity, int requestCode) { + public void start(@NonNull Activity activity, int requestCode) { activity.startActivityForResult(getIntent(activity), requestCode); } @@ -260,7 +261,6 @@ public static class Options { public static final String EXTRA_TOOL_BAR_COLOR = EXTRA_PREFIX + ".ToolbarColor"; public static final String EXTRA_STATUS_BAR_COLOR = EXTRA_PREFIX + ".StatusBarColor"; - public static final String EXTRA_UCROP_COLOR_WIDGET_ACTIVE = EXTRA_PREFIX + ".UcropColorWidgetActive"; public static final String EXTRA_UCROP_COLOR_CONTROLS_WIDGET_ACTIVE = EXTRA_PREFIX + ".UcropColorControlsWidgetActive"; public static final String EXTRA_UCROP_WIDGET_COLOR_TOOLBAR = EXTRA_PREFIX + ".UcropToolbarWidgetColor"; @@ -425,14 +425,7 @@ public void setStatusBarColor(@ColorInt int color) { } /** - * @param color - desired resolved color of the progress wheel middle line (default is violet) - */ - public void setActiveWidgetColor(@ColorInt int color) { - mOptionBundle.putInt(EXTRA_UCROP_COLOR_WIDGET_ACTIVE, color); - } - - /** - * @param color - desired resolved color of the active and selected widget (default is white) + * @param color - desired resolved color of the active and selected widget and progress wheel middle line (default is white) */ public void setActiveControlsWidgetColor(@ColorInt int color) { mOptionBundle.putInt(EXTRA_UCROP_COLOR_CONTROLS_WIDGET_ACTIVE, color); diff --git a/ucrop/src/main/java/com/yalantis/ucrop/UCropActivity.java b/ucrop/src/main/java/com/yalantis/ucrop/UCropActivity.java index a48969fc..03de03c7 100644 --- a/ucrop/src/main/java/com/yalantis/ucrop/UCropActivity.java +++ b/ucrop/src/main/java/com/yalantis/ucrop/UCropActivity.java @@ -49,6 +49,7 @@ import androidx.annotation.NonNull; import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatDelegate; import androidx.appcompat.widget.Toolbar; import androidx.core.content.ContextCompat; import androidx.transition.AutoTransition; @@ -87,7 +88,6 @@ public class UCropActivity extends AppCompatActivity { // Enables dynamic coloring private int mToolbarColor; private int mStatusBarColor; - private int mActiveWidgetColor; private int mActiveControlsWidgetColor; private int mToolbarWidgetColor; @ColorInt @@ -116,6 +116,10 @@ public class UCropActivity extends AppCompatActivity { private int mCompressQuality = DEFAULT_COMPRESS_QUALITY; private int[] mAllowedGestures = new int[]{SCALE, ROTATE, ALL}; + static { + AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); + } + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -282,7 +286,6 @@ private void processOptions(@NonNull Intent intent) { private void setupViews(@NonNull Intent intent) { mStatusBarColor = intent.getIntExtra(UCrop.Options.EXTRA_STATUS_BAR_COLOR, ContextCompat.getColor(this, R.color.ucrop_color_statusbar)); mToolbarColor = intent.getIntExtra(UCrop.Options.EXTRA_TOOL_BAR_COLOR, ContextCompat.getColor(this, R.color.ucrop_color_toolbar)); - mActiveWidgetColor = intent.getIntExtra(UCrop.Options.EXTRA_UCROP_COLOR_WIDGET_ACTIVE, ContextCompat.getColor(this, R.color.ucrop_color_widget_background)); mActiveControlsWidgetColor = intent.getIntExtra(UCrop.Options.EXTRA_UCROP_COLOR_CONTROLS_WIDGET_ACTIVE, ContextCompat.getColor(this, R.color.ucrop_color_active_controls_color)); mToolbarWidgetColor = intent.getIntExtra(UCrop.Options.EXTRA_UCROP_WIDGET_COLOR_TOOLBAR, ContextCompat.getColor(this, R.color.ucrop_color_toolbar_widget)); @@ -302,7 +305,6 @@ private void setupViews(@NonNull Intent intent) { ViewGroup viewGroup = findViewById(R.id.ucrop_photobox); ViewGroup wrapper = viewGroup.findViewById(R.id.controls_wrapper); wrapper.setVisibility(View.VISIBLE); - wrapper.setBackgroundColor(mRootViewBackgroundColor); LayoutInflater.from(this).inflate(R.layout.ucrop_controls, wrapper, true); mControlsTransition = new AutoTransition(); @@ -364,6 +366,11 @@ private void initiateRootViews() { ((ImageView) findViewById(R.id.image_view_logo)).setColorFilter(mLogoColor, PorterDuff.Mode.SRC_ATOP); findViewById(R.id.ucrop_frame).setBackgroundColor(mRootViewBackgroundColor); + if (!mShowBottomControls) { + RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) findViewById(R.id.ucrop_frame).getLayoutParams(); + params.bottomMargin = 0; + findViewById(R.id.ucrop_frame).requestLayout(); + } } private TransformImageView.TransformImageListener mImageListener = new TransformImageView.TransformImageListener() { @@ -394,7 +401,7 @@ public void onLoadFailure(@NonNull Exception e) { }; /** - * Use {@link #mActiveWidgetColor} for color filter + * Use {@link #mActiveControlsWidgetColor} for color filter */ private void setupStatesWrapper() { ImageView stateScaleImageView = findViewById(R.id.image_view_state_scale); @@ -496,7 +503,7 @@ public void onScrollStart() { } }); - ((HorizontalProgressWheelView) findViewById(R.id.rotate_scroll_wheel)).setMiddleLineColor(mActiveWidgetColor); + ((HorizontalProgressWheelView) findViewById(R.id.rotate_scroll_wheel)).setMiddleLineColor(mActiveControlsWidgetColor); findViewById(R.id.wrapper_reset_rotate).setOnClickListener(new View.OnClickListener() { @@ -511,6 +518,8 @@ public void onClick(View v) { rotateByAngle(90); } }); + + setAngleTextColor(mActiveControlsWidgetColor); } private void setupScaleWidget() { @@ -538,7 +547,9 @@ public void onScrollStart() { mGestureCropImageView.cancelAllAnimations(); } }); - ((HorizontalProgressWheelView) findViewById(R.id.scale_scroll_wheel)).setMiddleLineColor(mActiveWidgetColor); + ((HorizontalProgressWheelView) findViewById(R.id.scale_scroll_wheel)).setMiddleLineColor(mActiveControlsWidgetColor); + + setScaleTextColor(mActiveControlsWidgetColor); } private void setAngleText(float angle) { @@ -547,12 +558,24 @@ private void setAngleText(float angle) { } } + private void setAngleTextColor(int textColor) { + if (mTextViewRotateAngle != null) { + mTextViewRotateAngle.setTextColor(textColor); + } + } + private void setScaleText(float scale) { if (mTextViewScalePercent != null) { mTextViewScalePercent.setText(String.format(Locale.getDefault(), "%d%%", (int) (scale * 100))); } } + private void setScaleTextColor(int textColor) { + if (mTextViewScalePercent != null) { + mTextViewScalePercent.setTextColor(textColor); + } + } + private void resetRotation() { mGestureCropImageView.postRotate(-mGestureCropImageView.getCurrentAngle()); mGestureCropImageView.setImageToWrapCropBounds(); diff --git a/ucrop/src/main/java/com/yalantis/ucrop/UCropFragment.java b/ucrop/src/main/java/com/yalantis/ucrop/UCropFragment.java index 6d086be4..3b8ea9b8 100644 --- a/ucrop/src/main/java/com/yalantis/ucrop/UCropFragment.java +++ b/ucrop/src/main/java/com/yalantis/ucrop/UCropFragment.java @@ -39,6 +39,7 @@ import androidx.annotation.IntDef; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatDelegate; import androidx.core.content.ContextCompat; import androidx.fragment.app.Fragment; import androidx.transition.AutoTransition; @@ -72,7 +73,6 @@ public class UCropFragment extends Fragment { private UCropFragmentCallback callback; private int mActiveControlsWidgetColor; - private int mActiveWidgetColor; @ColorInt private int mRootViewBackgroundColor; private int mLogoColor; @@ -94,6 +94,10 @@ public class UCropFragment extends Fragment { private int mCompressQuality = DEFAULT_COMPRESS_QUALITY; private int[] mAllowedGestures = new int[]{SCALE, ROTATE, ALL}; + static { + AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); + } + public static UCropFragment newInstance(Bundle uCrop) { UCropFragment fragment = new UCropFragment(); fragment.setArguments(uCrop); @@ -133,8 +137,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c public void setupViews(View view, Bundle args) { - mActiveWidgetColor = args.getInt(UCrop.Options.EXTRA_UCROP_COLOR_WIDGET_ACTIVE, ContextCompat.getColor(getContext(), R.color.ucrop_color_widget_background)); - mActiveControlsWidgetColor = args.getInt(UCrop.Options.EXTRA_UCROP_COLOR_WIDGET_ACTIVE, ContextCompat.getColor(getContext(), R.color.ucrop_color_widget_active)); + mActiveControlsWidgetColor = args.getInt(UCrop.Options.EXTRA_UCROP_COLOR_CONTROLS_WIDGET_ACTIVE, ContextCompat.getColor(getContext(), R.color.ucrop_color_widget_active)); mLogoColor = args.getInt(UCrop.Options.EXTRA_UCROP_LOGO_COLOR, ContextCompat.getColor(getContext(), R.color.ucrop_color_default_logo)); mShowBottomControls = !args.getBoolean(UCrop.Options.EXTRA_HIDE_BOTTOM_CONTROLS, false); mRootViewBackgroundColor = args.getInt(UCrop.Options.EXTRA_UCROP_ROOT_VIEW_BACKGROUND_COLOR, ContextCompat.getColor(getContext(), R.color.ucrop_color_crop_background)); @@ -146,7 +149,6 @@ public void setupViews(View view, Bundle args) { ViewGroup wrapper = view.findViewById(R.id.controls_wrapper); wrapper.setVisibility(View.VISIBLE); - wrapper.setBackgroundColor(mRootViewBackgroundColor); LayoutInflater.from(getContext()).inflate(R.layout.ucrop_controls, wrapper, true); mControlsTransition = new AutoTransition(); @@ -167,6 +169,10 @@ public void setupViews(View view, Bundle args) { setupRotateWidget(view); setupScaleWidget(view); setupStatesWrapper(view); + } else { + RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) view.findViewById(R.id.ucrop_frame).getLayoutParams(); + params.bottomMargin = 0; + view.findViewById(R.id.ucrop_frame).requestLayout(); } } @@ -296,7 +302,7 @@ public void onLoadFailure(@NonNull Exception e) { }; /** - * Use {@link #mActiveWidgetColor} for color filter + * Use {@link #mActiveControlsWidgetColor} for color filter */ private void setupStatesWrapper(View view) { ImageView stateScaleImageView = view.findViewById(R.id.image_view_state_scale); @@ -334,7 +340,7 @@ private void setupAspectRatioWidget(@NonNull Bundle bundle, View view) { wrapperAspectRatio = (FrameLayout) getLayoutInflater().inflate(R.layout.ucrop_aspect_ratio, null); wrapperAspectRatio.setLayoutParams(lp); aspectRatioTextView = ((AspectRatioTextView) wrapperAspectRatio.getChildAt(0)); - aspectRatioTextView.setActiveColor(mActiveWidgetColor); + aspectRatioTextView.setActiveColor(mActiveControlsWidgetColor); aspectRatioTextView.setAspectRatio(aspectRatio); wrapperAspectRatioList.addView(wrapperAspectRatio); @@ -380,7 +386,7 @@ public void onScrollStart() { } }); - ((HorizontalProgressWheelView) view.findViewById(R.id.rotate_scroll_wheel)).setMiddleLineColor(mActiveWidgetColor); + ((HorizontalProgressWheelView) view.findViewById(R.id.rotate_scroll_wheel)).setMiddleLineColor(mActiveControlsWidgetColor); view.findViewById(R.id.wrapper_reset_rotate).setOnClickListener(new View.OnClickListener() { @@ -395,6 +401,8 @@ public void onClick(View v) { rotateByAngle(90); } }); + + setAngleTextColor(mActiveControlsWidgetColor); } private void setupScaleWidget(View view) { @@ -422,7 +430,9 @@ public void onScrollStart() { mGestureCropImageView.cancelAllAnimations(); } }); - ((HorizontalProgressWheelView) view.findViewById(R.id.scale_scroll_wheel)).setMiddleLineColor(mActiveWidgetColor); + ((HorizontalProgressWheelView) view.findViewById(R.id.scale_scroll_wheel)).setMiddleLineColor(mActiveControlsWidgetColor); + + setScaleTextColor(mActiveControlsWidgetColor); } private void setAngleText(float angle) { @@ -431,12 +441,24 @@ private void setAngleText(float angle) { } } + private void setAngleTextColor(int textColor) { + if (mTextViewRotateAngle != null) { + mTextViewRotateAngle.setTextColor(textColor); + } + } + private void setScaleText(float scale) { if (mTextViewScalePercent != null) { mTextViewScalePercent.setText(String.format(Locale.getDefault(), "%d%%", (int) (scale * 100))); } } + private void setScaleTextColor(int textColor) { + if (mTextViewScalePercent != null) { + mTextViewScalePercent.setTextColor(textColor); + } + } + private void resetRotation() { mGestureCropImageView.postRotate(-mGestureCropImageView.getCurrentAngle()); mGestureCropImageView.setImageToWrapCropBounds(); diff --git a/ucrop/src/main/java/com/yalantis/ucrop/task/BitmapLoadTask.java b/ucrop/src/main/java/com/yalantis/ucrop/task/BitmapLoadTask.java index c836fdd1..61235a15 100755 --- a/ucrop/src/main/java/com/yalantis/ucrop/task/BitmapLoadTask.java +++ b/ucrop/src/main/java/com/yalantis/ucrop/task/BitmapLoadTask.java @@ -1,34 +1,26 @@ package com.yalantis.ucrop.task; -import android.Manifest.permission; import android.content.Context; -import android.content.pm.PackageManager; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Matrix; import android.net.Uri; import android.os.AsyncTask; -import android.os.Build; -import android.os.ParcelFileDescriptor; -import android.text.TextUtils; import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import com.yalantis.ucrop.callback.BitmapLoadCallback; import com.yalantis.ucrop.model.ExifInfo; import com.yalantis.ucrop.util.BitmapLoadUtils; -import com.yalantis.ucrop.util.FileUtils; import java.io.File; -import java.io.FileDescriptor; -import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.core.content.ContextCompat; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; @@ -95,27 +87,8 @@ protected BitmapWorkerResult doInBackground(Void... params) { return new BitmapWorkerResult(e); } - final ParcelFileDescriptor parcelFileDescriptor; - try { - parcelFileDescriptor = mContext.getContentResolver().openFileDescriptor(mInputUri, "r"); - } catch (FileNotFoundException e) { - return new BitmapWorkerResult(e); - } - - final FileDescriptor fileDescriptor; - if (parcelFileDescriptor != null) { - fileDescriptor = parcelFileDescriptor.getFileDescriptor(); - } else { - return new BitmapWorkerResult(new NullPointerException("ParcelFileDescriptor was null for given Uri: [" + mInputUri + "]")); - } - final BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; - BitmapFactory.decodeFileDescriptor(fileDescriptor, null, options); - if (options.outWidth == -1 || options.outHeight == -1) { - return new BitmapWorkerResult(new IllegalArgumentException("Bounds for bitmap could not be retrieved from the Uri: [" + mInputUri + "]")); - } - options.inSampleSize = BitmapLoadUtils.calculateInSampleSize(options, mRequiredWidth, mRequiredHeight); options.inJustDecodeBounds = false; @@ -124,11 +97,22 @@ protected BitmapWorkerResult doInBackground(Void... params) { boolean decodeAttemptSuccess = false; while (!decodeAttemptSuccess) { try { - decodeSampledBitmap = BitmapFactory.decodeFileDescriptor(fileDescriptor, null, options); + InputStream stream = mContext.getContentResolver().openInputStream(mInputUri); + try { + decodeSampledBitmap = BitmapFactory.decodeStream(stream, null, options); + if (options.outWidth == -1 || options.outHeight == -1) { + return new BitmapWorkerResult(new IllegalArgumentException("Bounds for bitmap could not be retrieved from the Uri: [" + mInputUri + "]")); + } + } finally { + BitmapLoadUtils.close(stream); + } decodeAttemptSuccess = true; } catch (OutOfMemoryError error) { Log.e(TAG, "doInBackground: BitmapFactory.decodeFileDescriptor: ", error); options.inSampleSize *= 2; + } catch (IOException e) { + Log.e(TAG, "doInBackground: ImageDecoder.createSource: ", e); + return new BitmapWorkerResult(new IllegalArgumentException("Bitmap could not be decoded from the Uri: [" + mInputUri + "]", e)); } } @@ -136,10 +120,6 @@ protected BitmapWorkerResult doInBackground(Void... params) { return new BitmapWorkerResult(new IllegalArgumentException("Bitmap could not be decoded from the Uri: [" + mInputUri + "]")); } - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { - BitmapLoadUtils.close(parcelFileDescriptor); - } - int exifOrientation = BitmapLoadUtils.getExifOrientation(mContext, mInputUri); int exifDegrees = BitmapLoadUtils.exifToDegrees(exifOrientation); int exifTranslation = BitmapLoadUtils.exifToTranslation(exifOrientation); @@ -171,16 +151,11 @@ private void processInputUri() throws NullPointerException, IOException { throw e; } } else if ("content".equals(inputUriScheme)) { - String path = getFilePath(); - if (!TextUtils.isEmpty(path) && new File(path).exists()) { - mInputUri = Uri.fromFile(new File(path)); - } else { - try { - copyFile(mInputUri, mOutputUri); - } catch (NullPointerException | IOException e) { - Log.e(TAG, "Copying failed", e); - throw e; - } + try { + copyFile(mInputUri, mOutputUri); + } catch (NullPointerException | IOException e) { + Log.e(TAG, "Copying failed", e); + throw e; } } else if (!"file".equals(inputUriScheme)) { Log.e(TAG, "Invalid Uri scheme " + inputUriScheme); @@ -188,15 +163,6 @@ private void processInputUri() throws NullPointerException, IOException { } } - private String getFilePath() { - if (ContextCompat.checkSelfPermission(mContext, permission.READ_EXTERNAL_STORAGE) - == PackageManager.PERMISSION_GRANTED) { - return FileUtils.getPath(mContext, mInputUri); - } else { - return null; - } - } - private void copyFile(@NonNull Uri inputUri, @Nullable Uri outputUri) throws NullPointerException, IOException { Log.d(TAG, "copyFile"); diff --git a/ucrop/src/main/java/com/yalantis/ucrop/view/widget/HorizontalProgressWheelView.java b/ucrop/src/main/java/com/yalantis/ucrop/view/widget/HorizontalProgressWheelView.java index fc7d9b3d..75676584 100644 --- a/ucrop/src/main/java/com/yalantis/ucrop/view/widget/HorizontalProgressWheelView.java +++ b/ucrop/src/main/java/com/yalantis/ucrop/view/widget/HorizontalProgressWheelView.java @@ -59,6 +59,7 @@ public void setScrollingListener(ScrollingListener scrollingListener) { public void setMiddleLineColor(@ColorInt int middleLineColor) { mMiddleLineColor = middleLineColor; + mProgressMiddleLinePaint.setColor(mMiddleLineColor); invalidate(); } diff --git a/ucrop/src/main/res/layout/ucrop_activity_photobox.xml b/ucrop/src/main/res/layout/ucrop_activity_photobox.xml index 0ed5f6d8..57a5a3b1 100644 --- a/ucrop/src/main/res/layout/ucrop_activity_photobox.xml +++ b/ucrop/src/main/res/layout/ucrop_activity_photobox.xml @@ -28,7 +28,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_above="@+id/controls_wrapper" - android:layout_below="@+id/toolbar"> + android:layout_below="@+id/toolbar" + android:layout_marginBottom="-12dp"> @@ -52,7 +53,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" - android:background="@android:color/black" android:visibility="gone" /> diff --git a/ucrop/src/main/res/layout/ucrop_fragment_photobox.xml b/ucrop/src/main/res/layout/ucrop_fragment_photobox.xml index a2ff0467..34594546 100644 --- a/ucrop/src/main/res/layout/ucrop_fragment_photobox.xml +++ b/ucrop/src/main/res/layout/ucrop_fragment_photobox.xml @@ -10,6 +10,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@+id/controls_wrapper" + android:layout_marginBottom="-12dp" android:background="@color/ucrop_color_crop_background">