我在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