【发布时间】:2020-03-03 17:27:06
【问题描述】:
我需要将我的视图放在边框中,以便它位于布局的最左侧,并希望将其应用于所有不同尺寸的手机!?
例子:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="285dp"
android:text="@string/textView"
android:textSize="28sp" />
</LinearLayout>
现在这段代码输出如下 Layout,我需要这样做而不使用边距来匹配所有手机尺寸
【问题讨论】:
-
请上传这个案例的图片原型,我来帮你。
-
完成,谢谢你的帮助:D