有没有可能让LinearLayout中的第一个视图与第二个视图重叠显示?
我想要这样布局我的视图:
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_alignParentRight="true" >
<TextView
android:id="@+id/firstTextView"
android:layout_width="wrap_content"
android:layout_height="wrapContent" />
<TextView
android:id="@+id/secondTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
但是我需要我的第一个视图从布局中的firstTextView开始,覆盖在secondTextView上方。这种情况是否可行?我正在使用LinearLayout,因为我也在尝试使用边距来获取重叠效果。
secondTextView
吗? - codeMagicRelativeLayout
呢?默认情况下,两者都将在左上角,然后您可以从那里调整margins
,如果我理解您的意思的话。 - codeMagic