Which View/Layout does the Market app (1.6) details activity use?

by Mark Murphy » Fri, 26 Feb 2010 21:08:43 GMT


Sponsored Links
 


That is a misconception. Try using your D-pad or trackball or whatever
on that screen. You will find that the comments, the three items below
the "About the developer" heading, and the "Flag as inappropriate" row
are all selectable. Hence, I'm reasonably certain this is a ListView
overall.


It is useful anyplace where you have the need for a ListView where the
content does not all come from a single adapter. That could be headings.
That could be a mix of fixed rows (e.g., "Flag as inappropriate") and
data-driven rows (e.g., the comments). It could be both. It could be
something else.


If the non-header rows are to be selectable and/or clickable, then you
probably want to use a ListView. If not, a ScrollView should work.


You cannot have scrollable things inside scrollable things. Hence, you
cannot have a ListView inside of a ScrollView, for example.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

_Android Programming Tutorials_ Version 1.0 In Print!

--



Other Threads

1. how to disable auto pdp context activate feature?

All
   Did search the group page before posting this..apologies if already
discussed and answered.

   Latest android sdk in a G1 phone.  Through adb shell or otherwise
(via sqlite and DB manipulation), is there a way to disable this
feature by which a PDP context activate is automatically sent after
phone restart.

   Is this feature triggered because of the APN used or because of
some initialization of data app like MMS or browser?

Thanks
SR

-- 

2. Weird contact behavior in 2.1 - adding phone number

I am using the code below to add a phone number to a contact. The code
works in some cases and not others.

1. On the 2.1update1 emulator it works all the time
2. On a Nexus One 2.1update1 phone it works when I create a new
contact manually, then use my app with the code below to add a phone
number to said contact
3. On the same phone, when the app adds a phone number to a contact
that existed from before (tied to a gmail account), the api call
succeeds with no exception but it does not add the new number in to
the contact.
4. The update of one phone number to another works 100% of the time.

What gives with #3?
Jay

------------
Adding phone number to existing contact (does not work in Case 3
above):
{
        ArrayList<ContentProviderOperation> ops = new
ArrayList<ContentProviderOperation>();
        ops.add(ContentProviderOperation.newInsert(Data.CONTENT_URI)
                                        .withValue(Data.RAW_CONTACT_ID, 
rawcontactID)
                                        .withValue(Data.MIMETYPE, 
Phone.CONTENT_ITEM_TYPE)
                                        .withValue(Phone.NUMBER, PhoneNumber)
                                        .withValue(Phone.TYPE, 
Phone.TYPE_MOBILE)
                                        .build());
        context.getContentResolver().applyBatch(ContactsContract.AUTHORITY,
ops);
}

Updating phone number in existing contact (works all the time):
{
        ArrayList<ContentProviderOperation> operation = new
ArrayList<ContentProviderOperation>();
        operation.add(ContentProviderOperation.newUpdate(Data.CONTENT_URI)
                                        .withSelection(Data._ID+ "=?", new 
String[]
{String.valueOf(contactID)})
                                        .withValue(Phone.TYPE, phonetype)
                                        .withValue(Phone.NUMBER, PhoneNumber)
                                        .build());
        context.getContentResolver().applyBatch(ContactsContract.AUTHORITY,
operation);
}

-- 

3. How to access clipboard through Android shell

4. Questions about grid

5. Do I need to buy Google Maps license?

6. View switching with in one tab

7. How do you send a carriage return to a handset using adb