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. App Test Group

Hello.  I have posted in several forums and received good response to
form an independent application testing group.  Volunteers send email
address to me at griff.b...@gmail.com and are placed on the list.

In the future, participants would test apps prior to commercial
release in order to provide the developer feedback - technical and
market-wise.

Any interest, comments, suggestions are appreciated.

If you would like to participate, email me.

Griff
griff.b...@gmail.com
--~--~---------~--~----~------------~-------~--~----~

2. Problems about receiving "OnItemClick" event in SlidingDrawer + GridView

Hi,
In my layout, there's a GridView inside SlidingDrawer. XML is as
follows:
Also, I have set GridView by a customized AdapterView.
The problem is, after setting "onItemClick" event for the GridView,
I cannot see any log in the Logcat when I click any item.
Could anyone help me on this issue?
Thanks!

=== XML ===

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/
android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        >
        <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
                android:orientation="vertical"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                >
          ....................
        </LinearLayout>
        <SlidingDrawer  xmlns:android="http://schemas.android.com/apk/res/
android"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:handle="@+id/handle"
            android:content="@+id/content"
        >
       <Button
            android:id="@+id/handle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
        />
        <GridView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/content"
        >
        </GridView>
    </SlidingDrawer>
</FrameLayout>

=== Java ===

myGridView.setOnItemClickListener(new GridView.OnItemClickListener() {
    @Override
    public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
        // TODO Auto-generated method stub
        Log.v("myGridView", "enter OnItemClick");
    }
});

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

3. Mrarket?

4. Accessing inbox and few others

5. link to another application

6. I'm not able to load AVD from eclipse nor im from CMD

7. list of root certificates .