2 qq 31130725 qq_31130725 于 2016.09.19 10:24 提问

用RecyclerView 做瀑布流,item来回动?

用RecyclerView 做瀑布流, notifyDataSetChanged()之后,item来回动?
notify之后第一和第二个位置顶部有高度差

右边的item可能跑到左边

图片说明

3个回答

qq_28510593
qq_28510593   2016.09.19 11:38

package com.oracle.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.oracle.domain.Book;
import com.oracle.domain.Category;
import com.oracle.service.BaseServlet;
import com.oracle.service.BookService;
import com.oracle.service.CategoryService;

public class BookServlet extends BaseServlet {
BookService bookService=new BookService();
public String findAll(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
List booklist = bookService.findAll();
request.setAttribute("booklist", booklist);
return "f:/jsps/book/list.jsp";
}
public String findByCid(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String cid = request.getParameter("cid");
List booklist = bookService.findByCid(cid);
request.setAttribute("booklist", booklist);
return "f:/jsps/book/list.jsp";
}

public String findByBid(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
    String bid = request.getParameter("bid");
     Book book = bookService.findByBid(bid);
     System.out.println(book);
    request.setAttribute("book", book);
    return "f:/jsps/book/desc.jsp";
}

}

qq_27665781
qq_27665781   Rxr 2016.09.19 11:57

不来回动怎么叫瀑布流?

Mr_dsw
Mr_dsw   Ds   Rxr 2016.09.19 23:20

网上有现成的例子,gradle的流行布局

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!