[android-developers] Re: About highlightbar in the List
Thanks for the tip on the Menu philosophy! That's very good to know - I should have asked earlier. Many more thanks for the info on the up coming multiple choice ListView - that IS exactly what I was hoping for - Wonderful ! Romain Guy wrote: No, there won't be such an option. Having a persistent selection on a device with a touch screen and a keyboard (if Android runs on a such a device some day) creates many more important issues. The next release of the SDK provides a new feature in ListView that lets you enable the single choice or the multiple choice mode. These modes automatically turn the ListView into a list of "check boxes" (although they don't look like checkboxes.) This achieves exactly what you want. Also, Android's philosophy is that the menu should not be used for context-sensitive actions. The context menu (== long press) is meant for that. The menu should contain only global actions. On Fri, Jun 20, 2008 at 10:55 AM, Bruno Sauer <[EMAIL PROTECTED]> wrote: Would it be possible to "turn on" highlighting as an option? This would be very useful for cases where the user selects/touches an item on the screen and then uses the menu button to select an action on the item selected - I agree with Biosopher's POV - if the highlight goes away then menu usability is like shooting blindfolded. Romain Guy wrote: It's a usability reason. A highlight will show when the user presses the item, but it will go away when the touch action ends. On Fri, Jun 20, 2008 at 10:08 AM, Biosopher <[EMAIL PROTECTED]> wrote: I'm still confused as to why touching the screen does not show a highlight. Is there a usability reason for this or is it a technical limitation? >From my POV, a highlight on touch would seem the most natural approach. - Biosopher --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-no... For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: About highlightbar in the List
No, there won't be such an option. Having a persistent selection on a device with a touch screen and a keyboard (if Android runs on a such a device some day) creates many more important issues. The next release of the SDK provides a new feature in ListView that lets you enable the single choice or the multiple choice mode. These modes automatically turn the ListView into a list of "check boxes" (although they don't look like checkboxes.) This achieves exactly what you want. Also, Android's philosophy is that the menu should not be used for context-sensitive actions. The context menu (== long press) is meant for that. The menu should contain only global actions. On Fri, Jun 20, 2008 at 10:55 AM, Bruno Sauer <[EMAIL PROTECTED]> wrote: > Would it be possible to "turn on" highlighting as an option? This would be > very useful for cases where the user selects/touches an item on the screen > and then uses the menu button to select an action on the item selected - I > agree with Biosopher's POV - if the highlight goes away then menu usability > is like shooting blindfolded. > > Romain Guy wrote: > > It's a usability reason. A highlight will show when the user presses > the item, but it will go away when the touch action ends. > > On Fri, Jun 20, 2008 at 10:08 AM, Biosopher <[EMAIL PROTECTED]> wrote: > > > I'm still confused as to why touching the screen does not show a > highlight. Is there a usability reason for this or is it a technical > limitation? > > From my POV, a highlight on touch would seem the most natural > approach. > > - Biosopher > > > > > > > -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: About highlightbar in the List
Would it be possible to "turn on" highlighting as an option? This would be very useful for cases where the user selects/touches an item on the screen and then uses the menu button to select an action on the item selected - I agree with Biosopher's POV - if the highlight goes away then menu usability is like shooting blindfolded. Romain Guy wrote: It's a usability reason. A highlight will show when the user presses the item, but it will go away when the touch action ends. On Fri, Jun 20, 2008 at 10:08 AM, Biosopher <[EMAIL PROTECTED]> wrote: I'm still confused as to why touching the screen does not show a highlight. Is there a usability reason for this or is it a technical limitation? >From my POV, a highlight on touch would seem the most natural approach. - Biosopher --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-no... For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: About highlightbar in the List
It's a usability reason. A highlight will show when the user presses the item, but it will go away when the touch action ends. On Fri, Jun 20, 2008 at 10:08 AM, Biosopher <[EMAIL PROTECTED]> wrote: > > I'm still confused as to why touching the screen does not show a > highlight. Is there a usability reason for this or is it a technical > limitation? > > From my POV, a highlight on touch would seem the most natural > approach. > > - Biosopher > > > -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: About highlightbar in the List
I'm still confused as to why touching the screen does not show a highlight. Is there a usability reason for this or is it a technical limitation? >From my POV, a highlight on touch would seem the most natural approach. - Biosopher --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: About highlightbar in the List
There is nothing to do to show the selection. Note however that the selection appears only when you use the physical keys (that is your keyboard in the emulator). Touching (clicking with your mouse) the screen won't show the selection. On Thu, Jun 19, 2008 at 3:27 AM, juma <[EMAIL PROTECTED]> wrote: > > Hi, > > > I displayed some list of items in the emulator. > > Item-1 > Item-2 > Item-3 > > I want to display some page,When i click the items. > I done in the m3 version.successfully. > But i cant do in the m5 version.Because there is no highlight > bar displayed in the items. > What is the code we have to follow to display the highlight bar > in the items. > > Here my code is > > > package com.IW.Architectureee; > > import java.util.ArrayList; > import java.util.HashMap; > import java.util.List; > import java.util.Map; > > import android.app.ListActivity; > import android.content.Intent; > import android.os.Bundle; > import android.os.Handler; > import android.util.Log; > import android.view.Menu; > import android.view.View; > > import android.widget.ListView; > import android.widget.SimpleAdapter; > public class MenuArchitecture extends ListActivity { > >private Handler handler = new Handler(); >private int contentViewId,page; >public static final int EXTERIOR = Menu.FIRST; >public static final int MENU=Menu.SECONDARY; >public int imageno; >public int selectionRowID; > > > > /** Called when the activity is first created. */ > @Override > public void onCreate(Bundle icicle) { > super.onCreate(icicle); > setContentView(R.layout.menu); > > String[] labels = new String[] { > "EXTERIOR1", "EXTERIOR2", "LIVING ROOM", "DINING ROOM1", > "DINING ROOM2","BED ROOM1","BED ROOM2","HOUSE PLAN","ADDRESS","SLIDE > SHOW" }; > >setListAdapter(new SimpleAdapter(this, > getData(labels),R.layout.menu_item, new String[]{"title"}, new int[] > {R.id.title})); > > } > > > > private List> getData(String[] labels) > { > List> list = new > ArrayList>(); > > for (String label : labels) > { > list.add(getMap(label)); > } > return list; > } > > private Map getMap(String label) > { > Map map = new HashMap(); > map.put("title", label); > return map; > } > > protected void onListItemClick(ListView l, View v, int > position, > long id) { > //Log.i("","Selected"); > super.onListItemClick(l, v, position, id); > > // Get the item that was clicked > Object o = this.getListAdapter().getItem(position); > String keyword = o.toString(); > > > Intent myStarterIntent = null; > try { > >selectionRowID = (int)getSelectedItemPosition(); > //selectionRowID = (int)gets > > > //To display exterior page > if (selectionRowID==0) > > > { > > myStarterIntent = new Intent(this, > MenuArchitecture2.class ); > > //Send the Intent to the OS. > this.startActivity(myStarterIntent); > > > } >//To display exterior1 page > if (selectionRowID==1) > > > { > > myStarterIntent = new Intent(this, > exterior1Page.class ); > > //Send the Intent to the OS. > this.startActivity(myStarterIntent); > > > } >//To display exterior1 page > if (selectionRowID==2) > > > { > > myStarterIntent = new Intent(this, > LivingPage.class ); > > //Send the Intent to the OS. > this.startActivity(myStarterIntent); > > > } > >//To display dining1 page > if (selectionRowID==3) > > > { > > myStarterIntent = new Intent(this, > dining1Page.class ); > > //Send the Intent to the OS. > this.startActivity(myStarterIntent); > > > } >//To display dining2 page > if (selectionRowID==4) > > > { > > myStarterIntent = new Intent(this, > dining2Page.class ); > > //Send the Intent to the OS. > this.startActivity(myStarterIntent); > > > } >//To dis