AutoCompleteTextView in 1.5 SDK

by Daniel » Wed, 29 Apr 2009 01:07:59 GMT


Sponsored Links
 My app consists of a dialog-style activity with only one
AutoCompleteTextView.
In 1.1 the drop-down list of the AutoCompleteTextView was drawn down
till the bottom of the screen. But now in 1.5, it is only drawn down
to the bottom of the dialog box. So the drop-down list is only a few
pixels
high.
Is this the intended behaviour now?
Why does it work in the Google Search widget?

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



AutoCompleteTextView in 1.5 SDK

by Jeff Sharkey » Wed, 29 Apr 2009 01:13:04 GMT


 It might be watching window boundaries now to make it doesn't overlap
any IME/IMF panel windows.

j






-- 
Jeff Sharkey
jshar...@google.com

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


Sponsored Links


Other Threads

1. java.lang.NullPointerException with getting ID of element

Hi,
Iam new to android and I really need help with accessing the xml
layout "objects" from .java. I have this code:

package cz.aurem.ot;

import android.app.Activity;
import android.os.Bundle;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.GestureDetector.OnGestureListener;
import android.widget.TextView;
import android.widget.ToggleButton;
import cz.aurem.ot.R;

public class ovladacOT extends Activity implements OnGestureListener {
    /** Called when the activity is first created. */
    private TextView viewA;
    public ToggleButton vypinac;

    private GestureDetector gestureScanner;

    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);

        gestureScanner = new GestureDetector(this);
        this.vypinac = (ToggleButton)this.findViewById
(R.id.toggle_button);
        viewA = (TextView)this.findViewById(R.id.label);



        try {
                vypinac.setTextOn("LOL");
        } catch (Exception ex) {
           System.out.print("Exception" + ex.toString());
        }

        setContentView(R.layout.main);
    }

    @Override
    public boolean onTouchEvent(MotionEvent me)
    {
     return gestureScanner.onTouchEvent(me);
    }

    @Override
    public boolean onDown(MotionEvent e)
    {
     viewA.setText("-" + "DOWN" + "-");
     return true;
    }

    @Override
    public boolean onFling(MotionEvent e1, MotionEvent e2, float
velocityX, float velocityY)
    {
     viewA.setText("-" + "FLING" + "-");
     return true;
    }

    @Override
    public void onLongPress(MotionEvent e)
    {
     viewA.setText("-" + "LONG PRESS" + "-");
    }

    @Override
    public boolean onScroll(MotionEvent e1, MotionEvent e2, float
distanceX, float distanceY)
    {
     viewA.setText("-" + "SCROLL" + "-");
     return true;
    }

    @Override
    public void onShowPress(MotionEvent e)
    {
     viewA.setText("-" + "SHOW PRESS" + "-");
    }

    @Override
    public boolean onSingleTapUp(MotionEvent e)
    {
     viewA.setText("-" + "SINGLE TAP UP" + "-" + e.getX());
     return true;
    }
}


AND the main.xml:


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">


<ToggleButton android:id="@+id/toggle_button"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:layout_centerVertical="true"
        android:layout_centerHorizontal="true"
        android:textOn="Zastavit"
        android:textOff="Vped"/>
    <TextView
        android:id="@+id/label"
        android:layout_width="200sp"
        android:layout_height="200sp"
        android:background="#9CEB00"/>

</RelativeLayout>


Everytime I make action (touch the display or so (call the viewA.* or
vypinac.set*)) it crashes due to java.lang.NullPointerException. So it
looks like the
this.vypinac = (ToggleButton)this.findViewById(R.id.toggle_button);
is not works. I dont know what I do bad, please let me know the way or
so.
Thanks in advance :-)

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

2. Changed activity from a BroadcastReceiver.

Hello,

I devellope an application with many activities. I need to manage a
connection with a server. My problem is when the connection is lost
(exemple : server is down), I want to go back to my first activity.
I create a BroadcastReceiver witch is call when  connection is lost,
but it can't start the first activity.

I think it's a very simple issue, so please say me how to do it :).

Thomas

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

3. App Idea for your consideration

4. Eclipse connecting to real atrget

5. reference modifiers

6. Newbie question about developing Android App

7. Can I receive payments with bank account outside of America?