This class was renamed a long time ago, it is now called LayoutInflater and it works exactly the same way.
On Fri, Jan 2, 2009 at 11:21 PM, Sarath Kamisetty <[email protected]> wrote: > > Hi, > > The examples in the blog are using ViewInflate class, however I can't > find this class in the SDK API reference. > > http://code.google.com/android/reference/classes.html#letter_V > > Is this deprecated ? Eclipse is also complaining about this. > > Thanks, > Sarath > > On Wed, Dec 31, 2008 at 6:01 AM, Mark Murphy <[email protected]> wrote: >> >> Sarath Kamisetty wrote: >>> Hi, >>> >>> I have a ListActivity for which I am setting up ListAdapter like below: >>> >>> phoneListAdapter = new SimpleCursorAdapter(this, >>> R.layout.contacts_list_row, >>> managedCursor, new String[] { PhonesColumns.NUMBER, >>> PhonesColumns.TYPE}, >>> new int[] { R.id.text1, R.id.text2 }); >>> setListAdapter(phoneListAdapter); >>> >>> However, the output here is not readable as PhonesColumns.TYPE is >>> displaying number strings like 2, 1 etc. A sample output that I get is >>> like below: >>> >>> 111-222-3333 2 >>> 222-333-4444 1 >>> >>> I want to make it more readable by converting them to "Mobile", >>> "Home", "Work" etc. A sample desired output list is like below: >>> >>> 111-222-3333 MOBILE >>> 222-333-4444 WORK >>> >>> Essentially, I don't want the columns to be displayed as is. How do I >>> achieve this ? >> >> There are two ways to approach this: as a data problem, or as a view >> problem. >> >> As a data problem, you could create your own CursorWrapper class that >> wraps your managedCursor and converts PhonesColumns.TYPE into something >> more user-friendly. >> >> I tend to look at this as a view problem, so I create a custom adapter >> that creates my own views, where I can make 2, 1 be MOBILE, WORK or >> different icons or whatever I feel like. I have a whole series of blog >> posts up on this topic: >> >> http://androidguys.com/?s=fancy+listviews >> >> Forgive the formatting, and be aware that the older posts are for the M5 >> SDK and so need some tweaking to work on the current SDK. >> >> -- >> Mark Murphy (a Commons Guy) >> http://commonsware.com >> >> Android Training on the Ranch! -- Mar 16-20, 2009 >> http://www.bignerdranch.com/schedule.shtml >> >> > >> > > > > -- Romain Guy Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

