2024年Android最全Android 天气APP(五)天气预报、生活指数的数据请求与渲染(1),字节跳动面试攻略

学习分享

在当下这个信息共享的时代,很多资源都可以在网络上找到,只取决于你愿不愿意找或是找的方法对不对了

很多朋友不是没有资料,大多都是有几十上百个G,但是杂乱无章,不知道怎么看从哪看起,甚至是看后就忘

如果大家觉得自己在网上找的资料非常杂乱、不成体系的话,我也分享一套给大家,比较系统,我平常自己也会经常研读。

2021最新上万页的大厂面试真题

七大模块学习资料:如NDK模块开发、Android框架体系架构…

只有系统,有方向的学习,才能在段时间内迅速提高自己的技术。

这份体系学习笔记,适应人群:
第一,学习知识比较碎片化,没有合理的学习路线与进阶方向。
第二,开发几年,不知道如何进阶更进一步,比较迷茫。
第三,到了合适的年纪,后续不知道该如何发展,转型管理,还是加强技术研究。如果你有需要,我这里恰好有为什么,不来领取!说不定能改变你现在的状态呢!
由于文章内容比较多,篇幅不允许,部分未展示内容以截图方式展示 。

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化学习资料的朋友,可以戳这里获取

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

import com.llw.goodweather.api.ApiService;

import com.llw.goodweather.bean.TodayResponse;

import com.llw.goodweather.bean.WeatherForecastResponse;

import com.llw.mvplibrary.base.BasePresenter;

import com.llw.mvplibrary.base.BaseView;

import com.llw.mvplibrary.net.NetCallBack;

import com.llw.mvplibrary.net.ServiceGenerator;

import retrofit2.Call;

import retrofit2.Response;

/**

  • 天气订阅器

*/

public class WeatherContract {

public static class WeatherPresenter extends BasePresenter {

/**

  • 当日天气

  • @param context

  • @param location 区/县

*/

public void todayWeather(final Context context, String location) {

//得到构建之后的网络请求服务,这里的地址已经拼接完成,只差一个location了

ApiService service = ServiceGenerator.createService(ApiService.class);

//设置请求回调 NetCallBack是重写请求回调

service.getTodayWeather(location).enqueue(new NetCallBack() {

//成功回调

@Override

public void onSuccess(Call call, Response response) {

if (getView() != null) {//当视图不会空时返回请求数据

getView().getTodayWeatherResult(response);

}

}

//失败回调

@Override

public void onFailed() {

if (getView() != null) {//当视图不会空时获取错误信息

getView().getDataFailed();

}

}

});

}

/**

  • 天气预报 3-7天(白嫖的就只能看到3天)

  • @param context

  • @param location

*/

public void weatherForecast(final Context context,String location){

ApiService service = ServiceGenerator.createService(ApiService.class);

service.getWeatherForecast(location).enqueue(new NetCallBack() {

@Override

public void onSuccess(Call call, Response response) {

if(getView() != null){

getView().getWeatherForecastResult(response);

}

}

@Override

public void onFailed() {

if(getView() != null){

getView().getDataFailed();

}

}

});

}

}

public interface IWeatherView extends BaseView {

//查询当天天气的数据返回

void getTodayWeatherResult(Response response);

//查询天气预报的数据返回

void getWeatherForecastResult(Response response);

//错误返回

void getDataFailed();

}

}

接下来修改布局,增加列表和适配器

③ 修改布局,增加列表和适配器

在这里插入图片描述

代码中

在这里插入图片描述

这个时候你的MainActivity.java会报错

在这里插入图片描述

这是因为订阅器里面的内容没有写入。鼠标点击,Alt + Enter

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

接下来创建列表的item

在layout目录下创建item_weather_forecast_list.xml文件

在这里插入图片描述

代码如下:

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android=“http://schemas.android.com/apk/res/android”

android:orientation=“vertical”

android:layout_width=“match_parent”

android:layout_height=“wrap_content”>

<LinearLayout

android:padding=“@dimen/sp_12”

android:orientation=“horizontal”

android:layout_width=“match_parent”

android:layout_height=“wrap_content”>

<TextView

android:id=“@+id/tv_date”

android:text=“1234”

android:textSize=“@dimen/sp_14”

android:textColor=“#FFF”

android:layout_width=“0dp”

android:layout_weight=“1”

android:layout_height=“wrap_content”/>

<TextView

android:gravity=“center”

