Checking whether the current thread is the UI/Main thread or some other background thread is very easy. Here’s the code for it:
Continue reading “How to Check/Detect Whether Current Thread is UI/Main Thread or Not in Android”
Web and Mobile Development articles
Checking whether the current thread is the UI/Main thread or some other background thread is very easy. Here’s the code for it:
Continue reading “How to Check/Detect Whether Current Thread is UI/Main Thread or Not in Android”
There are times when you want to have a scrollable ViewGroup like a ViewPager or a ListView or a GridView inside another scrollable ViewGroup like a ScrollView. You could have various combinations like a ViewPager in a ListView, a ViewPager and a ListView inside a ScrollView (this is what I had to do in my Android app), etc. in your application.
You might be thinking showing up a View like TextView, ImageView, EditText, Button, etc. or a ViewGroup (wrapping other Views) like RelativeLayout or LinearLayout below a ListView/GridView must be easy. It’s not. Not in Android atleast.
Continue reading “Android Add Views or View Groups Below a ListView or GridView”
If you’re running your application in the Android Emulator and suddenly the Hierarchy Viewer stops loading up the View Hierarchy in the standalone tool or in Android Device Monitor then chances are high that ADB server needs to be restarted in order to fix it.
When using the versatile Android Debug Bridge (adb) tool to issue commands, if there’s only one device or emulator attached then that’s fine as the commands will be executed on exactly that. But if there’s more than one instance then we’ll get an error on the terminal saying error: more than one device and emulator.
Continue reading “Execute ADB Commands To Query a Particular Android Device/Emulator”
In this quick tip, we’ll see how to use the excellent Android Debug Bridge (adb) tool on the command line to list all the installed packages on our android device (non-rooted in my case) and then extract one of their APK files to our computer.
Continue reading “Get Application APK File from Android Device To Your Computer”
I upgraded a lot of things on my system. From Mavericks to Yosemite (upgrading the entire Mac operating system itself) to upgrading the Android SDK with Eclipse as well as Android Studio from 0.6.1 to 0.8.6.