how to set focus on the list

by cindy » Mon, 12 Jul 2010 06:11:24 GMT


Sponsored Links
 Hi

My application displays a list view. When it is first displayed, I
want to set the focus to the first listitem. How could I do it?

Thanks!

Cindy

--



how to set focus on the list

by cindy » Thu, 09 Sep 2010 13:56:58 GMT


 I display a list on screen, how could I set focus on one list item?

It seems in touch mode, it is impossible to set focus. Am I correct?

--


Sponsored Links


how to set focus on the list

by Romain Guy » Thu, 09 Sep 2010 14:07:23 GMT


 Yes, you are correct. Pleas read this article to understand why:
 http://android-developers.blogspot.com/2008/12/touch-mode.html 



>



Other Threads

1. Bluetooth scanning: Issue with HTC Desire -> not scanning

Hi: I'm developing an application which does scans for nearby
bluetooth devices which are in discoverable mode. On the Google Nexus
One device, the device scanning is working perfectly. But on the HTC
Desire, "ACTION_DISCOVERY_FINISHED" is called once and does not call
the action "BluetoothDevice.ACTION_FOUND". Any other attempts to start
another scan by calling "startDiscovery()" on BluetoothAdapter class
are ignored. Under some circumstances it works on the HTC Desire for a
few (around 10) bluetooth scanning attempts.

Has HTC introduced a bug on their custom firmware?



The simplest class demonstrating the issue is as follows:

===================================================
public class BluetoothTest extends Activity {

    private BluetoothAdapter mBtAdapter;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        mBtAdapter = BluetoothAdapter.getDefaultAdapter();

        IntentFilter filter = new
IntentFilter(BluetoothDevice.ACTION_FOUND);
        this.registerReceiver(mReceiver, filter);
        IntentFilter filter2 = new
IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);
        this.registerReceiver(mReceiver, filter2);

        mBtAdapter.startDiscovery();
    }

    private final BroadcastReceiver mReceiver = new
BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            String action = intent.getAction();

            // When discovery finds a device
            if (BluetoothDevice.ACTION_FOUND.equals(action)) {
                Log.d("DEBUG", "BT Device found");
            }

            else if
(BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)) {
                Log.d("DEBUG","Entered ACTION_DISCOVERY_FINISHED ");
                mBtAdapter.startDiscovery();
            }

        }
    };
}
======================================

-- 

2. OLED screen from Sony

http://123maza.com/25/hand128/

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. undx.jar

4. button longlick + change of backgroundimage?

5. Java Guru Query: override a method taking a reflected class argument

6. BroadcastReceiver

7. How much money do you make?