Android
阿瑟与非
程序员只佩服强者。
展开
-
ListView使用多个item布局的用法及分析,Adapter的getView方法convertView的缓存的分析(附源码)
Different list items’layoutsLet’s move to the “more complicated” example. How about to add separator somewhere to the list.You should do the following:Override getViewTypeCount() – return how many dif...原创 2018-05-24 10:31:18 · 455 阅读 · 0 评论 -
安卓PNG图片着色以及透明度设置
1.结果展示(selector):注意:PNG图片着色要选择纯色图片,否则图片会严重失真,如下图原图:结果图:2.透明度设置:private void setBg(ImageButton imageButton) { //0~255透明度值 imageButton.getBackground().setAlpha(255); }设置成255:设置成03.源代...原创 2018-06-01 11:46:23 · 5104 阅读 · 0 评论 -
android开发RecyclerView嵌套实现商品列表(附源码)
说明图片使用网络图片,数据使用本地缓存数据源码:https://gitee.com/373616511/RecyclerViewTest效果图三个布局文件activity_main.xml-主布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://sch...原创 2019-08-02 16:31:12 · 4685 阅读 · 1 评论