我有一個EditText,當輸入任何數字時,$符號應該基於字符串輸入移動。例如,如果我輸入20,$符號應該向右移動,它應該是20 $。如果我輸入200,$符號應該向右移動,它應該是200 $。任何幫助將不勝感激。
這是我的代碼看起來是截至目前:`
<EditText
android:id="@+id/amount_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/space_normal"
app1:inputTextSize="@dimen/text_large"
app1:inputIconDrawable="@drawable/ic_dollar_sign"
app1:inputIconTint="@color/colorDark"
app1:inputOneHint="@string/offer_amount"
app1:inputIconTranslateY="@dimen/offer_large_text_icon_shift"
app1:inputType="number"/>
`
那你試試? http://stackoverflow.com/help/how-to-ask – PaulProgrammer
只是一個語義問題,但不是美元符號通常駐留在數字的左側?例如$ 200 – RayfenWindspear
@RayfenWindspear:是的,但是,將它放在正確的位置就是要求。 – user1903022