android:id=“@+id/tv_info”

android:textSize=“@dimen/sp_14”

android:textColor=“#FFF”

android:layout_width=“0dp”

android:layout_weight=“1”

android:layout_height=“wrap_content”/>

<TextView

android:gravity=“right”

android:id=“@+id/tv_low_and_height”

android:textSize=“@dimen/sp_14”

android:textColor=“#FFF”

android:layout_width=“0dp”

android:layout_weight=“1”

android:layout_height=“wrap_content”/>

接下来创建一个适配器

com.llw.goodweather下新建一个WeatherForecastAdapter适配器

在这里插入图片描述

代码如下:

package com.llw.goodweather.adapter;

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.WeatherForecastResponse;

import java.util.List;

/**

  • 天气预报列表展示适配器

*/

public class WeatherForecastAdapter extends BaseQuickAdapter<WeatherForecastResponse.HeWeather6Bean.DailyForecastBean, BaseViewHolder> {

public WeatherForecastAdapter(int layoutResId, @Nullable List<WeatherForecastResponse.HeWeather6Bean.DailyForecastBean> data) {

super(layoutResId, data);

}

@Override

protected void convert(BaseViewHolder helper, WeatherForecastResponse.HeWeather6Bean.DailyForecastBean item) {

helper.setText(R.id.tv_date, item.getDate())//日期

.setText(R.id.tv_info, item.getCond_txt_d())//天气

.setText(R.id.tv_low_and_height, item.getTmp_min() + “/” + item.getTmp_max() + “℃”);//最低温和最高温

}

}

④ 使用适配器进行数据展示

在MainActivity.java中增加

List<WeatherForecastResponse.HeWeather6Bean.DailyForecastBean> mList;//初始化数据源

WeatherForecastAdapter mAdapter;//初始化适配器

/**

  • 初始化天气预报数据列表

*/

private void initList() {

mList = new ArrayList<>();//声明为ArrayList

mAdapter = new WeatherForecastAdapter(R.layout.item_weather_forecast_list, mList);//为适配器设置布局和数据源

LinearLayoutManager manager = new LinearLayoutManager(context);//布局管理,默认是纵向

rv.setLayoutManager(manager);//为列表配置管理器

rv.setAdapter(mAdapter);//为列表配置适配器

}

然后在**initData()**方法中调用

在这里插入图片描述

在这里插入图片描述

返回值做处理

//查询天气预报,请求成功后的数据返回

@Override

public void getWeatherForecastResult(Response response) {

if ((“ok”).equals(response.body().getHeWeather6().get(0).getStatus())) {

//最低温和最高温

tvLowHeight.setText(response.body().getHeWeather6().get(0).getDaily_forecast().get(0).getTmp_min() + " / " +

response.body().getHeWeather6().get(0).getDaily_forecast().get(0).getTmp_max() + “℃”);

if (response.body().getHeWeather6().get(0).getDaily_forecast() != null) {

List<WeatherForecastResponse.HeWeather6Bean.DailyForecastBean> data

= response.body().getHeWeather6().get(0).getDaily_forecast();

mList.clear();//添加数据之前先清除

mList.addAll(data);//添加数据

mAdapter.notifyDataSetChanged();//刷新列表

} else {

ToastUtils.showShortToast(context, “天气预报数据为空”);

}

} else {

ToastUtils.showShortToast(context, response.body().getHeWeather6().get(0).getStatus());

}

}

运行

在这里插入图片描述

这样天气预报这个功能就完成了。

接下来是生活指数。

7. 生活指数


生活指数就是一些生活建议,实现的不走其实和天气预报差不太多,但是比天气预报要简单一些,因为不需要列表显示,文本即可。

① 新增API接口

根据和风天气中的文档,得知生活指数接口为:

https://free-api.heweather.net/s6/weather/lifestyle?key=3086e91d66c04ce588a7f538f917c7f4&location=福田区

在网页上访问得到返回值,生成一个实体

在这里插入图片描述

代码如下:

package com.llw.goodweather.bean;

import java.util.List;

