结尾
好了,今天的分享就到这里,如果你对在面试中遇到的问题,或者刚毕业及工作几年迷茫不知道该如何准备面试并突破现状提升自己,对于自己的未来还不够了解不知道给如何规划,可以来看看同行们都是如何突破现状,怎么学习的,来吸收他们的面试以及工作经验完善自己的之后的面试计划及职业规划。
这里放上一部分我工作以来以及参与过的大大小小的面试收集总结出来的一套进阶学习的视频及面试专题资料包,主要还是希望大家在如今大环境不好的情况下面试能够顺利一点,希望可以帮助到大家~
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
在ApiService中修改hotCity这个接口,将固定地址里面的group分离出来,作为请求参数。
/**
- 热门城市(包含海外和国内)
*/
@GET(“/top?key=3086e91d66c04ce588a7f538f917c7f4&number=50&lang=zh”)
Call hotCity(@Query(“group”) String group);
② 修改订阅器
在HotCityContract中增加一个参数
③ 创建选择弹窗
之前是在HotActivity中默认查询海外热门城市的,现在增加了一个参数,就需要用户去手动选择了,我们可以通过一个弹窗来进行选择。
在layout下创建
布局代码如下:
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android=“http://schemas.android.com/apk/res/android”
android:layout_width=“@dimen/dp_280”
android:layout_height=“@dimen/dp_120”
android:background=“@drawable/shape_white_5”
android:gravity=“center”
android:orientation=“vertical”>
<TextView
android:id=“@+id/tv_inland”
android:layout_width=“match_parent”
android:layout_height=“0dp”
android:layout_weight=“1”
android:foreground=“@drawable/bg_white”
android:gravity=“center”
android:text=“国内热门城市”
android:textColor=“@color/black”
android:textSize=“@dimen/sp_18” />
<View
android:layout_width=“match_parent”
android:layout_height=“0.5dp”
android:background=“@color/gray” />
<TextView
android:id=“@+id/tv_foreign”
android:layout_width=“match_parent”
android:layout_height=“0dp”
android:layout_weight=“1”
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”
最后
今天关于面试的分享就到这里,还是那句话,有些东西你不仅要懂,而且要能够很好地表达出来,能够让面试官认可你的理解,例如Handler机制,这个是面试必问之题。有些晦涩的点,或许它只活在面试当中,实际工作当中你压根不会用到它,但是你要知道它是什么东西。
最后在这里小编分享一份自己收录整理上述技术体系图相关的几十套腾讯、头条、阿里、美团等公司19年的面试题,把技术点整理成了视频和PDF(实际上比预期多花了不少精力),包含知识脉络 + 诸多细节,由于篇幅有限,这里以图片的形式给大家展示一部分。
还有 高级架构技术进阶脑图、Android开发面试专题资料,高级进阶架构资料 帮助大家学习提升进阶,也节省大家在网上搜索资料的时间来学习,也可以分享给身边好友一起学习。
【Android核心高级技术PDF文档,BAT大厂面试真题解析】
【算法合集】
【延伸Android必备知识点】
【Android部分高级架构视频学习资源】
**Android精讲视频领取学习后更加是如虎添翼!**进军BATJ大厂等(备战)!现在都说互联网寒冬,其实无非就是你上错了车,且穿的少(技能),要是你上对车,自身技术能力够强,公司换掉的代价大,怎么可能会被裁掉,都是淘汰末端的业务Curd而已!现如今市场上初级程序员泛滥,这套教程针对Android开发工程师1-6年的人员、正处于瓶颈期,想要年后突破自己涨薪的,进阶Android中高级、架构师对你更是如鱼得水,赶快领取吧!
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
**Android精讲视频领取学习后更加是如虎添翼!**进军BATJ大厂等(备战)!现在都说互联网寒冬,其实无非就是你上错了车,且穿的少(技能),要是你上对车,自身技术能力够强,公司换掉的代价大,怎么可能会被裁掉,都是淘汰末端的业务Curd而已!现如今市场上初级程序员泛滥,这套教程针对Android开发工程师1-6年的人员、正处于瓶颈期,想要年后突破自己涨薪的,进阶Android中高级、架构师对你更是如鱼得水,赶快领取吧!
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!