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

为什么要用DialogFragment来做交互界面? #2

Open
linzhengloser opened this issue May 10, 2017 · 7 comments
Open

为什么要用DialogFragment来做交互界面? #2

linzhengloser opened this issue May 10, 2017 · 7 comments

Comments

@linzhengloser
Copy link

是用默认的style状态栏是黑色的,怎么把状态设置成透明的?

@Qiang3570
Copy link
Owner

在styles.xml中设置android:windowTranslucentStatus属性为true。
在布局文件中设置android:fitsSystemWindows属性为true。

@linzhengloser
Copy link
Author

谢谢,还是不太理解为什么要用DialogFragment ?

@Qiang3570
Copy link
Owner

为了软键盘弹出直播模块不随屏幕上移。

@linzhengloser
Copy link
Author

但是我把ViewPager直接写在Activity的布局中,然后在 Manifest中加上 android:windowSoftInputMode="adjustResize" 在软件盘弹出的时候,直播模块也会随着屏幕上移。

@Qiang3570
Copy link
Owner

在DialogFragment中不会

@linzhengloser
Copy link
Author

不好意识我说反了 我设置了 android:windowSoftInputMode="adjustResize" 直播模块也不会随着输入法上移。总之意识就是 我把ViewPager放在Activity中和使用DialogFragment实现的效果是一样的,所以我搞不懂为什么要DialogFragment实现?还有为什么你这个项目中默认EditText 默认不会获取焦点?这个是怎么实现的?

@Qiang3570
Copy link
Owner

可能我不太理解你的意思,你可以看git项目中的gif示例图,当软键盘弹出的时候,美女所在的模块,也就是直播模块不会随交互模块(聊天+礼物)上移,你说和你在Activity实现的是一样的?建议你加群或者加我QQ更方便沟通:956595454

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

No branches or pull requests

2 participants