Category: "Android programming"
Last weekend, I started to migrate my old projects to the latest Android Studio. That is not a smooth process, first error I got is "Could not determine the class-path for interface com.android.builder.model.AndroidProject". I believe that caused by the old grade. I got a tip smart from Android Studio saying I should upgrade the version from 0.22 to 2.3.0. So I modified the classpath in the build.gradle file
Then I still got the same error. After I did some research on the internet. I found to upgrade the gradle. I need to change gradle-wrapper.properties too.
That is to get the latest package.
In your development option, you pick an app to mock your GPS location. I used this way to pretend I was in Hong Kong to test some apps for my clients in Hong Kong. But I found after that, even I switched off that GPS mocking. I found some funny behaviors. I turned on the navigation in Google map. Yes, at the first, GPS position is right, back to Australia, not in Hong Kong anymore. But my car was driving, the GPS position won't update. After I turned off my phone and turn it back on again. Then that is normal. I think after mocking GPS position, you need to reset the GPS. I know some apps can do.
I put every fragment with their own FAB Button. I found that is always placed under the last element of that layout. It won't be pushed further bottom, at the right bottom of the screen. I used to use the LinearLayout and RelativeLayout, they won't work too.
FInally, I found android.support.design.widget.CoordinatorLayout is only way to work, I don't know why yet, I found this solution by trial and error
Last night, I upgraded my android studio from 1.2 to 1.4. I have used android studio for more than a year. In old time, that was still in beta. Every upgrades, I needed to fixes the project files. This times, that was hassle-free, it only required to download 2GB files for library and sdk update. That is great. I love it.
I found ListView control in Android is very easy to use, that is very good. Even there is a method to set the empty view, it will display it when the list context is empty.
You put any view in there. I put a LinearView with a Textview. That is easy!