不同的项目布局(item layout) Listview一种单一的item 布局有时候不能完全满足业务需求,我们需要加载两种或两种以上不同的布局,实现方法很简单: 重写 getViewTypeCount() – 返回你有多少个不同的布局 重写 getItemViewType(int) – 由position返回view type id 根据view item的类型,在getView中创建正确的convertView 代码: public class MainActivity extends A
如果页面样式的背景图片路径设置为'' 或 '#', 会导致页面被重复加载两次 (Chrome.56.0.2924.87 测试) 因为:空图片路径属性值,默认加载当前页面的URL作为图片路径 Safari and Chrome make a request to the actual page itself. Internet Explorer makes a request to the directory in which the page is located. -- 不确定这个描述的严
当使用RotatingFileHandler作为django的日志处理器的时候,会报: Traceback (most recent call last): File "C:\Python27\lib\logging\handlers.py", line 78, in emit self.doRollover() File "C:\Python27\lib\logging\handlers.py", line 141, in doRollover os.rename