Android开发笔记(七)- Data Storage & Content Provider组件
Android Architecture(MVC, MVP and MVVM)

Android Architecture(MVC, MVP and MVVM)

To make our Android application easy to extend, modify, refactor, test or even just read it, the architecture of the application is very important. For sure we can’t have a single class MainApplication or MainActivity and put everything inside, it will be a nightmare to just read the code and understand. There are three main architectures to use in Android to build our application and gives us power to do all operations we mentioned above: Model-View-Controller(MVC), Model-View-PResenter(MVP) and Model-View-VIewModel(MVVM). Let’s talk about them one by one.

Read More
Android开发笔记(六)- BroadcastReceiver组件

Android开发笔记(六)- BroadcastReceiver组件

在介绍了Activity组件Service组件之后,这篇文章将会介绍Android开发中的第三个重要组件:BroadcastRecevier。简单来说,BroadcastReceiver主要用于监听、接收来自Android系统或者其他应用程序的广播信息,是用于不同APP之间,以及APP和Android系统之间通信的重要工具。APP可以根据接收到的信息,采取不同的操作来进行响应。

Read More
Android开发笔记(五)- Service组件

Android开发笔记(五)- Service组件

Android开发笔记之基础篇(二)中,我们简单总结了Activity组件的特性和使用方法。在其之后的第二个重要组件就是Service(服务)。简单来说,如果说Activity是负责处理与用户交互的UI部分的内容,那么Service则是负责在后台处理一些长时间,大型的操作或计算的内容。今天我们就继续来看看Service组件的特性以及使用方法。

Read More
Android SDK Version

Android SDK Version

In Android development, I’m always confused about the properties in build.gradle like compileSdkVersion, targetSdkVersion, minSdkVersion etc. To end up this confusion and make it clear, after I read offical Google docuement and some posts, here is a short conclusion to explain each of them and compare the diff.

Read More
Java Relection

Java Relection

Java Reflection is a process of examining the runtime behavior of a class. This feature is also known as dynamic programming since all attributes, interfaces, constructors, fields and methods of a class can be inspecting and verifying during runtime. Futhurmore, we can instantiate new objects, invoke methods, and get or set field values using reflection as well. So let’s see what is reflection and how to use it in this post.

Read More
ProGuard, D8, R8编译器介绍

ProGuard, D8, R8编译器介绍

在编译代码,生成Android APK文件时,为了缩减生成安装包apk文件的大小,Google官方在Android Gradle插件中提供了几种不同的优化方式:ProguardD8R8。它们主要用于对生成的apk文件进行代码缩减(Code shrinking),资源缩减(Resource shrinking),混淆处理(Obfuscation)和优化(Optimization)。这篇文章会首先介绍一下这些编译器的产生顺序以及原因,然后再介绍一下proguard-rules.pro中规则的定义方法。

Read More
Lambda Expression Basic

Lambda Expression Basic

Lambda Expression is a very useful tool and it makes the code concise and elegant. It’s not a very hard concept to understand but still need some kind of conclusion or summary. So in this post I will have a brief introduction on what is lambda expression with several examples how to use it. My example are using Kotlin lanuage, but it has the same pattern or other languages like Java and C++.

Read More
常用摄影构图总结

常用摄影构图总结

刚开始接触摄影,在这里总结一下常用的九种简单易学的摄影构图方法,每一种都有不同的适用场景和范围,也会使照片产生不同的意境。这仅是一个总结归纳,做为日常摄影练习时的构图思路参考。

Read More
Android开发笔记之易混淆概念

Android开发笔记之易混淆概念

这篇文章中将会列出在Android开发中经常遇到并且容易混淆的概念,他们基本都是成对出现并且需要进行比较异同的。这其中不光设计安卓的知识,也有关于Java和Kotlin语言特性的一些基本概念。在面试时很多成对的概念会同时出现并被问到异同,这篇文章也会持续更新碰到的各种易混淆概念。

Read More