Skip to content

Commit

Permalink
Name refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
cesards committed Sep 5, 2018
1 parent b4c46eb commit d51c33a
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.cesards.samples.cropimageview.rounded_corners;

import com.cesards.cropimageview.crop.CropType;
import com.cesards.cropimageview.image_crop.CropType;

import androidx.annotation.DrawableRes;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.cesards.samples.cropimageview.rounded_corners;

import com.cesards.cropimageview.crop.CropType;
import com.cesards.cropimageview.image_crop.CropType;
import com.cesards.samples.cropimageview.R;

import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import android.view.LayoutInflater;
import android.widget.ImageView;

import com.cesards.cropimageview.crop.CropType;
import com.cesards.cropimageview.image_crop.CropType;
import com.cesards.samples.cropimageview.R;
import com.cesards.samples.cropimageview._activity.CommonImagesAdapter;
import com.cesards.samples.cropimageview._util.SystemUiHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
import android.widget.ImageView;

import com.cesards.cropimageview.CropImageView;
import com.cesards.cropimageview.crop.CropType;
import com.cesards.cropimageview.image_crop.CropType;
import com.cesards.samples.cropimageview.R;
import com.cesards.samples.cropimageview._activity.CommonImagesAdapter;
import com.cesards.samples.cropimageview._util.SystemUiHelper;
import com.squareup.picasso.Picasso;

import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
import android.view.ViewOutlineProvider;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatImageView;

public class CropImageView extends AppCompatImageView {

private final CroppedImage croppedImage = new CroppedImage(this);
private final RoundedCornerImage roundedImage = new RoundedCornerImage(this);
@Nullable private final CroppedImage croppedImage = new CroppedImage(this);
@Nullable private final RoundedCorners roundedImage = new RoundedCorners(this);

public CropImageView(Context context) {
super(context);
Expand All @@ -34,7 +35,7 @@ public CropImageView(Context context, AttributeSet attrs, int defStyle) {
}

/**
* Returns {@link RoundedCornerImage} so the user can retrieve and set information related to cropping
* Returns {@link RoundedCorners} so the user can retrieve and set information related to cropping
* the image.
*/
@NonNull
Expand All @@ -43,11 +44,11 @@ public CroppedImage croppedImage() {
}

/**
* Returns {@link RoundedCornerImage} so the user can retrieve and set information related to rounding
* Returns {@link RoundedCorners} so the user can retrieve and set information related to rounding
* the image corners.
*/
// @NonNull
// RoundedCornerImage roundedImage() {
// RoundedCorners roundedImage() {
// return roundedImage;
// }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import android.util.AttributeSet;
import android.widget.ImageView;

import com.cesards.cropimageview.crop.CropType;
import com.cesards.cropimageview.crop.ImageTransformation;
import com.cesards.cropimageview.image_crop.CropType;
import com.cesards.cropimageview.image_crop.ImageTransformation;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,16 @@
import androidx.appcompat.content.res.AppCompatResources;
import androidx.core.view.ViewCompat;

public final class RoundedCornerImage implements RoundedCornerImageViewHook {
public final class RoundedCorners implements RoundedCornerImageViewHook {

@Nullable
public static RoundedCorners








@NonNull private final ImageView imageView;
Expand All @@ -48,7 +57,7 @@ public final class RoundedCornerImage implements RoundedCornerImageViewHook {
private final Path borderPath = new Path();


public RoundedCornerImage(@NonNull ImageView imageView) {
public RoundedCorners(@NonNull ImageView imageView) {
this.imageView = imageView;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.cesards.cropimageview.crop;
package com.cesards.cropimageview.image_crop;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.cesards.cropimageview.crop;
package com.cesards.cropimageview.image_crop;

import android.graphics.Matrix;
import android.graphics.drawable.Drawable;
Expand Down

0 comments on commit d51c33a

Please sign in to comment.