AriesHoo / UIWidget

一个集成TabLayout、UIAlertDialog、UIActionSheetDialog、UIProgressDialog、TitleBarView(自带沉浸式标题栏)、CollapsingTitleBarLayout、RadiusView(圆角及状态背景设置View解放shape文件)、KeyboardHelper(软键盘控制及遮挡控制类)、StatusViewHelper(状态栏沉浸帮助类)、NavigationViewHelper(导航栏沉浸式帮助类)、AlphaViewHelper(View透明度控制帮助类) 等项目常用UI库
Apache License 2.0
425 stars 74 forks source link

titlebarview被遮挡 #51

Closed sceneren closed 2 years ago

sceneren commented 3 years ago

image image

`<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">

<include layout="@layout/lib_base_title_bar_view" />

<androidx.core.widget.NestedScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:padding="@dimen/dp_16">

        <Button
            android:id="@+id/btnTab"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="中间凸出的TabLayout"
            android:textColor="@color/white" />

        <Button
            android:id="@+id/btnTest"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="测试RecyclerView" />

        <Button
            android:id="@+id/btnRecyclerViewStickyHeader"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="吸顶的RecyclerView" />

        <Button
            android:id="@+id/btnMvpRecyclerView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="MVP RecyclerView"
            android:textAllCaps="false" />

        <Button
            android:id="@+id/btn_choose_image"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="选择图片"
            android:textAllCaps="false" />

        <EditText
            android:id="@+id/et_text"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="200dp"
            android:hint="请输入内容" />

    </LinearLayout>
</androidx.core.widget.NestedScrollView>

`

AriesHoo commented 3 years ago

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="false" android:background="@android:color/holo_purple" android:orientation="vertical">

<androidx.core.widget.NestedScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:padding="@dimen/dp_margin_item">

        <Button
            android:id="@+id/btnTab"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="中间凸出的TabLayout"
            android:textColor="@color/white" />

        <Button
            android:id="@+id/btnTest"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="测试RecyclerView" />

        <Button
            android:id="@+id/btnRecyclerViewStickyHeader"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="吸顶的RecyclerView" />

        <Button
            android:id="@+id/btnMvpRecyclerView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="MVP RecyclerView"
            android:textAllCaps="false" />

        <Button
            android:id="@+id/btn_choose_image"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="选择图片"
            android:textAllCaps="false" />

        <EditText
            android:id="@+id/et_text"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="200dp"
            android:hint="请输入内容" />

    </LinearLayout>
</androidx.core.widget.NestedScrollView>

fast_layout_title_bar.xml 如下

<?xml version="1.0" encoding="utf-8"?> <com.aries.ui.view.title.TitleBarView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/titleBar_headFastLib" android:layout_width="match_parent" android:layout_height="@dimen/dp_title_height" android:background="@color/colorTitleBackground" app:title_actionTextColor="@color/colorTitleText" app:title_dividerBackground="@color/colorTitleDivider" app:title_dividerHeight="@dimen/dp_line_size" app:title_leftTextColor="@color/colorTitleText" app:title_rightTextColor="@color/colorTitleText" app:title_titleMainTextColor="@color/colorTitleText" app:title_titleSubTextColor="@color/colorTitleText"/> 我按照这个xml布局未出现你说的titleBar 被这遮住情况,不知你include 的layout如何的

AriesHoo commented 3 years ago

image

AriesHoo commented 3 years ago

image

AriesHoo commented 3 years ago

图片顶部全白色的为TitleBarView

sceneren commented 3 years ago

image

我用FastLib的demo试了下没问题,但是自己写的就有问题 不知道原因

AriesHoo commented 3 years ago

你检查下版本是否最新,想你那种整个titleBar都不见了的情况确实还没有遇到过,之前只出现过文字被遮住显示不全的问题

sceneren commented 3 years ago

版本是最新的,已经替换为com.gyf.immersionbar:immersionbar 来实现沉浸式就正常了