У меня есть файл макета в моем приложении Android, как показано ниже;
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/myPage"
android:theme="@style/login"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<ImageView
android:id="@+id/myimageview"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="50dp"
android:src="@drawable/mypicture"/>
<com.myapp.RobotoTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/myimageview"
android:layout_marginBottom="10dp"
android:gravity="center"
android:text="@string/mystring"
android:textColor="#fff"
android:textSize="12sp"
app:rt_fontWeight="light" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_alignParentBottom="true"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:orientation="vertical">
<android.support.design.widget.TextInputLayout
android:id="@+id/password_text_input_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
app:theme="@style/loginTheme">
<android.support.v7.widget.AppCompatEditText
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:hint="@string/password"
android:inputType="textPassword" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>
</RelativeLayout>
Я хочу поместить пробел между RelativeLayout , который содержит RobotoTextView
и LinearLayout под этим макетом. Они находятся на одном уровне в моем файле макета. Также мое приложение должно работать на разных разрешениях экрана.
Это должно быть что-то вроде ограничения между RobotoTextView и LinearLayout в этом текстовом представлении.
Я попытался android:layout_marginTop
в LinearLayout, но это не сработало. RobotoTextView перекрывается с текстовым представлением под LinearLayout