-
Notifications
You must be signed in to change notification settings - Fork 41
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
Load custom bitmap #1
Comments
Hi taimur97, You may use getMainView() to get the imageView in your stickerView and try to set the scale type of it. Default is fitXY. Maybe set it to fitCenter solve your problem. |
I am trying to do it will it work if I change the layout params in StckerImageView file? And after adding the text on screen when I resize it it resizes just like an image How can I change that behavior.. It should change the length but the height should remain half so it doesn't look like a square |
The layout params you mention in StickerImageView actually only affect how the imageView behave when the parent container (I.E the Framelayout) change it size. But if you want to make, say, a 150x180 photo to show on a square imageView, it's the scaleType that we should change. And I don't recommend you make change on the original file. But for your second question, it may be a good request for the new feature, but to solve your problem fast, you can consider change not to use "AutoResizeTextView" in the StickerTextView class. AutoResizeTextView make the text behave like image, when you resize your container, the text will also become larger. So changing from AutoResizeTextView to normal TextView can make your container larger but the text size remain unchanged. Hope it helps :) |
I have solved the image issue but the text issue is still present. I tried changing from AutoresizeTextView to simple Textview but it didn't help. One way to solve it is if we change ratio at which the height of the text is resized. If it resizes half the length of width when size is changed the problem will be solved. |
Hi taimur97, I am sorry that currently it would always be a square border but changing to normal textview can help to show all the text in a single line instead of resizing the text. I appreciate if you can push a new feature branch regarding your issue, thanks a lot. |
When I load a bitmap it resizes it How can I load a resized sticker say like 150px by 180px? I tried changing the layout params from match_parent to different sizes but it didn't work and I also tried scalling the bitmap before loading it in StickerView but StickerView resizes it
Please help...
The text was updated successfully, but these errors were encountered: