settings - is this a ListView ?

by Marco Alexander Schmitz » Wed, 29 Sep 2010 19:19:32 GMT


Sponsored Links
 Hi,

as we all know in the emulator under settings we can configure out
device.

Are these settings views just ListViews?

The have headings and almost every row looks different - a normal
ListView makes all rows look the same ?!

 http://www.webinmotion.de/test/masc/device.png 

Best regards,
DaRolla

--



settings - is this a ListView ?

by Andrew Brampton » Wed, 29 Sep 2010 19:31:35 GMT


 This is a ListView, as it is quite easy to have every row different.
But in fact that Activity is most likely a PreferenceActivity[1] that
takes a lot of the hassle out of creating a ListView and simplifies
handling preferences.

Andrew

[1] 
 http://developer.android.com/reference/android/preference/PreferenceActivity.html 

On 29 September 2010 12:19, Marco Alexander Schmitz


>


Sponsored Links


settings - is this a ListView ?

by Mark Murphy » Wed, 29 Sep 2010 19:32:42 GMT


 On Wed, Sep 29, 2010 at 7:19 AM, Marco Alexander Schmitz



Yes.


You can have as many different types of rows as you want. You just
need an adapter that generates them. A simple adapter, like
ArrayAdapter or SimplerCursorAdapter, cannot do that. You need smarter
row-creation methods, plus override methods like getViewTypeCount()
and getItemViewType().

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

Android 2.2 Programming Books:  http://commonsware.com/books 

--



settings - is this a ListView ?

by Kostya Vasilyev » Wed, 29 Sep 2010 19:33:14 GMT


 It's a subclass of PreferenceActivity:

 http://developer.android.com/reference/android/preference/PreferenceActivity.html 

displaying preferences based on an XML file describing them:

 http://developer.android.com/resources/samples/ApiDemos/res/xml/preferences.html 

-- Kostya

29.09.2010 15:19, Marco Alexander Schmitz :
Hi, as we all know in the emulator under settings we can configure out device. Are these settings views just ListViews? The have headings and almost every row looks different - a normal ListView makes all rows look the same ?! http://www.webinmotion.de/test/masc/device.png Best regards, DaRolla
-- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com --



settings - is this a ListView ?

by Marco Alexander Schmitz » Thu, 30 Sep 2010 15:18:45 GMT


 thanks a lot !!!

this was very helpful for many.

best regards,
Marco

2010/9/29 Kostya Vasilyev <kmans...@gmail.com>

>



Other Threads

1. Auto launch Service

Hi All,
I am getting below error when ever i am trying to register callback
function.

E/AndroidRuntime(  376): Caused by: java.lang.SecurityException:
Binder invocation to an incorrect interface
E/AndroidRuntime(  376):        at android.os.Parcel.readException
(Parcel.java:1234)
E/AndroidRuntime(  376):        at android.os.Parcel.readException
(Parcel.java:1222)
E/AndroidRuntime(  376):        at com.android.phone.insterface.IMYService
$Stub$Proxy.registerCallback(IADService.java:125)
E/AndroidRuntime(  376):        at com.android.phone.PhoneApp.onCreate
(PhoneApp.java:322)
E/AndroidRuntime(  376):        at
android.app.Instrumentation.callApplicationOnCreate
(Instrumentation.java:1045)
E/AndroidRuntime(  376):        at
android.app.ActivityThread.handleBindApplication(ActivityThread.java:
3434)

IMYService is a service interface, I would like to run it
automatically when Android starting.
so,I add this service(MYService) to ServiceManager in SystemServer.java
(com.android.server) like this:

 try {
                Log.i(TAG, "Starting HeadsetObserver");
                // Listen for wired headset changes
                ServiceManager.addService("MYSERVICE",new
com.x7.android.service.MYService(context));
            } catch (Throwable e) {
                Log.e(TAG, "Failure starting HeadsetObserver", e);
            }

but I am getting the error i mentioned during the bindService call
when I call this service.
Could you please let me know the steps mainly I have to runing service
automatically when Android starting.and this service will used
sqlite,so it would be great if you could let me know what all
permission short
of thing to take care.

thanks.

--~--~---------~--~----~------------~-------~--~----~

2. Changing background color on a selected listview item

What is the stack crawl?






-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~

3. How to access "shared data/settings" across multiple application? ContentProvider or SharedPreferences?

4. attributes for multiple resources in attrs.xml

5. opencore RTSP streaming NAT/firewall issue

6. SDK1.5: adb with one real device via ethernet and one emulated device

7. How to send SMS between two emulators (SDK 1.5 or older)