0
我有簡單recycler_view_item,我已經得到了應表現出一定的量(像左)文本視圖 recycler_view_item的TextView:TextView的內容對準左
<TextView
android:text="500"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/debtors_item_leftamount"
android:textSize="@dimen/debtors_left_amount_size"
android:layout_weight="1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintRight_toLeftOf="@+id/debtors_item_arrow"
android:layout_marginEnd="32dp"
android:textAlignment="textStart"
android:layout_marginRight="32dp"/>
是否有人知道如何使它是對齊左邊就像在正確的形象?
我已經試過
android:textAlignment="textStart"
android:textAlignment="viewStart"
android:gravity=start, left, even top or any other
什麼也沒有改變。
我無法使用match_parent,因爲此TextView的父項是整個recyclerView項目,並且還有其他元素 –
但您給了我間接建議。我已經使用原始大小的寬度(例如50),然後將textAlignment設置爲textStart並且它正常工作! –