Android studio 如何将edittext与setText对齐,以及如何在其上绘制而不是仅在顶部绘制
我正在尝试做一个签名应用程序,用户可以在表单上签名,并找到以下代码。它还包含签名类,但我还没有上传到这里,不确定是否需要它。我可以将以下edittext与我的setText一起显示,但不确定如何将这两个edittext对齐?我在某个地方读到,我需要使用TableLayout来实现这一点?我也只能使用edittext上面的signature类,现在就在上面Android studio 如何将edittext与setText对齐,以及如何在其上绘制而不是仅在顶部绘制,android-studio,Android Studio,我正在尝试做一个签名应用程序,用户可以在表单上签名,并找到以下代码。它还包含签名类,但我还没有上传到这里,不确定是否需要它。我可以将以下edittext与我的setText一起显示,但不确定如何将这两个edittext对齐?我在某个地方读到,我需要使用TableLayout来实现这一点?我也只能使用edittext上面的signature类,现在就在上面 <?xml version="1.0" encoding="utf-8"?> <T
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.yesmeansyes.MainActivity">
<com.kyanogen.signatureview.SignatureView
xmlns:sign="http://schemas.android.com/apk/res-auto"
android:id="@+id/signature_view"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="0dp"
sign:penSize="5dp"
sign:backgroundColor="#ffffff"
sign:penColor="#000000"
sign:enableSignature="true"/>
<TableRow
android:layout_marginTop="61dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="20sp"
android:layout_marginBottom="150dp"
android:textAppearance="@color/common_google_signin_btn_text_dark"
android:gravity="center_vertical"
android:id="@+id/message"/>
<EditText
android:layout_width="70dp"
android:layout_height="70dp"
android:paddingRight="90dp"
android:maxLength="15"
android:id="@+id/person"
tools:ignore="RtlSymmetry" />
<EditText
android:layout_width="70dp"
android:layout_height="70dp"
android:maxLength="15"
android:id="@+id/person2"
tools:ignore="RtlSymmetry" />
</TableRow>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/clear"
android:text="clear"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/save"
android:text="save"/>
</TableLayout>