public class LifeStyleResponse {

private List HeWeather6;

public List getHeWeather6() {

return HeWeather6;

}

public void setHeWeather6(List HeWeather6) {

this.HeWeather6 = HeWeather6;

}

public static class HeWeather6Bean {

/**

  • basic : {“cid”:“CN101280603”,“location”:“福田”,“parent_city”:“深圳”,“admin_area”:“广东”,“cnty”:“中国”,“lat”:“22.5410099”,“lon”:“114.05095673”,“tz”:“+8.00”}

  • update : {“loc”:“2019-11-23 09:55”,“utc”:“2019-11-23 01:55”}

  • status : ok

  • lifestyle : [{“type”:“comf”,“brf”:“舒适”,“txt”:“白天不太热也不太冷,风力不大,相信您在这样的天气条件下,应会感到比较清爽和舒适。”},{“type”:“drsg”,“brf”:“热”,“txt”:“天气热,建议着短裙、短裤、短薄外套、T恤等夏季服装。”},{“type”:“flu”,“brf”:“少发”,“txt”:“各项气象条件适宜,无明显降温过程,发生感冒机率较低。”},{“type”:“sport”,“brf”:“适宜”,“txt”:“天气较好,赶快投身大自然参与户外运动,尽情感受运动的快乐吧。”},{“type”:“trav”,“brf”:“适宜”,“txt”:“天气较好,温度适宜,是个好天气哦。这样的天气适宜旅游,您可以尽情地享受大自然的风光。”},{“type”:“uv”,“brf”:“强”,“txt”:“紫外线辐射强,建议涂擦SPF20左右、PA++的防晒护肤品。避免在10点至14点暴露于日光下。”},{“type”:“cw”,“brf”:“适宜”,“txt”:“适宜洗车,未来持续两天无雨天气较好,适合擦洗汽车,蓝天白云、风和日丽将伴您的车子连日洁净。”},{“type”:“air”,“brf”:“中”,“txt”:“气象条件对空气污染物稀释、扩散和清除无明显影响。”}]

*/

private BasicBean basic;

private UpdateBean update;

private String status;

private List lifestyle;

public BasicBean getBasic() {

return basic;

}

public void setBasic(BasicBean basic) {

this.basic = basic;

}

public UpdateBean getUpdate() {

return update;

}

public void setUpdate(UpdateBean update) {

this.update = update;

}

public String getStatus() {

return status;

}

public void setStatus(String status) {

this.status = status;

}

public List getLifestyle() {

return lifestyle;

}

public void setLifestyle(List lifestyle) {

this.lifestyle = lifestyle;

}

public static class BasicBean {

/**

  • cid : CN101280603

  • location : 福田

  • parent_city : 深圳

  • admin_area : 广东

  • cnty : 中国

  • lat : 22.5410099

  • lon : 114.05095673

  • tz : +8.00

*/

private String cid;

private String location;

private String parent_city;

private String admin_area;

private String cnty;

private String lat;

private String lon;

private String tz;

public String getCid() {

return cid;

}

public void setCid(String cid) {

this.cid = cid;

}

public String getLocation() {

return location;

}

public void setLocation(String location) {

this.location = location;

}

public String getParent_city() {

return parent_city;

}

public void setParent_city(String parent_city) {

this.parent_city = parent_city;

}

public String getAdmin_area() {

return admin_area;

}

public void setAdmin_area(String admin_area) {

this.admin_area = admin_area;

}

public String getCnty() {

return cnty;

}

public void setCnty(String cnty) {

this.cnty = cnty;

}

public String getLat() {

return lat;

}

public void setLat(String lat) {

this.lat = lat;

}

public String getLon() {

return lon;

}

public void setLon(String lon) {

this.lon = lon;

}

public String getTz() {

return tz;

}

public void setTz(String tz) {

this.tz = tz;

}

}

public static class UpdateBean {

/**

  • loc : 2019-11-23 09:55

  • utc : 2019-11-23 01:55

*/

private String loc;

private String utc;

public String getLoc() {

return loc;

}

public void setLoc(String loc) {

this.loc = loc;

}

public String getUtc() {

return utc;

}

public void setUtc(String utc) {

this.utc = utc;

}

}

public static class LifestyleBean {

/**

  • type : comf

  • brf : 舒适

  • txt : 白天不太热也不太冷,风力不大,相信您在这样的天气条件下,应会感到比较清爽和舒适。

*/

private String type;

private String brf;

private String txt;

public String getType() {

return type;

}

public void setType(String type) {

this.type = type;

}

public String getBrf() {

return brf;

}

public void setBrf(String brf) {

this.brf = brf;

}

public String getTxt() {

return txt;

}

public void setTxt(String txt) {

this.txt = txt;

}

}

}

}

