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
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
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
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
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
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
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
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
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
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
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
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,
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;
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
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
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:
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
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
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
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
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...
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
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
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
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
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
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
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
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;
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 ): {
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?
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
32 matches
Mail list logo