零碎知识记录

1、layout和layout-v26的区别

    安卓第26个版本,就是8.0,使用layout-v26里的页面,其他版本使用layout里的页面。


2、ScrollView这嵌套recycleView显示不完全

解决方法:此方法还有一点BUG,就是recycleView中滑动不顺利。

//去掉 recyclerView的滑动

recyclerView.setNestedScrollingEnabled(false);

        加上这一行滑动就顺畅多了!

<RelativeLayout

android:layout_width="match_parent"  

android:layout_height="wrap_content"  

android:descendantFocusability="blocksDescendants">  

        < RecycleView

        android:id="@+id/playdate_recyclerview"  

        android:divider="@color/vr_gray"  

        android:dividerHeight="1dp"  

        android:layout_width="match_parent"  

        android:layout_height="wrap_content" />  

</RelativeLayout>


3、json简单对象字符串——>javaBean

Student student = JSON.parseObject(JSON_OBJ_STR,newTypeReference() {});

json简单对象字符串——>javaBean组

ArrayList students = JSON.parseObject(JSON_ARRAY_STR,newTypeReference>() {});


4、

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 172,845评论 25 708
  • 隔墙私语不忍闻, 红拂执手雨有魂。 长街怎堪千堆雪, 凛夜披星见故人。 梅凉出题,你写诗,第三期
    千里走单骑66阅读 245评论 2 1
  • 不同的人对幸福有不同的定义。著名诗人海子说,从明天起做个幸福的人,喂马劈柴周游世界,从明天起关心粮食和蔬菜。我有一...
    辰鱼骆燕阅读 606评论 2 2