Recently Android Support Library has been updated to v21.1.1. There were some changes and you can see the changed via the link:
https://developer.android.com/tools/support-library/index.html#revisions
One thing I have notice is new AppCompt* classes for appcompat library. Now you need to use AppCompatActivity instead of ActionBarActivity. It supports support library action bar features. ActionBarActivity now has been deprecated. I think this kind of too often changes in framework makes us developers annoying. Some people might just start to use ActionBarActivity.
I posted how to setup Kotlin and DataBinding in Android Stuido in the last blog (http://marksunghunpark.blogspot.com.au/2017/04/kotlin-binding-library-setup-in-android.html). In this post, I am going to how to use DataBiding in the MainActivity when you create a navigation drawer project from Android Studio templates. Layouts You will have four layouts in app/src/res/layout folder: app/src/main/res/layout/activity_main.xml app/src/main/res/layout/app_bar_main.xml app/src/main/res/layout/content_main.xml app/src/main/res/layout/nav_header_main.xml And activity_main.xml contains all other layout using include layout. You need to have tag in activity_main.xml , app_bar_main.xml and content_main.xml . If you don't have the tag, Binding library cannot recognise the sub layouts properly. Binding library doesn't support toolbar and navigation drawer yet, so you can use using BindingAdapter if you want to use binding library.(But I'm gong to skip this part for simplici...
Comments
Post a Comment