Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用第二种解决方案时,不使用fullScreen(true)方法,会出现导航栏空白 #11

Closed
chengzichen opened this issue May 26, 2017 · 6 comments
Labels

Comments

@chengzichen
Copy link

No description provided.

@gyf-dev
Copy link
Owner

gyf-dev commented May 26, 2017

@chengzichen
我demo里也没有使用fullScreen(true)方法呀,怎么导航栏不是空白呢?你是不是指定了transparentNavigationBar()或者transparentBar()这个方法?

@chengzichen
Copy link
Author

chengzichen commented May 27, 2017

@gyf-dev
demo中方法二,布局改为:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/darker_gray"
    android:fitsSystemWindows="true">

    <android.support.v7.widget.Toolbar
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/colorPrimary"
        app:title="方法二"
        android:gravity="top"
        app:titleTextColor="@android:color/white" />

    <TextView
        android:id="@+id/text"
        android:layout_gravity="bottom"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@color/black"
        android:textColor="@android:color/black"
        android:textSize="15sp" />
</FrameLayout>

textview,设置为android:layout_gravity="bottom",

Htc是不能沉到底部的,会有空白

@gyf-dev
Copy link
Owner

gyf-dev commented May 27, 2017

@chengzichen
系统的fitsSystemWindows不能乱用,会有意想不到的坑。我想想怎么解决吧

@gyf-dev gyf-dev added the bug label May 27, 2017
@gyf-dev
Copy link
Owner

gyf-dev commented May 27, 2017

@chengzichen
暂时这样解决,请看图标红位置,下个版本会更新,系统fitsSystemWindows属性坑太多了,不好把控。

fits

@gyf-dev gyf-dev reopened this May 27, 2017
@gyf-dev gyf-dev closed this as completed May 27, 2017
@chengzichen
Copy link
Author

刚刚试了下,还是不行 @gyf-dev

@gyf-dev
Copy link
Owner

gyf-dev commented Jun 1, 2017

@chengzichen
我在demo里测试时可以的,你加我微信详聊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants