【问题标题】:strange text in CoordinatorLayoutCoordinatorLayout 中的奇怪文本
【发布时间】:2017-03-28 23:17:16
【问题描述】:

我的CoordinatorLayout 中有应用名称显示,但我想删除它,所以要找到该文本或视图,我的XML 文件没有此文本视图

XML 文件代码:

 <android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">


<android.support.design.widget.AppBarLayout
    android:id="@+id/htab_appbar"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">

    <android.support.design.widget.CollapsingToolbarLayout
        android:id="@+id/htab_collapse_toolbar"
        android:layout_width="match_parent"
        android:layout_height="400dp">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="100dp" />

    </android.support.design.widget.CollapsingToolbarLayout>

</android.support.design.widget.AppBarLayout>

【问题讨论】:

    标签: android xml android-layout android-coordinatorlayout


    【解决方案1】:

    应该使用

    app:titleEnabled="false" 
    

    在 CollapsingToolbarLayout 中

    【讨论】:

      【解决方案2】:
      Toolbar toolbar = (Toolbar) findviewbyid(R.id.toolbar);
      toolbar.setTitle(null);
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-05-12
        • 2018-01-17
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多