在ApiService中增加

在这里插入图片描述

代码如下:

/**

  • 生活指数

*/

@GET(“/s6/weather/lifestyle?key=3086e91d66c04ce588a7f538f917c7f4”)

Call getLifestyle(@Query(“location”) String location);

记得将key的值修改为自己的Key

② 修改订阅器

WeatherContract新增生活指数订阅

在这里插入图片描述

在这里插入图片描述

/**

  • 生活指数

  • @param context

  • @param location

*/

public void lifeStyle(final Context context,String location){

ApiService service = ServiceGenerator.createService(ApiService.class);

service.getLifestyle(location).enqueue(new NetCallBack() {

@Override

public void onSuccess(Call call, Response response) {

if(getView() != null){

getView().getLifeStyleResult(response);

}

}

@Override

public void onFailed() {

if(getView() != null){

getView().getDataFailed();

}

}

});

}

//查询生活指数的数据返回

void getLifeStyleResult(Response response);

③ 修改布局

这次要展示的数据会比较多,所以布局的整体要用NestedScrollView包裹起来,变成一个·可以上下滑动的布局,布局修改后的代码如下(PS:为了不出现问题,这里我贴上全部的布局代码):

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android=“http://schemas.android.com/apk/res/android”

xmlns:app=“http://schemas.android.com/apk/res-auto”

xmlns:tools=“http://schemas.android.com/tools”

android:gravity=“center”

android:fitsSystemWindows=“true”

android:background=“@drawable/pic_bg”

android:layout_width=“match_parent”

android:layout_height=“match_parent”

tools:context=“.MainActivity”>

<RelativeLayout

android:layout_width=“match_parent”

android:layout_height=“match_parent”>

<LinearLayout

android:background=“#000”

android:alpha=“0.3”

android:layout_width=“match_parent”

android:layout_height=“match_parent”/>

<LinearLayout

android:orientation=“vertical”

android:layout_width=“match_parent”

android:layout_height=“match_parent”>

<androidx.appcompat.widget.Toolbar

android:id=“@+id/toolbar”

android:layout_width=“match_parent”

android:layout_height=“?attr/actionBarSize”

app:contentInsetLeft=“16dp”

app:popupTheme=“@style/AppTheme.PopupOverlay”>

<TextView

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_gravity=“center”

android:textSize=“16sp”

android:textColor=“#FFF”

android:text=“城市天气” />

</androidx.appcompat.widget.Toolbar>

<androidx.core.widget.NestedScrollView

android:overScrollMode=“never”

android:layout_width=“match_parent”

android:layout_height=“match_parent”>

<LinearLayout

android:gravity=“center_horizontal”

android:orientation=“vertical”

android:layout_width=“match_parent”

android:layout_height=“match_parent”>

<TextView

android:paddingLeft=“16dp”

android:paddingTop=“12dp”

android:id=“@+id/tv_info”

android:textColor=“#FFF”

android:textSize=“18sp”

android:layout_width=“match_parent”

android:layout_height=“wrap_content”/>

<LinearLayout

android:gravity=“top|center_horizontal”

android:layout_marginTop=“20dp”

android:orientation=“horizontal”

android:layout_width=“match_parent”

android:layout_height=“wrap_content”>

<TextView

android:id=“@+id/tv_temperature”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:text=“0”

android:textColor=“#FFF”

android:textSize=“60sp” />

<TextView

android:layout_width=“wrap_content”

android:layout_height=“match_parent”

android:text=“℃”

android:textColor=“#FFF”

android:textSize=“24sp” />

<TextView

android:layout_marginTop=“12dp”

android:id=“@+id/tv_low_height”

android:textColor=“#FFF”

android:textSize=“@dimen/sp_14”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”/>

<TextView

android:layout_marginTop=“20dp”

android:id=“@+id/tv_city”

android:textColor=“#FFF”

android:text=“城市”

android:textSize=“20sp”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”/>

<TextView

android:layout_marginTop=“8dp”

android:id=“@+id/tv_old_time”

android:textColor=“#FFF”

android:text=“上次更新时间:”

android:textSize=“@dimen/sp_12”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”/>

<androidx.recyclerview.widget.RecyclerView

android:layout_marginTop=“20dp”

android:id=“@+id/rv”

android:layout_width=“match_parent”

android:layout_height=“wrap_content”/>

<LinearLayout

android:orientation=“vertical”

android:padding=“20dp”

