Help: 1.5 AutoCompleteTextView Problem

by efan » Fri, 05 Jun 2009 13:01:41 GMT


Sponsored Links
 his layout xml file contains an AutoCompleteTextView:
http://code.google.com/p/zz-doctor/source/browse/trunk/ZZ/res/layout/welcome.xml
does not show in 1.5 AVD. No error in either screen or console log.

It worked fine in 1.1, in both AVD and eclipse visual layout.

When try to open it in eclipse visual layout under android 1.5, shows
NullPointException, and following stack trace in console log:
java.lang.NullPointerException
at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:
458)
at android.widget.AutoCompleteTextView.<init>
(AutoCompleteTextView.java:165)
at android.widget.AutoCompleteTextView.<init>
(AutoCompleteTextView.java:131)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance
(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at android.view.LayoutInflater.createView(LayoutInflater.java:499)
at android.view.BridgeInflater.onCreateView(BridgeInflater.java:77)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:
562)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:
122)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:296)
at com.android.layoutlib.bridge.Bridge.computeLayout(Bridge.java:371)
at
com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.computeLayout
(Unknown Source)
at
com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.recomputeLayout
(Unknown Source)
at
com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.activated
(Unknown Source)
at com.android.ide.eclipse.editors.layout.LayoutEditor.pageChange
(Unknown Source)
at org.eclipse.ui.part.MultiPageEditorPart.setActivePage
(MultiPageEditorPart.java:973)
at org.eclipse.ui.forms.editor.FormEditor.setActivePage
(FormEditor.java:627)
at com.android.ide.eclipse.editors.AndroidEditor.selectDefaultPage
(Unknown Source)
at com.android.ide.eclipse.editors.AndroidEditor.addPages(Unknown
Source)
at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:
146)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl
(MultiPageEditorPart.java:310)
at org.eclipse.ui.internal.EditorReference.createPartHelper
(EditorReference.java:661)
at org.eclipse.ui.internal.EditorReference.createPart
(EditorReference.java:428)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart
(WorkbenchPartReference.java:594)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:306)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible
(PresentablePart.java:180)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select
(PresentablePartFolder.java:270)
at
org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select
(LeftToRightTabOrder.java:65)
at
org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart
(TabbedStackPresentation.ja



Help: 1.5 AutoCompleteTextView Problem

by efan » Sun, 07 Jun 2009 09:57:37 GMT


 span style="font-family:Verdana; color:#000000; font-size:10pt;">
The original post disappeared! (could not find in the forum!) Why?

BTW, I solved part of the problem. Now it runs ok in 1.5 Emulator. Details please refer to the source changes.
The NullPointException problem in eclipse visual layout still there!




-------- Original Message --------

Subject: Help: 1.5 AutoCompleteTextView Problem

From: efan <e...@efansoftware.com>

Date: Thu, June 04, 2009 10:01 pm

To: Android Developers <android-developers@googlegroups.com>



This layout xml file contains an AutoCompleteTextView:

http://code.google.com/p/zz-doctor/source/browse/trunk/ZZ/res/layout/welcome.xml

does not show in 1.5 AVD. No error in either screen or console log.



It worked fine in 1.1, in both AVD and eclipse visual layout.



When try to open it in eclipse visual layout under android 1.5, shows

NullPointException, and following stack trace in console log:

java.lang.NullPointerException

at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:

458)

at android.widget.AutoCompleteTextView.<init>

(AutoCompleteTextView.java:165)

at android.widget.AutoCompleteTextView.<init>

(AutoCompleteTextView.java:131)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native

Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance

(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance

(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:494)

at android.view.LayoutInflater.createView(LayoutInflater.java:499)

at android.view.BridgeInflater.onCreateView(BridgeInflater.java:77)

at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:

562)

at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:

122)

at android.view.LayoutInflater.rInflate(LayoutInflater.java:617)

at android.view.LayoutInflater.inflate(LayoutInflater.java:407)

at android.view.LayoutInflater.inflate(LayoutInflater.java:296)

at com.android.layoutlib.bridge.Bridge.computeLayout(Bridge.java:371)

at

com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.computeLayout

(Unknown Source)

at

com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.recomputeLayout

(Unknown Source)

at

com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.activated

(Unknown Source)

at com.android.ide.eclipse.editors.layout.LayoutEditor.pageChange

(Unknown Source)

at org.eclipse.ui.part.MultiPageEditorPart.setActivePage

(MultiPageEditorPart.java:973)

at org.eclipse.ui.forms.editor.FormEditor.setActivePage

(FormEditor.java:627)

at com.android.ide.eclipse.editors.AndroidEditor.selectDefaultPage

(Unknown Source)

at com.android.ide.eclipse.editors.AndroidEditor.addPages(Unknown

Source)

at org.eclipse.ui.forms.editor.FormEditor.crea


Sponsored Links


Other Threads

1. taking a screenshot...of whatever is drawn on the view

I don't know about the DrawingCache. However if all you want is to
draw your view to a bitmap, that's pretty easy: create a new bitmap,
wrap it in a new Canvas(theBitmap) and call your view.onDraw with this
canvas.

R/




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

2. listen for when my app is installed

On Wed, Oct 28, 2009 at 4:45 PM, Jeffrey Blattman <



Could you not just check for their existence on the SD card before copying
them over?

Otherwise, when the user changes their SD card, your app will no longer have
these files available. Your app will be dependent on the SD card that was
plugged in when it was installed... There may also be compatibility issues
with backup/restore programs.

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

3. Android RSS Reader, Please Help

4. Make Fade-in and Fade-Out Effec

5. How to "hide" activity on BACK key without onDestroy?

6. How to "hide" activity on BACK key without onDestroy?

7. NFC support on adroid platform and available devices