MoneyTextView
MoneyTextView copied to clipboard
Text bounds are not calculated properly
Hi, I can't found a pattern, but the calculus of bounds is wrong. Here my code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent">
<org.fabiomsr.moneytextview.MoneyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:amount="1256.56"
app:gravity="center"
app:symbolTextSize="45sp"
app:decimalDigitsTextSize="45sp"
app:baseTextSize="45sp"
app:decimalSeparator="."
app:symbol="$"/>
<org.fabiomsr.moneytextview.MoneyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:gravity="center"
app:amount="1.23"
app:symbolTextSize="45sp"
app:decimalDigitsTextSize="45sp"
app:baseTextSize="45sp"
app:decimalSeparator="."
app:symbol="$"/>
<org.fabiomsr.moneytextview.MoneyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:gravity="center"
app:amount="1.44"
app:symbolTextSize="45sp"
app:decimalDigitsTextSize="45sp"
app:baseTextSize="45sp"
app:decimalSeparator="."
app:symbol="$"/>
</LinearLayout>
I try this with the last version 1.1.0, and this is the result (the integer and symbol section is not aligned with decimal part):
In previus version: