【问题标题】:How to add line below Material Toolbar in android?如何在android中的Material Toolbar下方添加行?
【发布时间】:2021-08-31 03:03:44
【问题描述】:

默认情况下,material toolbar 如果在协调器布局中使用,则具有高程,有没有更好的方法在 toolbar 下方添加 1dp 线或笔划而不是高程以将其与 Views 的其余部分分开,与 Twitter 应用程序完全一样吗?

【问题讨论】:

    标签: android android-layout android-toolbar material-components-android


    【解决方案1】:

    使用视图制作水平线

    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="#2d2d2d"/>
    

    将此代码放在工具栏下方

    【讨论】:

      猜你喜欢
      • 2014-12-28
      • 2015-07-20
      • 1970-01-01
      • 2023-03-29
      • 2023-03-10
      • 1970-01-01
      • 2021-12-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多