Programming and Personal Development

Monthly Archives: March 2012

Customizing Android WebView

In previous post we saw how to use the default Webview element to display html resources in your android application . Webview also offers the ability to override its default content loading behaviour, look and feel and its settings to suit your needs. Lets look at the various  customization points with examples. WebViewClient Allows youContinue Reading

Display Web Pages in your android application

Webview extends the View class and is useful for displaying a web page  as part of your activity. By default it behaves like a browser minus things like navigation controls, address bar etc. Even javascript is disabled with the default settings. You can use it to display things like help files , end-user agreements, FAQsContinue Reading

Android Spinner

Spinners are the Dropdown widget equivalent in android.  They are useful for displaying the list of items especially when the available screen real estate is less. Only the selected item is shown while the rest are hidden. Clicking on the spinner results in a drop down list showing the list contents. Just as with ListViews you haveContinue Reading

Android ListView Part 3

In part 2 of the series, we discussed how android’s ArrayAdapter class internally reuses views to optimize performance. However reusing views has the side effect of losing any state associated with the current data, as the view is recycled andupdated with new data. Lets say, we want to change the appearance of the text when the userContinue Reading

Android ListView Part 2

In part1 of this series, you learned what an adapter is and how it can be used to feed a simple ListView element.  Continuing from there, lets learn how to make some useful customizations to the ListView and a trick that android uses to optimize the usage of ListView elements for better performance. MultiChoiceMode Lets start withContinue Reading

Web Analytics