[android-developers] Re: Clickable ListView element?

2009-08-02 Thread jan
On Jul 9, 4:28 pm, eags eagsala...@gmail.com wrote: I did what you said and it worked.  This is actually exactly what the Alarm Clock application does since when you click on an alarm it doesn't select the entireListViewelementbut just the clock and message.  However I still have a couple

[android-developers] Re: Clickable ListView element?

2009-08-02 Thread jan
More people are having problems with this. Please take a look at this enhancement request: http://code.google.com/p/android/issues/detail?id=3414 On Jul 9, 4:28 pm, eags eagsala...@gmail.com wrote: I did what you said and it worked.  This is actually exactly what the Alarm Clock application

[android-developers] Re: Clickable ListView element?

2009-07-25 Thread eags
The only problem is there is a strange bug with the CheckBox that I can't figure out. Even though bindView works correctly to get the information from each alarm and fill out the different pieces of my inflated list item view, it doesn't work for the checkbox. The behavior is really really

[android-developers] Re: Clickable ListView element?

2009-07-25 Thread eags
I figured this out also. Chalk it up to me being a total rookie with gui programming. The issue is that the list items get reused and I was calling setChecked from within my bindView code *before* setting the OnCheckedChangeListener. During startup it doesn't really matter because the list

[android-developers] Re: Clickable ListView element?

2009-07-24 Thread Andrew
Apologies, my example was too simple and once I expanded upon it I hit across the same problem. See you have solved it now, please can you share this so we can all learn from it. Thanks, On Jul 23, 8:58 pm, eags eagsala...@gmail.com wrote: This didn't work for me unfortunately.  Were you

[android-developers] Re: Clickable ListView element?

2009-07-24 Thread Gregg Reno
Excellent! Thanks for posting this eags. From all of the postings I've seen from people looking to do something similar, this should be a big help. Just started working through this to adapt it to my project, but I'm getting a bunch of syntax errors. I should probably start a project from

[android-developers] Re: Clickable ListView element?

2009-07-23 Thread Andrew
Hi, I've been following this thread trying to get listviews working and think I may have cracked it. I'm new to Android development so dont bite my head off if its wrong but I got this working ok; The key to it is the android:duplicateParentState=true I'm not sure which Layout you'll need to

[android-developers] Re: Clickable ListView element?

2009-07-23 Thread eags
This didn't work for me unfortunately. Were you having the same problem where your list items were not clickable but could be selected using the trackball? And setting duplicateParentState fixed it? I feel pretty fuzzy in general about the relationship between nested views. It seems like

[android-developers] Re: Clickable ListView element?

2009-07-23 Thread eags
Ok, I now have a working solution!! So first of all, unfortunately I changed a few things at once so I can't really say what I changed that made things work. First of all, I set the first nested LinearLayout property android:clickable=true. That seems obvious and I think I did that before but

[android-developers] Re: Clickable ListView element?

2009-07-23 Thread eags
Next is the layout for the main app: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent TextView

[android-developers] Re: Clickable ListView element?

2009-07-23 Thread eags
Now the layout for the list item: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=wrap_content LinearLayout android:id=@+id/alarmSelectionBox

[android-developers] Re: Clickable ListView element?

2009-07-23 Thread Gregg Reno
Thanks for trying Andrew, but that didn't work for me either. I notice your example HTML doesn't have a checkbox in it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group,

[android-developers] Re: Clickable ListView element?

2009-07-23 Thread eags
Ok, Just for the practice, I'm implementing something very similar to the Alarm Clock app included in Android by default. I'm going to put each file in their own post. First in this post, Alarmsutta.java which includes the main setup, and the CursorAdapter: package net.esalazar.alarmsutta;

[android-developers] Re: Clickable ListView element?

2009-07-23 Thread Gregg Reno
It would be great if you could post the code and xml! I'm using a SimpleCursorAdapter and would love to see how you are using the CursorAdaptor instead. My app is a little tricky because I extend TabActivity rather than ListActivity. If I get it working, maybe I'll put together a standalone

[android-developers] Re: Clickable ListView element?

2009-07-23 Thread eags
that might be all you are interested in but here is the AlarmDBAdapter, followed by the Alarm class, followed by the PreferencesActivity layout for creating a new alarm, followed by the associated class NewAlarm: package net.esalazar.alarmsutta; import java.util.Date; import

[android-developers] Re: Clickable ListView element?

2009-07-10 Thread eags
Bump. Mystery remains. Why can the entire ListView item not be made clickable??? On Jul 9, 7:57 pm, eags eagsala...@gmail.com wrote: And I tried making sure the first sub LinearLayout was not fill_parent for width or height.  No dice. On Jul 9, 7:52 pm, eags eagsala...@gmail.com wrote:

