English 中文(简体)
胎板显示表板上的空值,但对流动者则进行罚款。
原标题:spinner shows empty values on tablet, but works fine on mobiles

http://www.ohchr.org。 这些价值观正在从非行获得,是罚款的。

     ArrayAdapter<String> spinnerArrayAdapter1 = 
            new ArrayAdapter<String>(SpotlighterBasicActivity.this,
                    android.R.layout.simple_spinner_item, spinnerQTypeList);
     spinnerArrayAdapter1.setDropDownViewResource( android.R.layout.simple_spinner_dropdown_item); 
     Spinner selectQType=(Spinner) findViewById(R.id.spinnerInputQType);

     selectQType.setPrompt("QType");// logcat points warning on this line.
     selectQType.setAdapter(spinnerArrayAdapter1);
     selectQType.setSelection(QTypeIndex);
     selectQType.setOnItemSelectedListener(new OnItemSelectedListener() {
     ...
     }

这是表上的产出:

https://i.stack.imgur.com/Hmqo3.png” alt=“Output on tablet”/>

奇怪的是,它正在为mobile类 em器和装置的工作完全罚款,但为tablet类 em器和装置提供了警告。

Following is the logcat detail:

05-18 16:47:29.284: E/SpotlighterBasicActivity(481): QTypeIndex=0
05-18 16:47:29.284: E/SpotlighterBasicActivity(481): spinnerArrayList[1]=Type 1, spinnerQTypeID=5853, defaultQType=6307
05-18 16:47:29.294: E/SpotlighterBasicActivity(481): spinnerArrayList[2]=Type 2, spinnerQTypeID=6308, defaultQType=6307
05-18 16:47:29.304: W/System.err(481): java.lang.NullPointerException
05-18 16:47:29.304: W/System.err(481):  at in.varit.spotlighter.basic.SpotlighterBasicActivity.loadQTypeSpinners(SpotlighterBasicActivity.java:334)
05-18 16:47:29.304: W/System.err(481):  at in.varit.spotlighter.basic.SpotlighterBasicActivity.onCreate(SpotlighterBasicActivity.java:203)
05-18 16:47:29.304: W/System.err(481):  at android.app.Activity.performCreate(Activity.java:4397)
05-18 16:47:29.304: W/System.err(481):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
05-18 16:47:29.313: W/System.err(481):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1779)
05-18 16:47:29.313: W/System.err(481):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1831)
05-18 16:47:29.313: W/System.err(481):  at android.app.ActivityThread.access$500(ActivityThread.java:122)
05-18 16:47:29.313: W/System.err(481):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1024)
05-18 16:47:29.325: W/System.err(481):  at android.os.Handler.dispatchMessage(Handler.java:99)
05-18 16:47:29.325: W/System.err(481):  at android.os.Looper.loop(Looper.java:132)
05-18 16:47:29.325: W/System.err(481):  at android.app.ActivityThread.main(ActivityThread.java:4123)
05-18 16:47:29.325: W/System.err(481):  at java.lang.reflect.Method.invokeNative(Native Method)
05-18 16:47:29.325: W/System.err(481):  at java.lang.reflect.Method.invoke(Method.java:491)
05-18 16:47:29.334: W/System.err(481):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
05-18 16:47:29.334: W/System.err(481):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
05-18 16:47:29.334: W/System.err(481):  at dalvik.system.NativeStart.main(Native Method)
最佳回答

<代码>当选 QType为零。 并且

使用<条码>查询(null! QType:

and also check id of selectQType is it right from layout.xml?

问题回答

暂无回答




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签