![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
小技巧备忘录
文章平均质量分 62
Henry_Alpha
主要研究虚拟社会学
展开
-
ImageView 备忘录
1、想实现图片横向占满ImageView,在保持横宽比的条件下,纵向实现包裹内容,需用如下属性搭配,关键在于adjustViewBounds属性为true,ScaleType用centerCrop android:layout_width="match_parent" android:layout_height="wrap_content" android:adjustViewBounds=原创 2016-03-07 22:24:27 · 273 阅读 · 0 评论 -
JAVA API 被坑备忘录
1、Math.round()理解 此方法为四舍五入,具体计算步骤为先 + 0.5 ,然后执行Math.floor(),注意Math.floor()参数为正数时舍弃小数部分,参数为负数时整数位进1,如: Math.floor(8.9)=8; Math.floor(-8.9)= -9;Math.round(8.9)=9;Math.round(-8.9)= -9;Math.round(11.5) =原创 2016-03-15 22:53:37 · 402 阅读 · 0 评论