While working on the Ambient Dynamix Project, I needed to create a listview which contains a non fixed number of headers each one followed by some list items. A common solution is to use the MergeAdapter. A MergeAdapter object exposes the addAdapter(), addView() and addViews() methods. The demo included in the repo is pretty self… Continue reading Inflating different xml layouts in an Android ListView for different Objects.
Ideally when I have to remove a list item from a listview, I’d remove the data object from the collection which the adapter uses and then do a adapter.notifyDataSetChanged() call which’ll redraw the list view. Consider an adapter which uses an array list of Strings. Now, to delete an item from the ListView, But this… Continue reading Hiding a list item from an Android ListView without removing it from the data source.
This probably is the simplest way to detect the exact swipe direction on Android. We split the screen into four quadrants and then use the MotionEvents to calculate the angle of swipe. The code is pretty self explanatory. To check out how to use this SwipeGestureDetector class with the relevant view, check out this post… Continue reading Detecting up-down, left-right swipe on Android.
Reading App The Privly JS reading app helps a user to view the encrypted content behind privly links. We’ve been working to make sure that the same js app can be used on all platforms and have successfully integrated it on android apart from the web application and the firefox and chrome extensions. This makes… Continue reading Privly reading app integration and detecting swipe gesture.
I wanted to use a Windows XP VM to well, play Age of Empires on Ubuntu. As it turns out, I can’t connect to multiplayer aoe using this method but I did learn a few cool things along the way. In case you know of a method to play aoe 2 on ubuntu, (without using… Continue reading Virtual Machine on Ubuntu 12.04 and Samba