hss01248 / pagestatemanager Goto Github PK
View Code? Open in Web Editor NEWmanage the loading,emtpy,error state of page, use in xml or just in code
License: Apache License 2.0
manage the loading,emtpy,error state of page, use in xml or just in code
License: Apache License 2.0
作者你好,我想问一下如果我要自定义三个状态页面,各个页面里的各个view的监听事件怎么实现?
比如现在想自定义一个errorStatePage,里面有个button的监听事件要怎么去实现?
你好,Android x 版本能使用么?
具体错误日志:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.srwl.www/com.srwl.www.activity.TicketInfoActivity}: java.lang.NullPointerException
Caused by: java.lang.NullPointerException
caused by指向的代码是这句:pageStateManager = PageManager.init(this, "找不到相关航班信息,请返回重新查询", true, new Runnable() {....
我是直接把你的三个状态页的xml文件拿来修改的,里面并没有增加控件,只是改了文字内容和图片内容而已。然后在application中初始化: PageManager.initInApp(getApplicationContext(), R.layout.page_empty,R.layout.pager_loading,R.layout.pager_error);
这样子做应该没错把?
第一个Fragment的页面管理用view的那个方法,
第二个Fragment的页面管理用Fragment的对象,
现象第一个Fragment空白.
第二个Fragment的页面改用view则无此现象
在PageManager类中
private void setupRetryLayout(PageListener listener, PageLayout loadingAndRetryLayout) { if (listener.isSetRetryLayout()) { int layoutId = listener.generateRetryLayoutId(); if (layoutId != NO_LAYOUT_ID) { loadingAndRetryLayout.setLoadingView(layoutId); } else { loadingAndRetryLayout.setLoadingView(listener.generateRetryLayout()); } } else { if (BASE_RETRY_LAYOUT_ID != NO_LAYOUT_ID) loadingAndRetryLayout.setRetryView(BASE_RETRY_LAYOUT_ID); } }
在setupRetryLayout中是不是应该是setRetryView,你现在全部用的是setLoadingView,请问是不是错位了。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.