android:layout_width=“match_parent”

android:layout_height=“wrap_content”>

<TextView

android:textSize=“18sp”

android:textColor=“#FFF”

android:text=“生活建议”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”/>

<TextView

android:layout_marginTop=“16dp”

android:id=“@+id/tv_comf”

android:text=“舒适度:”

android:textSize=“@dimen/sp_14”

android:textColor=“#FFF”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”/>

<TextView

android:layout_marginTop=“16dp”

android:id=“@+id/tv_trav”

android:text=“旅游指数:”

android:textSize=“@dimen/sp_14”

android:textColor=“#FFF”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”/>

<TextView

android:layout_marginTop=“16dp”

android:id=“@+id/tv_sport”

android:text=“运动指数:”

android:textSize=“@dimen/sp_14”

android:textColor=“#FFF”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”/>

<TextView

android:layout_marginTop=“16dp”

android:id=“@+id/tv_cw”

android:text=“洗车指数:”

android:textSize=“@dimen/sp_14”

android:textColor=“#FFF”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”/>

<TextView

android:layout_marginTop=“16dp”

android:id=“@+id/tv_air”

android:text=“空气指数:”

android:textSize=“@dimen/sp_14”

android:textColor=“#FFF”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”/>

<TextView

android:layout_marginTop=“16dp”

android:id=“@+id/tv_drsg”

android:text=“穿衣指数:”

android:textSize=“@dimen/sp_14”

android:textColor=“#FFF”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”/>

<TextView

android:layout_marginTop=“16dp”

android:id=“@+id/tv_flu”

android:text=“感冒指数:”

android:textSize=“@dimen/sp_14”

android:textColor=“#FFF”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”/>

</androidx.core.widget.NestedScrollView>

注释已经在代码中写好了,相信你看了就明白了。接下来就是数据返回的处理,和页面数据渲染显示。

④ 数据渲染显示

在这里插入图片描述

由于返回的数据可能会为空,为了使返回数据为空的时候程序不报错,这里要做判断,在模块的utils包下写一个工具类。

在这里插入图片描述

工具类代码如下:

package com.llw.mvplibrary.utils;

import android.os.Build;

import android.util.SparseArray;

import android.util.SparseBooleanArray;

import android.util.SparseIntArray;

import android.util.SparseLongArray;

import androidx.annotation.RequiresApi;

import androidx.collection.LongSparseArray;

import androidx.collection.SimpleArrayMap;

import java.lang.reflect.Array;

import java.util.Collection;

import java.util.Map;

/**

  • 空判断工具类

*/

public final class ObjectUtils {

private ObjectUtils() {

throw new UnsupportedOperationException(“u can’t instantiate me…”);

}

/**

  • Return whether object is empty.

  • @param obj The object.

  • @return {@code true}: yes
    {@code false}: no

*/

public static boolean isEmpty(final Object obj) {

if (obj == null) {

return true;

}

if (obj.getClass().isArray() && Array.getLength(obj) == 0) {

return true;

}

if (obj instanceof CharSequence && obj.toString().length() == 0) {

return true;

}

if (obj instanceof Collection && ((Collection) obj).isEmpty()) {

return true;

}

if (obj instanceof Map && ((Map) obj).isEmpty()) {

return true;

}

if (obj instanceof SimpleArrayMap && ((SimpleArrayMap) obj).isEmpty()) {

return true;

}

if (obj instanceof SparseArray && ((SparseArray) obj).size() == 0) {

return true;

}

if (obj instanceof SparseBooleanArray && ((SparseBooleanArray) obj).size() == 0) {

return true;

}

if (obj instanceof SparseIntArray && ((SparseIntArray) obj).size() == 0) {

return true;

}

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {

if (obj instanceof SparseLongArray && ((SparseLongArray) obj).size() == 0) {

return true;

}

}

if (obj instanceof LongSparseArray && ((LongSparseArray) obj).size() == 0) {

return true;

}

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {

if (obj instanceof android.util.LongSparseArray

&& ((android.util.LongSparseArray) obj).size() == 0) {

return true;

}

}

return false;

}

public static boolean isEmpty(final CharSequence obj) {

return obj == null || obj.toString().length() == 0;

}

public static boolean isEmpty(final Collection obj) {

return obj == null || obj.isEmpty();

}

public static boolean isEmpty(final Map obj) {

return obj == null || obj.isEmpty();

}

public static boolean isEmpty(final SimpleArrayMap obj) {

return obj == null || obj.isEmpty();

}

public static boolean isEmpty(final SparseArray obj) {

return obj == null || obj.size() == 0;

}

public static boolean isEmpty(final SparseBooleanArray obj) {

return obj == null || obj.size() == 0;

}

public static boolean isEmpty(final SparseIntArray obj) {

return obj == null || obj.size() == 0;

}

public static boolean isEmpty(final LongSparseArray obj) {

return obj == null || obj.size() == 0;

}

@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2)

