Android组件SwiperRefreshLayout的上拉加载更多实现

2017-03-31 09:10:20   朋也   Android学习笔记   Android SwiperRefreshLayout LoadMore  

android自带的SwiperRefreshLayout布局已经实现了下拉刷新,但为啥不给上拉加载也实现了呢。。

想起了以前用过的APP,发现CNodeMD的原生客户端里有,于是就扣了下代码,下面来分享一下

特别感谢@TakWolf大大的开源项目,学了好多Android方面的东西

Jodd开发web项目教程总结

2017-03-23 16:05:20   朋也   jodd学习笔记   jodd  

jodd大量的工具类,基本上包揽了开发web项目中的使用,然后由于它的轻巧,总共大小不足1.5M,让我更加的喜欢。

http://jodd.org/

下面说说我折腾的结果

构建web项目直接使用大神整理好的一个依赖就可以了 jodd-joy

http://joddframework.org/

Madvoc(mvc): http://jodd.org/doc/madvoc/

markdown与asciidoc简单写法区别

2017-03-19 12:15:20   朋也   杂项   markdown asciidoc  

最近看spring-projects/spring-boot的源码,里面的README用的是asciidoc语法写的,很好奇就学了一下,下面记录一下跟markdown的区别

标题

markdown

# -> h1
## -> h2
### -> h3
...
###### -> h6

thymeleaf模板属性的用法

2017-03-09 15:34:20   朋也   spring-boot学习笔记   thymeleaf attribute  

下面说到的在thymeleaf官网上都可以找到,这里只做个总结

thymeleaf模板里用spring-security的tags

官网链接 http://www.thymeleaf.org/doc/articles/springsecurity.html

注意 没有hasPermission()方法,在pom.xml里要引入

<dependency>
    <groupId>org.thymeleaf.extras</groupId>
    <artifactId>thymeleaf-extras-springsecurity4</artifactId>
</dependency>

thymeleaf模板布局用法

2017-03-09 15:34:20   朋也   spring-boot学习笔记   thymeleaf template  

thymeleaf的layout常用的有两种方式用法

第一种

将页面里的每个部分都分成 -> fragment 使用 th:includeth:replace 来引入页面

这种用法没有layout的概念, 因为每个部分都是 fragment, 下面例子说明

<!-- index.html -->
<html>
  <head>
    <meta charset="utf-8"/>
    <title>demo</title>
  </head>
  <body>
    <div th:include="components/header :: header"></div>
    <div class="container">
      <h1>hello world</h1>
    </div>
    <div th:include="components/footer :: footer"></div>
  </body>
</html>

       13 / 16