Android 利润的影响?
设计是一个线性布局,里面有一件羊毛衫和一个背景色,很简单 通过单击任何视图(视图1、视图2…),可以动态添加其他布局。这些新布局“推”出了容纳Cardview的线性布局。我认为这不会影响我想要达到的效果 我想得到你在下一张图片中看到的效果Android 利润的影响?,android,android-layout,android-layout-editor,Android,Android Layout,Android Layout Editor,设计是一个线性布局,里面有一件羊毛衫和一个背景色,很简单 通过单击任何视图(视图1、视图2…),可以动态添加其他布局。这些新布局“推”出了容纳Cardview的线性布局。我认为这不会影响我想要达到的效果 我想得到你在下一张图片中看到的效果 有什么想法吗?为此,您需要使用ConstraintLayout <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xm
有什么想法吗?为此,您需要使用ConstraintLayout
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView
android:id="@+id/abc"
android:layout_width="match_parent"
android:layout_height="150dp"
app:layout_constraintTop_toTopOf="linearLayout"
app:layout_constraintBottom_toTopOf="linearLayout"/>
<LinearLayout>
....Your Layout Code.....
</LinearLayout/>
</android.support.constraint.ConstraintLayout>
……您的布局代码。。。。。
为此,您需要使用ConstraintLayout
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView
android:id="@+id/abc"
android:layout_width="match_parent"
android:layout_height="150dp"
app:layout_constraintTop_toTopOf="linearLayout"
app:layout_constraintBottom_toTopOf="linearLayout"/>
<LinearLayout>
....Your Layout Code.....
</LinearLayout/>
</android.support.constraint.ConstraintLayout>
……您的布局代码。。。。。