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并且它正常工作! –