MyRank.java 文件源码

java
阅读 32 收藏 0 点赞 0 评论 0

项目:Shared-Route 作者:
@Override
protected void onPostExecute(Void aVoid) {
    super.onPostExecute(aVoid);
    if (itemList.size() == 0) Toast.makeText(MyRank.this, "发生未知错误",Toast.LENGTH_SHORT).show();
    RecyclerView rankList = findViewById(R.id.rank_list);
    ReleaseRankItemAdapter adapter = new ReleaseRankItemAdapter(itemList);
    GridLayoutManager layoutManager = new GridLayoutManager(MyRank.this, 1);
    rankList.setLayoutManager(layoutManager);
    rankList.setAdapter(adapter);

    TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 2f, Animation.RELATIVE_TO_SELF,
            0f, Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 0);
    animation.setInterpolator(new DecelerateInterpolator());
    animation.setDuration(550);

    lac = new LayoutAnimationController(animation, 0.12f);
    lac.setInterpolator(new DecelerateInterpolator());
    rankList.setLayoutAnimation(lac);

    RecyclerView ranklist1 = findViewById(R.id.rank_list1);
    ReleaseRankItemAdapter adapter1 = new ReleaseRankItemAdapter(itemListOthers);
    GridLayoutManager layoutManager1 = new GridLayoutManager(MyRank.this,1);
    ranklist1.setLayoutManager(layoutManager1);
    ranklist1.setAdapter(adapter1);
    ranklist1.setLayoutAnimation(lac);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号