Continue reading “Quick Tip: Android Add Image to PagerTabStrip or PagerTitleStrip”
Quick Tip: Android ViewFlipper Jump/Move/Switch To a Certain Child View
At times you might want to jump the user to a specific View inside a ViewFlipper on the click of some other View or some such scenario. So let’s say we have a ViewFlipper in our layout resource like this:
Continue reading “Quick Tip: Android ViewFlipper Jump/Move/Switch To a Certain Child View”
QuickTip: Store Undefined and Null in Class/Table Rows on Parse.com
Update: Parse is shutting down. So you should start migrating.

I’ve been working on an Android app backed by Parse.com to make my development process faster and easier. So while coding the app I made a decision to have 2 classes (tables) called Conversations and User (exists by default). Conversations has a field called userId that should essentially store the objectId from User class. But some conversations are created by guest so for those records I decided to store NULL or “nothing” (undefined) under the userId column rather than Pointers which is what the column type is.
Continue reading “QuickTip: Store Undefined and Null in Class/Table Rows on Parse.com”
Quick Tip: Android Convert byte[] Data to ImageView
Let’s say you have a byte[] array of image data that you want to convert into an Image by showing up in an ImageView in your layout. We can achieve that with a few lines of code.
Continue reading “Quick Tip: Android Convert byte[] Data to ImageView”
Detecting Common Gestures on Android Using GestureDetector
Gestures are those subtle motions to trigger interactions between the touch screen and the user. It lasts for the time between the first touch on the screen to the point when the last finger leaves the surface. We’re all familiar with it as it’s the most common way to communicate with apps on our mobiles, tablets, etc. these days. Some examples are scrolling in an app by swiping vertically/horizontally, pinch to zoom, long press to select and so on.
Continue reading “Detecting Common Gestures on Android Using GestureDetector”
Using onTouchEvent() and View.OnTouchListener Interface with MotionEvent to Detect Common Gestures Like Tap and Swipes on Android
Touch gestures like tapping, swiping vertically/horizontally, panning, etc. occurs when a user places one or more fingers on the screen and by the time the last finger looses contact, the entire pattern of finger movements is interpreted as a particular gesture by your android application. First all the relevant data of touch events are gathered and then they’re interpreted to see which gestures they match and the pertaining actions are executed as specified in the code.
Quick Tip: Android Change Action Bar SearchView Hint (Placeholder) and Text Color
There are times when you’ll want to change the hint (placeholder) color and the text color of a SearchView widget. Here’s a small snippet that’ll allow us to do it:
Continue reading “Quick Tip: Android Change Action Bar SearchView Hint (Placeholder) and Text Color”