how to set focus on the list

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

Sponsored Links

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?




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: 


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. */
    public void onCreate(Bundle savedInstanceState) {

        mBtAdapter = BluetoothAdapter.getDefaultAdapter();

        IntentFilter filter = new
        this.registerReceiver(mReceiver, filter);
        IntentFilter filter2 = new
        this.registerReceiver(mReceiver, filter2);


    private final BroadcastReceiver mReceiver = new
BroadcastReceiver() {
        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 ");



2. OLED screen from Sony


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?