Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imageview state control using ViewState class #45

Merged
merged 3 commits into from
Jul 21, 2019
Merged

Imageview state control using ViewState class #45

merged 3 commits into from
Jul 21, 2019

Conversation

rnitame
Copy link
Contributor

@rnitame rnitame commented Jul 18, 2019

fix #41
In this PR, it is possible to restore the state of View using ViewState class.

mBitmapChanged = true;
mRestoreRequest = true;
mAspectRatioWidth = savedAspectRatioWidth;
mAspectRatioHeight = savedAspectRatioHeight;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rnitame
I think savedAspectRatioWidth, savedAspectRatioHeight and suppMatrixValues fields don't need anymore. isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

savedAspectRatioWidth and savedAspectRatioHeight fields are unnecessary 🙆 I will delete.
But I could not restore without suppMatrixValues field.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You deleted aspectRatioWidth and aspectRatioHeight in ViewState. isn't that right?
I mentioned about savedAspectRatioWidth and savedAspectRatioHeight

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You deleted aspectRatioWidth and aspectRatioHeight in ViewState. isn't that right?

Right.

I mentioned about savedAspectRatioWidth and savedAspectRatioHeight

It means this 2 lines?

https://github.com/naver/android-imagecropview/blob/develop/imagecropview/src/main/java/com/naver/android/helloyako/imagecrop/view/ImageCropView.java#L132-L133

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@helloyako helloyako self-requested a review July 21, 2019 18:26
@helloyako
Copy link
Contributor

Thank you so much.

Do you need to deploy to maven?

@helloyako helloyako merged commit c2930b9 into naver:develop Jul 21, 2019
@rnitame
Copy link
Contributor Author

rnitame commented Jul 21, 2019

Yes! please 🙏 I will use my product :)

@rnitame rnitame deleted the refactor/state-control branch July 21, 2019 23:36
@helloyako
Copy link
Contributor

@rnitame
I deployed 1.2.3-SNAPSHOT to snapshot repository.

Can you test in SNAPSHOT?

snapshot version from maven

repositories {
    maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
dependencies {
   implementation 'com.naver.android.helloyako:imagecropview:1.2.3-SNAPSHOT'
}

@rnitame
Copy link
Contributor Author

rnitame commented Jul 23, 2019

@helloyako Thanks! I confirmed that it was working properly in my product.

@helloyako
Copy link
Contributor

It's released.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

About saveState and restoreState
2 participants