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

增加完全自定义状态视图功能 #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lindroy
Copy link
Contributor

@lindroy lindroy commented Dec 17, 2019

作者你好,在最近的项目中遇到这样的需求:在用户未登录时,不显示页面内容,而是显示一个提示用户登录并且有点击跳转到登录页面的视图(我已在代码中添加了类似的例子,可以查看need_login.xml)。所以我觉得应该预留一个可以完全自定义布局的视图,以备不时之需。
在这次的pr中,我主要增加了两个功能:

  1. 开发者可以在xml文件(使用属性app:customView)或者代码中添加自定义的视图(使用方法showCustomView());
  2. 可以在方法showCustomView()中设置任意需要监听点击事件的控件Id。
    pr仅供参考,但还是希望可以加上这个功能,如果还有其他更好的写法,也欢迎交流。

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

Successfully merging this pull request may close these issues.

None yet

1 participant