Blank option in Spinner

by julius » Tue, 03 Mar 2009 10:43:40 GMT


Sponsored Links
 Hi,

I have a spinner which I would like to add a blank option to so that
by default no choice is selected. I've looked around and in the
Spinner class, but I can't see how to do this. I am just wondering if
there is a method already for doing this.

Thanks for any ideas.

Julius.
--~--~---------~--~----~------------~-------~--~----~



Blank option in Spinner

by Will » Sat, 07 Mar 2009 07:29:42 GMT


 If you're populating your Spinner with a string array I would just
make one item in the array a blank string.



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


Sponsored Links


Other Threads

1. Masuk Indonesia, HTC Desire Dibanderol Rp 6 Juta-a

*Masuk Indonesia, HTC Desire Dibanderol Rp 6 Juta-an
* *Trisno Heriyanto* - detikinet



HTC Desire (htc)
  *

Jakarta* - Melengkapi lini produknya di pasar smartphone, HTC meluncurkan
produk baru bernama HTC Desire. Ponsel berbasis Android terbaru ini
dibanderol pada kisaran harga Rp 6 Juta-an. Apa saja yang ditawarkan?

HTC Desire, merupakan produk bungsu dari jajaran ponsel pintar HTC yang
berbasis Android. Ponsel yang mengusung teknologi canggih itu pun resmi
hadir di Indonesia, Selasa (15/6/2010).

Guna bersaing dengan ponsel pintar lainnya, HTC Desire dipersenjatai dengan
spesifikasi yang cukup menggiurkan. Misalnya, prosesor Snapdragon 1GHz.
Untuk sistem operasinya, ponsel ini juga telah mengusung Google Android
versi 2.1. Sedangkan untuk koneksi nirkabel, ponsel ini telah mendukung 3G
serta Wi-Fi: IEEE 802.1r b/g.

Layar sentuh berukuran 3,7 inchi yang dimilikinya, membuat ponsel dapat
menampilkan gambar yang cukup cemerlang. Terlebih lagi, ketika dijajal
*detikINET
*pada acara peluncurannya di Blowfish Cafe, Selasa (15/6/2010), sentuhan
pada ponsel ini cukup responsif.

Dibanderol pada kisaran harga Rp. 6.500 ribu, membuat produk ini bakal
ponsel ini menjadi lawan tangguh di ranah ponsel pintar papan atas.
Tertarik?


* ( eno / wsh ) *

________________________________

Go Green......GoWes Lah......

-- 
"Indonesian Android Community [id-android]" 

2. java.lang.ExceptionInInitializererror

Hi,

Can any one please help to resolve the above error. Also can any one
please clarify whether we can unit test j2me methods

I am trying to call J2ME APIs in one of the test methods of
Instrumentation TestCase.

I have modified the dx source code such that it converts j2me jars to
dalvik format during runtime.

package android.jsr.tests;

import android.test.InstrumentationTestCase;
import javax.microedition.lcdui.DateField;

public class MIDPTest extends InstrumentationTestCase {
        //@Override
        protected void setUp() {
                // TODO Auto-generated method stub
                try {
                        super.setUp();
                } catch (Exception e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
        }
        public void testMIDP() {
                DateField dt= new DateField("MIDP",DateField.DATE);
                System.out.println("Testing JSR MIDP 2.0"+dt.getLabel());
        }
}

Below is the stack trace of the error.

java.lang.ExceptionInInitializerError

at android.jsr.cts.MIDPTest.testMIDP(MIDPTest.java:23)
at java.lang.reflect.Method.invokeNative(Native Method)
at
android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:
205)
at
android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:
195)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
at
android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:
444)
at android.app.Instrumentation
$InstrumentationThread.run(Instrumentation.java:1447)

Caused by: java.lang.ExceptionInInitializerError
at javax.microedition.lcdui.Item.<clinit>(Item.java:611)
... 14 more
Caused by: java.lang.ExceptionInInitializerError
at javax.microedition.lcdui.Displayable.<clinit>(Displayable.java:116)
... 15 more
Caused by: java.lang.UnsatisfiedLinkError: init
at javax.microedition.lcdui.Font.init(Native Method)
at javax.microedition.lcdui.Font.<init>(Font.java:198)
at javax.microedition.lcdui.Font.<clinit>(Font.java:465)
... 16 more



-- 

3. Want to access a method of an application from different application

4. Want to access a method of an application from different application

5. Camera support in Browser on Froyo

6. How to emulate onLowMemory?

7. Moddin