Comments (3)
I want to remove the white space between lower buttons and crop view, by center aligning the cropview.
from croppernocropper.
You're right. It does calculate height based on the width to make it square. Maybe it wouldn't work properly in Landscape mode. You can solve your problem by changing your layout.
If you want to keep the cropper in center, use layout_gravity="center"
and since it is a square, you would want your FrameLayout height to wrap_content
.
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/bottom_frame"
android:layout_alignParentTop="true" >
<com.fenchtose.nocropper.CropperView
android:background="#ff282828"
android:id="@+id/imageview"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="center"
app:grid_opacity="0.8"
app:grid_thickness="1.1dp"
app:grid_color="@color/colorAccent"/>
<ImageView
android:id="@+id/snap_button"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_margin="16dp"
android:padding="8dp"
android:layout_gravity="left|bottom"
android:background="@drawable/black_transp_circ_ripple"
android:scaleType="center"
android:src="@mipmap/ic_crop_free_white_24dp"/>
<ImageView
android:id="@+id/rotate_button"
android:layout_width="40dp"
android:layout_height="40dp"
android:padding="8dp"
android:layout_margin="16dp"
android:layout_gravity="right|bottom"
android:background="@drawable/black_transp_circ_ripple"
android:scaleType="center"
android:src="@mipmap/ic_rotate_right_white_24dp"/>
</FrameLayout>
from croppernocropper.
Closed in favor of #3
from croppernocropper.
Related Issues (20)
- Is there anyway to find out the max zoom for my photos? e.g I want my higher dimension images that can only be zoomed till 1024px X 1024px dimensions HOT 1
- Force not less than width or height HOT 2
- CropperView on ViewPager Swipe problem HOT 3
- minimum zoom related to Image width and height. HOT 1
- getCroppedBitmap returns BitmapResult and not a Bitmap HOT 1
- Cropped Bitmap also take black portion which is not part of Image . HOT 2
- Zoom not working inside Scrollview/Nested Scrollveiw
- save translations done on the image and restore back HOT 6
- Can Load Video in CropActivity
- How to Save Crop State
- Image Rotate issue on Some devices HOT 1
- How to set this cropper view with vertical rectangular layout?
- Can't pinch smoothly if image size is large. (Performance) HOT 2
- question HOT 1
- Cropping current bitmap. Can't perform this action right now help please
- No grid when moving HOT 1
- Applying cropping to the Rotated image was not working
- y+height must be <= bitmap.getHeight(); HOT 1
- we can crop image out of image size with transparency background? Help us please
- cropper.crop() cropping incorrectly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from croppernocropper.