android layout marginstart,Android ConstraintLayout边距无法正常工作

如图所示,视图框呈现在当前位置,但内容不是.文本视图以及图像视图的呈现方式就像没有任何边距一样.当我运行应用程序时,它们也无法正确渲染(第二张图像).我不知道是什么原因造成的.

l3par.png

BxNBA.png

编辑:我忘了包含我的xml:

xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:tools="http://schemas.android.com/tools"

xmlns:card_view="http://schemas.android.com/apk/res-auto"

android:id="@+id/card_view"

android:layout_width="match_parent"

android:layout_height="wrap_content"

card_view:cardCornerRadius="2dp"

card_view:cardElevation="2dp"

android:layout_margin="12dp">

android:id="@+id/constraint"

android:layout_width="match_parent"

android:layout_height="wrap_content">

android:layout_margin="8dp"

android:layout_width="24dp"

android:layout_height="24dp"

android:layout_weight="0"

android:src="@drawable/ic_expand_more_black_24dp"

android:id="@+id/card_expand_toggle"

tools:ignore="ContentDescription"

android:layout_marginTop="16dp"

card_view:layout_constraintTop_toTopOf="parent"

card_view:layout_constraintRight_toRightOf="parent"

android:layout_marginEnd="24dp" />

android:layout_margin="8dp"

android:layout_weight="1"

android:textAppearance="@android:style/TextAppearance.Material.Medium"

android:textColor="?android:attr/textColorPrimary"

android:layout_width="42dp"

android:layout_height="wrap_content"

android:text="@string/card_expand_string"

android:id="@+id/textView3"

card_view:layout_constraintTop_toTopOf="parent"

android:layout_marginStart="16dp"

card_view:layout_constraintLeft_toLeftOf="parent"

android:layout_marginTop="16dp" />

android:layout_height="wrap_content"

android:id="@+id/extra_information"

android:layout_width="wrap_content"

tools:text="ToleToleToleInfo"

card_view:layout_constraintLeft_toLeftOf="@+id/textView3"

android:layout_marginTop="8dp"

card_view:layout_constraintTop_toBottomOf="@+id/textView3"

card_view:layout_constraintBottom_toBottomOf="parent"

android:layout_marginBottom="16dp" />

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值