michaldrabik / classicmaterialtimepicker

Classic Material Time Picker
57 stars 10 forks source link

When language is Arabic seconds don't appear correctly #10

Closed ShKhan9 closed 3 years ago

ShKhan9 commented 3 years ago

Hi, i use this library for changing time , but it doesn't show Arabic numbers correctly may be you need to decrease font size or increase width of the dialog ????

developerGM commented 3 years ago

I have the same results. I have tried to resize font but the hours are cutted. I think that you need set TextView width autoSize and force lines=1

image

michaldrabik commented 3 years ago

@developerGM I'll be checking this. What are your settings to replicate this? Thanks

developerGM commented 3 years ago

Set style as this and I am using a custom font ("gt_america")

    <!--    Timepicker style-->
    <style name="CmtpDialogFrameStyle" parent="CmtpDialogTheme">
        <item name="android:windowBackground">@drawable/timepicker_dialog</item>
    </style>

    <style name="CmtpDialogPositiveButtonStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
        <item name="android:textColor">@color/primary</item>
        <item name="android:textSize">18sp</item>
    </style>

    <style name="CmtpDialogNegativeButtonStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
        <item name="android:textColor">#A8A8A8</item>
        <item name="android:textSize">18sp</item>
    </style>

    <style name="CmtpViewTheme">
        <item name="cmtpTextFrameDrawable">@drawable/timepicker_text_frame</item>
        <item name="cmtpTextColor">@color/black</item>
        <item name="cmtpTextSize">20sp</item>
    </style>
michaldrabik commented 3 years ago

@developerGM I've made some modifications which should hopefully help. You can test it out by updating to version 1.1.3

developerGM commented 3 years ago

@michaldrabik now it works. Thanks

michaldrabik commented 3 years ago

Closing. Feel free to reopen if any more issues occur.