android:id=“@+id/iv_mark”
android:layout_width=“@dimen/dp_80”
android:layout_height=“@dimen/dp_80”
android:background=“@drawable/shape_orange_8”
android:gravity=“center”
android:padding=“@dimen/dp_20”
android:src=“@mipmap/icon_hot_city” />
<LinearLayout
android:layout_width=“0dp”
android:layout_height=“match_parent”
android:layout_weight=“1”
android:gravity=“center_vertical”
android:orientation=“vertical”
android:paddingLeft=“@dimen/dp_16”>
<TextView
android:id=“@+id/tv_hot_city_name”
android:layout_width=“wrap_content”
android:layout_height=“wrap_content”
android:text=“巴黎”
android:textColor=“@color/black_3”
android:textSize=“@dimen/sp_16”
android:textStyle=“bold” />
<TextView
android:id=“@+id/tv_cnty_and_area”
android:layout_width=“wrap_content”
android:layout_height=“wrap_content”
android:layout_marginTop=“@dimen/dp_8”
android:text=“巴黎”
android:textColor=“@color/gray”
android:textSize=“@dimen/sp_14”
android:textStyle=“bold” />
<ImageView
android:id=“@+id/iv_open”
android:layout_width=“wrap_content”
android:layout_height=“wrap_content”
android:layout_marginRight=“@dimen/dp_12”
android:src=“@mipmap/icon_open_orange” />
</androidx.cardview.widget.CardView>
图标也是要修改的
因为是白色的你看不见很正常,你把页面的主题改成黑色就可以看到了。
icon_hot_city_china.ping
icon_open_blue.png
⑤ 修改列表适配器
修改HotCityAdapter
package com.llw.goodweather.adapter;
import android.widget.ImageView;
import androidx.annotation.Nullable;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.llw.goodweather.R;
import com.llw.goodweather.bean.HotCityResponse;
import java.util.ArrayList;
import java.util.List;
/**
- 热门城市列表适配器
*/
public class HotCityAdapter extends BaseQuickAdapter<HotCityResponse.HeWeather6Bean.BasicBean, BaseViewHolder> {
private int mType;
// 增加一个item样式类型,在Activity中传入
public HotCityAdapter(int layoutResId, @Nullable List<HotCityResponse.HeWeather6Bean.BasicBean> data,int type) {
super(layoutResId, data);
this.mType = type;
}
@Override
protected void convert(BaseViewHolder helper, HotCityResponse.HeWeather6Bean.BasicBean item) {
ImageView ivMark = helper.getView(R.id.iv_mark);
ImageView ivOpen = helper.getView(R.id.iv_open);
if (mType == 0) {//国内
ivMark.setBackground(mContext.getResources().getDrawable(R.drawable.shape_blue_8));//背景
ivMark.setImageDrawable(mContext.getDrawable(R.mipmap.icon_hot_city_china));//图标
ivOpen.setImageDrawable(mContext.getDrawable(R.mipmap.icon_open_blue));//图标
} else {//国外
ivMark.setBackground(mContext.getResources().getDrawable(R.drawable.shape_orange_8));//背景
ivMark.setImageDrawable(mContext.getDrawable(R.mipmap.icon_hot_city));//图标
自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。
深知大多数Android工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年Android移动开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Android开发知识点,真正体系化!
由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新
如果你觉得这些内容对你有帮助,可以添加V获取:vip204888 (备注Android)
学习福利
【Android 详细知识点思维脑图(技能树)】
其实Android开发的知识点就那么多,面试问来问去还是那么点东西。所以面试没有其他的诀窍,只看你对这些知识点准备的充分程度。so,出去面试时先看看自己复习到了哪个阶段就好。
虽然 Android 没有前几年火热了,已经过去了会四大组件就能找到高薪职位的时代了。这只能说明 Android 中级以下的岗位饱和了,现在高级工程师还是比较缺少的,很多高级职位给的薪资真的特别高(钱多也不一定能找到合适的),所以努力让自己成为高级工程师才是最重要的。
这里附上上述的面试题相关的几十套字节跳动,京东,小米,腾讯、头条、阿里、美团等公司19年的面试题。把技术点整理成了视频和PDF(实际上比预期多花了不少精力),包含知识脉络 + 诸多细节。
由于篇幅有限,这里以图片的形式给大家展示一小部分。
网上学习 Android的资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。希望这份系统化的技术体系对大家有一个方向参考。
一个人可以走的很快,但一群人才能走的更远。如果你从事以下工作或对以下感兴趣,欢迎戳这里加入程序员的圈子,让我们一起学习成长!
AI人工智能、Android移动开发、AIGC大模型、C C#、Go语言、Java、Linux运维、云计算、MySQL、PMP、网络安全、Python爬虫、UE5、UI设计、Unity3D、Web前端开发、产品经理、车载开发、大数据、鸿蒙、计算机网络、嵌入式物联网、软件测试、数据结构与算法、音视频开发、Flutter、IOS开发、PHP开发、.NET、安卓逆向、云计算
😕/bbs.csdn.net/forums/4304bb5a486d4c3ab8389e65ecb71ac0)
AI人工智能、Android移动开发、AIGC大模型、C C#、Go语言、Java、Linux运维、云计算、MySQL、PMP、网络安全、Python爬虫、UE5、UI设计、Unity3D、Web前端开发、产品经理、车载开发、大数据、鸿蒙、计算机网络、嵌入式物联网、软件测试、数据结构与算法、音视频开发、Flutter、IOS开发、PHP开发、.NET、安卓逆向、云计算