Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 在xml中管理宽度_Android_Xml_Width - Fatal编程技术网

Android 在xml中管理宽度

Android 在xml中管理宽度,android,xml,width,Android,Xml,Width,我正在android studio中处理xml文件 我希望“姓氏EditText”和“nameEditText”旁边有箭头,宽度与它们下面的输入表单相同 怎么做?这是我的密码 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android

我正在android studio中处理xml文件

我希望“姓氏EditText”和“nameEditText”旁边有箭头,宽度与它们下面的输入表单相同

怎么做?这是我的密码

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_register"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/pozadina"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.xyz.ui.RegisterActivity">

    <LinearLayout
        android:id="@+id/linearLayout2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/signUpTextView"
        android:layout_centerHorizontal="true"
        android:orientation="vertical">

        <TextView
            android:id="@+id/signUpTextView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_centerHorizontal="true"
            android:layout_marginBottom="15dp"
            android:text="Sign up"
            android:textAlignment="center"
            android:textColor="#ffffffff"
            android:textSize="30sp" />

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal">

            <EditText
                android:id="@+id/nameEditText"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="10dp"
                android:layout_weight="1"
                android:backgroundTint="#ffffffff"
                android:ems="10"
                android:hint="Name"
                android:inputType="textPersonName"
                android:textColorHint="#95ffffff" />

            <EditText
                android:id="@+id/surnameEditText"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="10dp"
                android:layout_weight="1"
                android:backgroundTint="#ffffffff"
                android:ems="10"
                android:hint="Surname"
                android:inputType="textPersonName"
                android:textColorHint="#95ffffff" />

        </LinearLayout>


    </LinearLayout>



</RelativeLayout>


顶视图只有
边距10dp
,其余视图有
边距16dp
。将俯视图的
margin
也更改为
16dp

您给其他字段的边距是多少?为姓名和姓氏设置相同的边距。现在是10dp,这是我输入表单的代码,就在这两个下面。