我在RelativeLayout中有一個EditText,其中EditText中文本的頂部被截斷。我曾嘗試增加EditText的填充,但即使在20dp時,文本仍然會被裁剪。在EditText中截斷文本的頂部
我試圖在這裏發佈圖片,但顯然我沒有足夠的名譽爲stackoverflow允許我發佈一個。想象一下像你在小學時那樣在中間水平放置一條帶紋線的紙。虛線以上的文字會被裁剪掉。
這裏是我的layout.xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView android:id="@+id/questionTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="0dp"
android:layout_marginLeft="10dp"
android:textSize="16dp"
android:text="Audit Question"/>
<RadioButton android:id="@+id/answerRadioButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/questionTextView"
android:layout_alignLeft="@id/questionTextView"
android:layout_marginTop="5dp"
android:checked="true"
android:textSize="16dp"
android:text="audit answer"/>
<EditText android:id="@+id/commentEditText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/answerRadioButton"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="10dp"
android:padding="20dp" />
</RelativeLayout>
任何幫助將不勝感激。
我曾嘗試過,但也沒有奏效。 – NLam