본문 바로가기

Development/Android

(6)
[Android] Set programatically color to the status bar in Android. This posting shows how to set color to the status bar in Android. Status bar is provided by Android System UI and provides information about the system. It's the red colored area in the picture below. Set the color you want with the folollowing code. It's not supported in the version that's lower than Lollipop. public void setStatusBarColor(int color) { if (Build.VERSION.SDK_INT < Build.VERSION_..
[Android] Show an icon in Actionbar. It's possible to show an icon in Actionbar with the following code. getSupportActionBar().setDisplayShowHomeEnabled(true); getSupportActionBar().setIcon(R.drawable.ic_launcher);
[Android] Convert asset and drawable to URI. It's required to convert local resources like asset and drawable to URI string. How to convert them? Asset String imageUri = "assets://image.png"; Drawable String imageUri = "drawable://" + R.drawable.image;
[Android] RecyclerView - java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 16(offset:16).state:34 androidx.recyclerview.widget.RecyclerView{3c041c7 VFED.V... ........ 0,0-1080,1450 #7f080058 app:id/common_list_re.. Error log 더보기 java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 16(offset:16).state:34 androidx.recyclerview.widget.RecyclerView{3c041c7 VFED.V... ........ 0,0-1080,1450 #7f080058 app:id/common_list_recycler_view} java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 16(offset:16).state:34 androidx.recyclerview.widget.RecyclerView{3c0..
[Android] Register an Android app on Opera Mobile Store I'm introducing a 3rd party app store called 'Opera Mobile Store' for Android. http://apps.opera.com/ HTML5 Games and Apps - Opera Mobile Store html5.oms.apps.bemobi.com Opera Mobile Store provides service for Android, Blackberry, iOS, HTML 5, Symbian, Windows phone and Windows Mobile. It's possible to create an account for developers with the following link. A email is received with password on..
[Android] The color "xxx" in values has no declaration in the base values folder; this can lead to crashes when the resource is queried in a configuration that does not match this qualifier less... This error occurs usally when a project is copied. The solution is simple as follows. 1. Build > Clean Project 2. File > Invalidate Caches / Restart You can confirm the project is working fine after restarting Android Studio.