0
這是我的Activity.xml文件。我把AppCompatEditText放在TextInputLayout裏面。我希望提示能夠在帶有上標文本的html表單中顯示,但它不會發生。所有文本都顯示爲普通文本。有沒有辦法解決?如何在Android中的TextInputLayout中顯示Superscripted提示?我似乎無法弄清楚。這是我的代碼
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp">
<android.support.v7.widget.AppCompatEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/acceleration_unit_ms2"
android:inputType="numberDecimal"
android:id="@+id/acceleration_unit_ms2"/>
</android.support.design.widget.TextInputLayout>
的strings.xml
<string name="acceleration_unit_ms2">Meter/Second Square (m/s<sup><small>2</small></sup>)</string>
還沒有上標文字。 –
@ChiranjeevJain編輯了我的答案。現在試試。 –