我的 Android 面试复习指南

1. 声明

本文并非出于分享目的,而是笔者最近开始找工作和面试需要,整理的一份 Android 面试复习指南。内容包括:自己写的笔记、书籍摘抄、网友文章链接等等。

准备面试过程中越发觉得:需要整理出一份属于自己的 Android 知识体系笔记,作为自己的复习材料。会更自信。

2. 参考书籍

3. Activity 启动模式

4. 生命周期

Activity

This onRestoreInstanceState() method is called between onStart() and onPostCreate(Bundle).

If onSaveInstanceState() called, this method will occur after onStop() for applications targeting platforms starting with Build.VERSION_CODES.P. For applications targeting earlier platform versions this method will occur before onStop() and there are no guarantees about whether it will occur before or after onPause().

Fragment

Activity 和 Fragment 结合

5. 事件分发机制

6. View 工作原理

7. Drawable 体系

8. 消息机制

9. VSYNC 机制

10. 性能优化

涉及:优化工具、App 启动速度、布局优化、ANR 优化、卡顿优化、内存优化、网络优化、电量优化等。

10.1 内存泄漏

10.2 布局优化

工具:Hierarchy Viewer,Android Lint,Layout Inspector。

思想:减少布局层级。

手段:

  • 尽量不嵌套 RelativeLayout。
  • 尽量不在嵌套的 LinearLayout 中都使用 layout_weight。
  • 选择 ViewGroup 应以尽量减少 View 层级为主。
  • 删除布局中无用的控件和层级。
  • 使用 TextView 的 Drawable 减少层级。
  • 有选择地使用简单高效的 ViewGroup
  • 使用 <include> 重用布局。
  • 使用 <merge> 减少布局的层级。
  • 使用 ViewStub 实现按需加载,提高程序初始化效率。

网络文章:

10.3 内存优化

10.4 ANR优化

ANR 产生条件:

11. 动画机制

12. OkHttp

13. 面试

Binder

四大组件工作原理

多线程

  • Retrofit
  • Glide
  • EventBus
  • LeakCanary
  • RxJava
  • androidx.lifecycle
  • androidx.room
  • androidx.paging
  • androidx.work
  • androidx.navigation
  • Kotlin
  • kotlinx.coroutines
  • JNI
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值