CaptchaImageView icon indicating copy to clipboard operation
CaptchaImageView copied to clipboard

Text size problem on High res devices and tablets

Open khalid-mahmood opened this issue 6 years ago • 5 comments

Font size is too small for high res devices like xxxhdpi and tables

khalid-mahmood avatar Sep 30 '18 15:09 khalid-mahmood

any solution of font size?

wesoft1001 avatar Jan 22 '20 08:01 wesoft1001

Font size is too small for high res devices like xxxhdpi and tables in function: private static String drawRandomText set the textSizeRange arry variable as follows int[] textSizeRange = {100, 120, 140, 150};

sahuajay86 avatar Apr 19 '20 15:04 sahuajay86

Hello, How can I increase text size?

santacoderofficial avatar Nov 09 '21 16:11 santacoderofficial

I used scaleX and scaleY to zoom the text, it worked fine.

<test.jinesh.captchaimageviewlib.CaptchaImageView
    android:id="@+id/image"
    android:layout_width="wrap_content"
    android:layout_height="@dimen/_30sdp"
    android:scaleX="2"
    android:scaleY="2"
/>

AsmaTidafi avatar Apr 06 '22 13:04 AsmaTidafi

Setting hard code value for scaleX and scaleY will not work for all resolutions if we set it to 2, then the image will be over sized for low res devices, a better solution is to add dimen files for each resolution and define dimen values like 1, 1.5, 2 etc for each density, and use that dimen value for scaleX and scaleY.

devkumar2486 avatar Mar 23 '23 07:03 devkumar2486