2024年Android 天气APP(十七)热门城市 - 国内城市(1),2024年最新2024年Android社招面试题

最后

简历首选内推方式,速度快,效率高啊!然后可以在拉钩,boss,脉脉,大街上看看。简历上写道熟悉什么技术就一定要去熟悉它,不然被问到不会很尴尬!做过什么项目,即使项目体量不大,但也一定要熟悉实现原理!不是你负责的部分,也可以看看同事是怎么实现的,换你来做你会怎么做?做过什么,会什么是广度问题,取决于项目内容。但做过什么,达到怎样一个境界,这是深度问题,和个人学习能力和解决问题的态度有关了。大公司看深度,小公司看广度。大公司面试你会的,小公司面试他们用到的你会不会,也就是岗位匹配度。

选定你想去的几家公司后,先去一些小的公司练练,学习下面试技巧,总结下,也算是熟悉下面试氛围,平时和同事或者产品PK时可以讲得头头是道,思路清晰至极,到了现场真的不一样,怎么描述你所做的一切,这绝对是个学术性问题!

面试过程一定要有礼貌!即使你觉得面试官不尊重你,经常打断你的讲解,或者你觉得他不如你,问的问题缺乏专业水平,你也一定要尊重他,谁叫现在是他选择你,等你拿到offer后就是你选择他了。

金九银十面试季,跳槽季,整理面试题已经成了我多年的习惯!在这里我和身边一些朋友特意整理了一份快速进阶为Android高级工程师的系统且全面的学习资料。涵盖了Android初级——Android高级架构师进阶必备的一些学习技能。

附上:我们之前因为秋招收集的二十套一二线互联网公司Android面试真题(含BAT、小米、华为、美团、滴滴)和我自己整理Android复习笔记(包含Android基础知识点、Android扩展知识点、Android源码解析、设计模式汇总、Gradle知识点、常见算法题汇总。)

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

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

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

android:foreground=“@drawable/bg_white”

android:gravity=“center”

android:text=“海外热门城市”

android:textColor=“@color/black”

android:textSize=“@dimen/sp_18” />

然后就是使用了,我修改了一下LiWindow中的showCenterPopupWindow方法中的入参

在这里插入图片描述

将这个值放到外面就可以在调用的时候设置是否可以点击空白处关闭弹窗,为true是可以,false是不可以。

修改activity_hot_city.xml布局文件,完整代码如下,复制粘贴即可

<?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:layout_width=“match_parent”

android:fitsSystemWindows=“true”

android:id=“@+id/lay_bg”

android:orientation=“vertical”

android:layout_height=“match_parent”

tools:context=“.ui.HotCityActivity”>

<androidx.appcompat.widget.Toolbar

android:id=“@+id/toolbar”

android:layout_width=“match_parent”

android:layout_height=“?attr/actionBarSize”

android:background=“@color/white”

app:layout_constraintEnd_toEndOf=“parent”

app:navigationIcon=“@mipmap/icon_return”

app:contentInsetLeft=“@dimen/dp_16”

app:layout_constraintLeft_toLeftOf=“parent”

app:layout_constraintTop_toTopOf=“parent”

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

<TextView

android:id=“@+id/tv_title”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_gravity=“center”

android:textSize=“@dimen/sp_16”

android:textColor=“@color/black”

android:text=“热门城市” />

</androidx.appcompat.widget.Toolbar>

<androidx.recyclerview.widget.RecyclerView

android:id=“@+id/rv”

android:layout_width=“match_parent”

android:layout_height=“match_parent”/>

修改的布局有什么变化呢?就是里面的布局增加了id,还有就是改了颜色,

之后在HotCityActivity中初始化

在这里插入图片描述

上图中标出来的就是新增的,然后创建一个显示弹窗的方法

/**

  • 显示选择类型弹窗

*/

private void showTypeWindow() {

liWindow = new LiWindow(context);

final View view = LayoutInflater.from(context).inflate(R.layout.window_hot_type, null);

TextView tvInland = view.findViewById(R.id.tv_inland);//国内

TextView tvForeign = view.findViewById(R.id.tv_foreign);//海外

tvInland.setOnClickListener(v -> {

type = 0;

initList(type);

showLoadingDialog();

mPresent.hotCity(context, “cn”);

liWindow.closePopupWindow();

});

tvForeign.setOnClickListener(v -> {

type = 1;

initList(type);

showLoadingDialog();

mPresent.hotCity(context, “overseas”);

liWindow.closePopupWindow();

});

liWindow.showCenterPopupWindow(view, SizeUtils.dp2px(context, 280), SizeUtils.dp2px(context, 120), false);

}

因为是要在页面启动的时候就出现这个弹窗,而popupWindow显示依赖activity,并且要等activity所有的生命周期方法全部执行完成才能显示,所以这里新开一个线程用于显示

在这里插入图片描述

④ 修改列表item布局

弹窗搞定之后就可以改动热门城市的列表item布局了,首先增加一个颜色

在这里插入图片描述

在这里插入图片描述

item_hot_city_list.xml布局完整代码如下:

<?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”

android:layout_width=“match_parent”

android:layout_height=“wrap_content”

android:orientation=“vertical”>

<androidx.cardview.widget.CardView

android:id=“@+id/item_hot_city”

android:layout_width=“match_parent”

android:layout_height=“wrap_content”

android:layout_margin=“@dimen/dp_6”

android:foreground=“@drawable/bg_white”

app:cardBackgroundColor=“@color/white”

app:cardCornerRadius=“@dimen/dp_8”

app:cardElevation=“@dimen/dp_4”>

<LinearLayout

android:layout_width=“match_parent”

android:layout_height=“wrap_content”

android:gravity=“center_vertical”

android:orientation=“horizontal”>

<ImageView

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;

新的开始

改变人生,没有什么捷径可言,这条路需要自己亲自去走一走,只有深入思考,不断反思总结,保持学习的热情,一步一步构建自己完整的知识体系,才是最终的制胜之道,也是程序员应该承担的使命。

《系列学习视频》

《系列学习文档》

《我的大厂面试之旅》

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

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

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

整的知识体系,才是最终的制胜之道,也是程序员应该承担的使命。

《系列学习视频》
[外链图片转存中…(img-24ga5WHF-1715583906771)]

《系列学习文档》

[外链图片转存中…(img-zEJ6T1EP-1715583906771)]

《我的大厂面试之旅》

[外链图片转存中…(img-L67FsmlR-1715583906771)]

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

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

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值