I use to work on a multi language (English, Malay, Chinese) Android mobile app previously, which required to keep the value in database. There is no perfect solution to design a database to support this.
Extends from my previous part 1 article of Chinese Locale in Android, I accidentally found out that the minimum resources needed:
en
zh-rCN
zh-rTW
Instead of using the well known Butter Knife, this time I try to use Android Data Binding Library on my existing open source project, the steps are quite simple.
Step 1:
Extends from my previous post Retrofit 2 + AutoValueGson, I’m trying to add a database for the project. I choose to use ContentProvider due to the benefit of ContentObserver, with the help of SQLDelight to generate all the necessary fields in Java model.
When I’m working on a regional mobile app recently, I start to notice an useful usage of interface when combine with Gradle Build Variants in Android Studio.
interface
Firstly, I put an interface in the main project.
For a standard mobile app that required database as a storage, the sample code normally look like this:
public class DatabaseHelper extends SQLiteOpenHelper { private static final String DATABASE_NAME = "anonymous.db"; private static final…
On this new year of 2017, I decide to find a better blogging platform which support Markdown syntax, as it will be easier for me to blog with programming code.
Here is the new site: https://medium.com/fabiohub