程序问答   发布时间:2022-06-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了LinearLayout 问题自动调整高度(Kotlin / Android)大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决LinearLayout 问题自动调整高度(Kotlin / Android)?

开发过程中遇到LinearLayout 问题自动调整高度(Kotlin / Android)的问题如何解决?下面主要结合日常开发的经验,给出你关于LinearLayout 问题自动调整高度(Kotlin / Android)的解决方法建议,希望对你解决LinearLayout 问题自动调整高度(Kotlin / Android)有所启发或帮助;

我在让线性布局的高度自动增加以适合我的内容时遇到问题。正如您在下面的屏幕截图中看到的那样,日期文本被截断了。关于如何解决这个问题的任何想法,请?谢谢。

LinearLayout 问题自动调整高度(Kotlin / Android)

<linearLayout
    androID:ID="@+ID/Boxes_vIEw_case_details"
    androID:layout_wIDth="match_parent"
    androID:layout_height="wrap_content"
    androID:orIEntation="horizontal"
    androID:layout_margintop="8dp"
    androID:layout_marginStart="32dp"
    androID:layout_marginEnd="32dp"
    app:layout_consTrainttop_toBottomOf="@ID/color_bar_case_details"
    app:layout_consTraintleft_toleftOf="parent"
    app:layout_consTraintright_toRightOf="parent"
    androID:weightSum="3">


    <linearLayout
        androID:layout_wIDth="0dp"
        androID:layout_height="match_parent"
        androID:orIEntation="vertical"
        androID:layout_weight="1"
        androID:BACkground="@color/white"
        androID:elevation="6dp"
        androID:layout_margintop="6dp"
        androID:layout_marginBottom="6dp"
        androID:layout_marginStart="6dp"
        androID:layout_marginEnd="6dp"
        androID:weightSum="2">

        <TextVIEw
            androID:ID="@+ID/form_type_case_details"
            androID:layout_wIDth="match_parent"
            androID:layout_height="0dp"
            androID:text="N-400"
            androID:BACkground="@color/white"
            androID:textStyle="bold"
            androID:textcolor="@color/black"
            androID:textSize="17sp"
            androID:gravity="center"
            androID:layout_weight="1.2"
            />

        <TextVIEw
            androID:layout_wIDth="match_parent"
            androID:layout_height="0dp"
            androID:text="Form"
            androID:textcolor="@color/black"
            androID:textSize="10sp"
            androID:layout_weight="0.8"
            androID:gravity="center"
            androID:layout_marginBottom="4dp"
            />

    </linearLayout>


    <linearLayout
        androID:layout_wIDth="0dp"
        androID:layout_height="match_parent"
        androID:orIEntation="vertical"
        androID:layout_weight="1"
        androID:BACkground="@color/white"
        androID:elevation="6dp"
        androID:layout_margintop="6dp"
        androID:layout_marginBottom="6dp"
        androID:layout_marginStart="6dp"
        androID:layout_marginEnd="6dp"
        androID:gravity="center"
        androID:weightSum="2">

        <TextVIEw
            androID:ID="@+ID/last_updated_date_case_details"
            androID:layout_wIDth="match_parent"
            androID:layout_height="0dp"
            androID:text="Apr 13,2021"
            androID:textStyle="bold"
            androID:textcolor="@color/black"
            androID:textSize="17sp"
            androID:layout_weight="1.2"
            androID:gravity="center"
            androID:layout_margintop="4dp"
            />

        <TextVIEw
            androID:layout_wIDth="match_parent"
            androID:layout_height="0dp"
            androID:text="Last updated"
            androID:textcolor="@color/black"
            androID:textSize="10sp"
            androID:layout_weight="0.8"
            androID:gravity="center"
            androID:layout_marginBottom="4dp"
            />

    </linearLayout>

    <linearLayout
        androID:layout_wIDth="0dp"
        androID:layout_height="match_parent"
        androID:orIEntation="vertical"
        androID:layout_weight="1"
        androID:BACkground="@color/white"
        androID:elevation="6dp"
        androID:layout_margintop="6dp"
        androID:layout_marginBottom="6dp"
        androID:layout_marginStart="6dp"
        androID:layout_marginEnd="6dp"
        androID:gravity="center"
        androID:weightSum="2">

        <TextVIEw
            androID:ID="@+ID/days_since_case_details"
            androID:layout_wIDth="match_parent"
            androID:layout_height="0dp"
            androID:text="19"
            androID:textStyle="bold"
            androID:textcolor="@color/black"
            androID:textSize="17sp"
            androID:gravity="center"
            androID:layout_weight="1.2"
            />

        <TextVIEw
            androID:layout_wIDth="match_parent"
            androID:layout_height="0dp"
            androID:text="Days Since\nLast update"
            androID:textcolor="@color/black"
            androID:textSize="10sp"
            androID:textAlignment="center"
            androID:layout_weight="0.8"
            androID:layout_marginBottom="4dp"
            />

    </linearLayout>

</linearLayout>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

大佬总结

以上是大佬教程为你收集整理的LinearLayout 问题自动调整高度(Kotlin / Android)全部内容,希望文章能够帮你解决LinearLayout 问题自动调整高度(Kotlin / Android)所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。