public static boolean isEmpty(final SparseLongArray obj) {

return obj == null || obj.size() == 0;

}

@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)

public static boolean isEmpty(final android.util.LongSparseArray obj) {

return obj == null || obj.size() == 0;

}

/**

  • Return whether object is not empty.

  • @param obj The object.

  • @return {@code true}: yes
    {@code false}: no

*/

public static boolean isNotEmpty(final Object obj) {

return !isEmpty(obj);

}

public static boolean isNotEmpty(final CharSequence obj) {

return !isEmpty(obj);

}

public static boolean isNotEmpty(final Collection obj) {

return !isEmpty(obj);

}

public static boolean isNotEmpty(final Map obj) {

总结

【Android 详细知识点思维脑图(技能树)】

image

其实Android开发的知识点就那么多,面试问来问去还是那么点东西。所以面试没有其他的诀窍,只看你对这些知识点准备的充分程度。so,出去面试时先看看自己复习到了哪个阶段就好。

虽然 Android 没有前几年火热了,已经过去了会四大组件就能找到高薪职位的时代了。这只能说明 Android 中级以下的岗位饱和了,现在高级工程师还是比较缺少的,很多高级职位给的薪资真的特别高(钱多也不一定能找到合适的),所以努力让自己成为高级工程师才是最重要的。

这里附上上述的面试题相关的几十套字节跳动,京东,小米,腾讯、头条、阿里、美团等公司19年的面试题。把技术点整理成了视频和PDF(实际上比预期多花了不少精力),包含知识脉络 + 诸多细节。

由于篇幅有限,这里以图片的形式给大家展示一小部分。

网上学习 Android的资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。希望这份系统化的技术体系对大家有一个方向参考。

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化学习资料的朋友,可以戳这里获取

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

ray obj) {

return obj == null || obj.size() == 0;

}

public static boolean isEmpty(final LongSparseArray obj) {

return obj == null || obj.size() == 0;

}

@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2)

public static boolean isEmpty(final SparseLongArray obj) {

return obj == null || obj.size() == 0;

}

@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)

public static boolean isEmpty(final android.util.LongSparseArray obj) {

return obj == null || obj.size() == 0;

}

/**

  • Return whether object is not empty.

  • @param obj The object.

  • @return {@code true}: yes
    {@code false}: no

*/

public static boolean isNotEmpty(final Object obj) {

return !isEmpty(obj);

}

public static boolean isNotEmpty(final CharSequence obj) {

return !isEmpty(obj);

}

public static boolean isNotEmpty(final Collection obj) {

return !isEmpty(obj);

}

public static boolean isNotEmpty(final Map obj) {

总结

【Android 详细知识点思维脑图(技能树)】

[外链图片转存中…(img-lRTFplZS-1715605631239)]

其实Android开发的知识点就那么多,面试问来问去还是那么点东西。所以面试没有其他的诀窍,只看你对这些知识点准备的充分程度。so,出去面试时先看看自己复习到了哪个阶段就好。

虽然 Android 没有前几年火热了,已经过去了会四大组件就能找到高薪职位的时代了。这只能说明 Android 中级以下的岗位饱和了,现在高级工程师还是比较缺少的,很多高级职位给的薪资真的特别高(钱多也不一定能找到合适的),所以努力让自己成为高级工程师才是最重要的。

这里附上上述的面试题相关的几十套字节跳动,京东,小米,腾讯、头条、阿里、美团等公司19年的面试题。把技术点整理成了视频和PDF(实际上比预期多花了不少精力),包含知识脉络 + 诸多细节。

由于篇幅有限,这里以图片的形式给大家展示一小部分。

[外链图片转存中…(img-V8KlBior-1715605631239)]

网上学习 Android的资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。希望这份系统化的技术体系对大家有一个方向参考。

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化学习资料的朋友,可以戳这里获取

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

  • 23
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值