[android-developers] Re: Clickable ListView element?

2009-07-09 Thread Moto
I don't see your ListView under the xml file... where is that? --~--~-~--~~~---~--~~ 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

[android-developers] Re: Clickable ListView element?

2009-07-09 Thread Moto
I don't see your ListView under the xml file... where is that? --~--~-~--~~~---~--~~ 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

[android-developers] Re: Clickable ListView element?

2009-07-09 Thread eags
I didn't include that code because I assumed the issue was with the list item. I am just using the ListView like in other examples that work for me so I didn't think the problem could be there. Here is the layout anyway: ?xml version=1.0 encoding=utf-8? LinearLayout

[android-developers] Re: Clickable ListView element?

2009-07-09 Thread extrapedestrian
do you have set OnKeyListener? like: alarmsListView.setOnKeyListener(this); On Jul 9, 5:28 pm, Moto medicalsou...@gmail.com wrote: I don't see your ListView under the xml file... where is that? --~--~-~--~~~---~--~~ You received this message because you are

[android-developers] Re: Clickable ListView element?

2009-07-09 Thread extrapedestrian
sory not onKey but onClickListener... On Jul 9, 5:45 pm, extrapedestrian extra.pedestr...@gmail.com wrote: do you have set OnKeyListener? like: alarmsListView.setOnKeyListener(this); On Jul 9, 5:28 pm, Moto medicalsou...@gmail.com wrote: I don't see your ListView under the xml file...

[android-developers] Re: Clickable ListView element?

2009-07-09 Thread nEx.Software
You'll need an ItemClickListener set for your ListView - Though I am sure that you already know that... Something like: alarmsListView.setOnItemClickListener(ItemClickListener); On Jul 9, 8:46 am, extrapedestrian extra.pedestr...@gmail.com wrote: sory not onKey but onClickListener... On Jul

[android-developers] Re: Clickable ListView element?

2009-07-09 Thread eags
Since I'm getting a few questions about the list view itself and what I'm doing with it, here is that code. This code worked perfectly with a simple_list_view_item_1 (or whatever it is called) and a regular ArrayAdapter. All I did was switch out the layout resource I specify for the adapter and

[android-developers] Re: Clickable ListView element?

2009-07-09 Thread Radzell
It looks like what you need is not to put android clickable in the view group but in the individual view that you want to make clickable ie ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=horizontal

[android-developers] Re: Clickable ListView element?

2009-07-09 Thread eags
I did what you said and it worked. This is actually exactly what the Alarm Clock application does since when you click on an alarm it doesn't select the entire ListView element but just the clock and message. However I still have a couple problems with this: 1. Why??? I find this behavior to

[android-developers] Re: Clickable ListView element?

2009-07-09 Thread eags
Anyone?? Total mystery. I played around with .bringToFront() and friends with no avail. I'm thinking the issue is simply that the list item is simply completely covered by its children but that doesn't really explain why TextView does work even when it is set to fill_parent. On Jul 9, 5:11 

[android-developers] Re: Clickable ListView element?

2009-07-09 Thread eags
And I tried making sure the first sub LinearLayout was not fill_parent for width or height. No dice. On Jul 9, 7:52 pm, eags eagsala...@gmail.com wrote: Anyone??  Total mystery.  I played around with .bringToFront() and friends with no avail.  I'm thinking the issue is simply that the list

[android-developers] Re: Clickable ListView element?

2009-07-08 Thread eags
Ok, here is the layout: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=horizontal android:gravity=center_vertical android:layout_width=fill_parent android:layout_height=fill_parent

[android-developers] Re: Clickable ListView element?

2009-07-08 Thread eags
And here is the adapter: package net.esalazar.alarmsutta; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.List; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup;

[android-developers] Re: Clickable ListView element?

2009-07-08 Thread eags
And here are code snips of how I use. To set up: aa = new AlarmListAdapter(this, R.layout.alarmlist_item, alarms); alarmsListView.setAdapter(aa); To update: switch( requestCode ) { case( NEW_ALARM ): {

[android-developers] Re: Clickable ListView element?

2009-07-08 Thread eags
Bump. Hi someone please? I think this is probably something pretty simple that I'm just missing. Thanks. On Jul 8, 1:20 pm, eags eagsala...@gmail.com wrote: I created a custom layout and adapter for a list view but now I cannot make it clickable?  Is there anything to look out for here?  

[android-developers] Re: Clickable ListView element?

2009-07-08 Thread eags
Hi, bump again. On Jul 8, 7:52 pm, eags eagsala...@gmail.com wrote: Bump. Hi someone please?  I think this is probably something pretty simple that I'm just missing. Thanks. On Jul 8, 1:20 pm, eags eagsala...@gmail.com wrote: I created a custom layout and adapter for a list view but