Hi Mark,
thanx for the response. Using the wireframe diagram and the visualized
views, i found out that the listviews were added, but are laying on top of
eachother. I'm not sure why this is happening though or how to correct this.
But i'll continue my quest :-)
Thanks so much for all the help!
Hi Mark,
i've set the minHeight for the view attached to the listview and it seems to
be fine now so much trouble for something so small..
What i'm currently experiencing though is that the getView method in my
custom adapter is only executed for the items drawn on the screen and other
views
Patrick Plaatje wrote:
What i'm currently experiencing though is that the getView method in my
custom adapter is only executed for the items drawn on the screen
Correct. This is a good thing (imagine 1,000 rows).
and
other views are loaded when they are within the view port.
Likewise
Hi Mark,
thanks a lot. I am indeed using the Holder pattern, and it looks like the
Holder object is set to null when the initial listview is loaded.
btw. the excerpt helped a lot!
Regs,
Patrick
2009/12/14 Mark Murphy mmur...@commonsware.com
Patrick Plaatje wrote:
What i'm currently
Hello All,
On create I have the following code
ListView lv=(ListView)findViewById(R.id.lvItems);
registerForContextMenu(lv);
adapter= new ShoppingListAdapter(this, R.layout.shippinglistitem, items);
lv.setAdapter(adapter);
I Override the onCreateContexxtMenu (outside of onCreate ofcourse)
I have a ListView with an adapter attached. In the individual list
items are placed views with widgets that continually update themselves
within the list. Everything works well except for this case:
Touch the list and start scrolling it just before the longTouch event
would be thrown. Then lift
ListView does not block draw events on its children.
On Fri, Dec 11, 2009 at 11:44 AM, WoodManEXP woodman...@gmail.com wrote:
I have a ListView with an adapter attached. In the individual list
items are placed views with widgets that continually update themselves
within the list. Everything
Yes I can see that in most cases the draw events are passed through even
when the list is scrolling (that is pretty neat). Can you imagine any reason
why this behavior described below might be seen? Let me also mention that
the app never stops invalidating the views. Any ideas on what could keep
Hi,
In one of my layout files, I specify the height of a listview's
divider is 1dip:
ListView
android:dividerHeight=1dip /
I'm building against SDK 3. When I run my app on a Droid, everything
scales ok for me in the compatibility mode, but every other listview
divider is
That's a limitation with scaling activities in compatibility mode.
Small (1 pixel) lines might end up being 2 pixels instead.
On Sun, Dec 6, 2009 at 5:00 PM, API Tests testapiacco...@gmail.com wrote:
Hi,
In one of my layout files, I specify the height of a listview's
divider is 1dip:
I have a layout that needs to scroll off the screen because it
contains a lot of fields. The top 1/2 of the screen will contain
fixed-width and fixed-height TextViews. However, the bottom 1/2 will
contain two dynamically-sized widgets; a TextView and a ListView. The
bottom TextView may be 1 line
If you want a ListView to expand completely and you want it to not
have scrollbars, then you dont' want a ListView. ListView and
ScrollView cannot be used embedded within one another since they
compete for scrolling.
On Fri, Dec 4, 2009 at 9:41 AM, Dustin dustin.bre...@gmail.com wrote:
I have a
Hi,
I have a simple ListView in my layout.xml file.
ListView android:id=@+id/action_list
android:layout_width=fill_parent
android:layout_height=wrap_content
/
And in my javacode, I add a setOnItemClickListener() to my listview:
Hey All,
Has anyone see this issue before. I have a horizontal scroll view with
children as one row inside a listView. Now this row is placed into a
Hashtable and pulled in and out instead of being reconstructed however
in some instances when I try to scroll the horizontal scroll it
doesn't move
I'm having a little difficulties while trying to get a certain layout
to work: I want to have list. List does not have to be scrollable, but
should be shown completely. But the page itself should be able to
scroll (with the lists in it), if the total content ist higher than
the screen.
Has anyone experienced a listener being called twice? I am seeing
this consistently and cannot quite figure out why?
Peace,
Scott
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
Hello,
I have a error 11-14 01:23:23.204: ERROR/AndroidRuntime(730):
java.lang.IllegalStateException: The content of the adapter has
changed but ListView did not receive a notification. Make sure the
content of your adapter is not modified from a background thread, but
only from the UI thread.
.
I'm pretty sure that if the size of the adapter changes while the layout is
being calculated you will get this exception.
All additions, deletions, and data updates should be done in the UI thread I
think.
Using an AsyncTask is one way to do this. Make sure that each piece of
data your
Hey guys girls,
Can someone tell me what the default scroll behavior of a ListView is?
I am seeing what I believe to be an odd UX. If I use the scroll ball
on the dream and scroll from a button at the top of a screen into a
listView the listView instead of then selecting one of its list items
Hey guys,
Looking for some help. I need to find a way in which to incorporate an
EditText into a ListView. I have seen some posts which say it
shouldn't really be used in a ListView and I am starting to see why.
When the EditText gains focus it pops up a Softkeyboard causing an on
obscure type
I have an application which has some activities that display a single
list and extends ListActivity. The application also has other
activities that have several things on the screen in addition to a
list, so these activity classes use extends Activity and then include
a ListView in the layout
Hi,
I'd like to build a ListView with streaming content. New items are
added to the top and old ones are forgotten
If I understand correctly, the ListView was not built for this, right?
The ListAdapter was meant to provide a fixed set of data.
I tried to setAdapter() when new data comes in, but
I'm trying to embed a ListView inside a Gallery. Has anyone tried this (or
hopefully had with success with this)?
I want to have the vertical scroll of the ListView and the horizontal scroll
of the Gallery. So that inside the Gallery, I can have multiple ListViews.
(only 1 will be in view)
Does
How do I get a box appear in a different color listview practically
the first field is the title thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
Hai,
i am new in android. My application is create the multiline
listview.i.e the listview contains more than two lines.now i have a
doubt about the listview.can we create the multiline in the
listview.And also the spinner appear above the listview. suppose i
click the listview all
Hello,
I have a unusual problem. I had a ListView that I fill with my own
Adapter.
This Adapter had a few elements with a TableLayout. In this
Tablelayout I added one Row with text on the left and a button on the
right.
But the Button is optional...
So I get a list with 6 Elements without a
Hello all,
I have an activity which uses a ListView component. It's not a
ListActivity, just a ListView and few other widgets within a
LinearLayout. I need the activity to save/restore its state correctly
on orientation change. Things mostly work fine, the only problem I
encounter is that
Dears,
When I try to show a list with items and labels,I create item and
labels with different layout by inflater.
The problem is when i scroll the list ,part of the items use the wrong
layout.
Why the layout changes when i scroll the list.
Any hint?
Best regards!
How do I change the original orange highlight color to something else?
That is, the color I get when I click in a ListView.
I've tried to set the android:textColorHighlight of the ListView
and/or the TextView for the rows, nothing work.
I've manage to remove it by setting
In my app I have a ListView backed by ArrayAdapter. In it I'm
detecting events in OnScrollListener#onScroll method to find end of
the list. I noticed that on the phone (MyTouch) both track-ball and
gesture/touch scrolling will trigger the event twice. On the emulator
I get the same behavior with
Anyone getting a java illegalStateException when running your 1.5
built app on 1.6? Everything has worked fine with my code for months.
Get message the content of the adapter has chagned but Listview did
not receive a notification. Make sure the content of your adapter is
not modified from a
Hey,
What is the easiest way to add headers to a listview (and my list has
multiple adapters (sections) so I need to show multiple headers for my
list!
Thank you,
Wouter
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
I want to display a ListView with checkboxes, and I want some of the
checkboxes pre-selected. The ListView has setAdapter called during
onCreate, and the list information appears when the screen is drawn.
However, when I attempt to set certain list items as checked, my
ListView reports
I m Having ListView With Checkboxes ...but if i Click the Checkbox ther is
no response
can u tel me what to add to my code.
Thanks in advance,
Raghav.S
Her is My Code:
final String[] options1 = new String[] {My Wedding To Do
List,Categories,My Wedding Day
Two questions:
1. When does OnItemSelectedListener get called?
My expectation was that when an element of a ListView was clicked/
touched that the OnItemSelectedListener would be called. My
OnItemSelectedListener is not called when a list element is clicked/
touched. (It is called if the list
Hi, I use listview in my application. I get listview values from
server so it is a little slow. So I want to optimize it such a way. I
will load 10 content of listview and load anotjer 10 content when user
pull down listview. Method is similar to google market method. My
question is that how can
I have a ListView, and I want to do something special with the first
item in the listview.
So, I setup an adapter, an item in separate xml a java wrapper for the
item and I have a render() method.
Inside my render method, I realized that I can't do something like
findViewById(R.id.test) because
I have a listview with cursor adapter and i want to be able to search
in the list view. I implemented my own search : i implement
TextWatcher interface and when the text is changed i make a new query
to the db to obtain a new cursor and than refresh the listview content
it works but it is too
Hello everyone!
What is wrong with this code? I cannot intercept ListView
onItemSelected (no effect and no log output. Nothing happens!). Advice
appreciated!
ListView mylist=(ListView)findViewById(android.R.id.list);
mylist.setOnItemSelectedListener(new OnItemSelectedListener()
Hi,
I noticed that when item in in a list is clicked rapidly, there is
chance that item in other row becomes dark. Especially when you click
turn on/off bluetooth in system setting quickly. Has anyone noticed it
and is there fix for this? Thanks
Hello i search a tuto which show how to populate au listview with an
xml file of internet. I found one but it populate with attribut of a
marker:
xml file:
listerecette
recette name= »Le Cari de Boeuf » type= »Repas » Country= »France »
nbrofpers= »4″ level= » content= »Coupez le boeuf en
hi everyone,
i'm new in android, and i wanner put a List inside a TabActivity.
by google and coder's guide, my work out direction is to create a
TabActivity as MAIN and ListActivity
then add it in the TabHost and turn out code something like (below)
and fail:
Hi all,
I am writing a program where I need a ListView for which I am using a
ListActivity. Each one of the views within the ListView has four
buttons, (Off, Dim, Bright and On). Each one of these buttons is
configured with it's own OnClickListener when I build the view. This
part seems to
This maybe against the way the Android team wants this to work, but if
not I can't seem to come up with a way to do this.
Basically I have a list view that I want to create a ContextMenu when
onListItemClick received. So when the user clicks on a list item I
want them to choose the action from
Hello all,
Anybody knows how to get the sign in the listview? Like for
example is done in the gocart app (now shopsavvy), see screenshots
here: http://code.google.com/intl/nl/android/adc/adc_gallery/app.html?id=17
The idea of the sign is to show the user there's more information
available
Hi,
I currently building an adnroid apps that retrive data from a distant
Web service and i search an efficient way to bind data form XML to
ListView.
I already use CursorAdapter and i search on the web for an
XmlAdapter. I read on Google IO topic Coding for Life -- Battery
Life, That Is
Hi,
How do I customize the way that a listview behaves when it is
highlighted (ie when the user presses it, the default is for it to be
highlighted orange). Is this in the getView() method or somewhere
else?
Thanks,
Bob
--~--~-~--~~~---~--~~
You received this
hi all,
can any one show me a simple example how can I create ListView using
code, not xml...
and add item into list and remove item in the list anyway I wan???
wesley.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
I have some problems when creating a ListActivity.
I have a listview and some other widgets and my listview is filled
with a custom adapter.
You can see the images of this activity here:
http://www.grabup.com/uploads/ecd0d0eeb7b947e98b2e0d6c1be5478f.png?direct
Now the problem is. I have a
Hey,
I want to make a listview that has different rows (layouts). I will
load the data from a webservice and it can be 2 or more layouts i have
to generate then. I am creating a social network app and want to show
a stream of the users activity.
So when he made a comment, make a new friend, this
Hi
I want to know if its possible to make a listview (text+icon) on a
class extends Activity and not on a class extends ListActivity.
So I make a little code with class extends.
on the onCreate:
ListView list=(ListView) findViewById(R.id.list1);
ArrayList mStrings = new ArrayList();
I have a ListView displaying a set of data provided by a
CursorAdapter.
Data is added to the top of the list (a query sorting by timestamp
with the newest at the top).
The problem is that, when new data is added to the list and I am
looking at data further down in the list, the view will
Hi all,
I am new to the Android ,interesting to learn android so please help
me to learn android ,if you have any applications please send to my
mail id with source code .
Thanks
Bhas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
Hi all,
I am beginer to the anroid ,i am using the below code for displaying
listview and i am not able to getting the onlistitemclick events for
further ui's. pleas help me.
package com.List;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ListActivity;
Hi there,
first of all, sorry for always complaining about ListView. For
standard tasks it works perfectly, but in my current project, it seems
that I'm just pushing it beyond its limits sometimes, or maybe beyond
the limits of my understanding :)
My list, which contains transparent items, used
I'm using a ListView with a custom ListAdapter and a custom Drawable
as divider.
My list contains active elements and passive ones as well. By default,
the ListView draws a divider only between two active items. This is
exactly what I want it to do, expect that ListView leaves
dividerHeight
Each list item in my ListView is a linkified TextView, and a regular
TextView.
The problem is that once there is a touchable item in the ListView,
the touch works only for that item, that is - only links work, but the
entire list item containing the link cannot be touch selected (only
with the
I'm trying to figure out how to emebed a listview in a tabhost
Whenever I call
l1 = (ListView) findViewById(R.id.list);
l1.setAdapter(new ArrayAdapterString
(this,android.R.layout.simple_list_item_1, SITES));
it dies a rather unglamorouis death.
List is defined as
ListView
Hey Guys,
After going through a bunch of posts here I've got a List Activity
with a pair of custom selectors that do the alternating row background
thing while maintaining the default selector behavior! The trick was
figuring out that in the selector, you had to fire a shape in there
instead of
Hey all,
I have an expandable list with a custom adapter. Everything works
great but there are two problems.
First whenever a group or child has a custom background color set the
orange selector does not show up. If I dont setup a color the selector
draws nicely and also the fade away for
So I've been extremely frustrated by this for a long time now. I've
posted before, but can't seem to find a good solution.
My goal is to have something pretty much exactly like the installed
application details page in the Android Market. I need a list of
items displayed along with other
Hello for all the Android's out there,
I'm trying to make a ListView when every item in that list can be a
different type of View.
for example the list could be:
1. TextView
2. ImageView
3. MyCustomView
I understands that in order to make a list I need to use an Adapter.
the problem is that the
hi all
i have one problem in ListView ; i am created Custom List and in my
list the diveder is not Coming even every where. some time it gives
some extra thickness to diveder. i dont undestand the problem plz help
me
thank you
--~--~-~--~~~---~--~~
You received
Hey everybody!
I create a ListView in my activity and set its ChoiceMode to
CHOICE_MODE_SINGLE,
I also set its layout to simple_list_item_single_choice.
But when i click on it onItemSelected() is never called and
getCheckedItemPosition() returns -1.
Why?
the sample List10.java of ApiDemos uses
Hello.
At the moment I am trying to implement a ListView with the following
row setup:
ImageView - TextView - Checkbox
The TextView and the CheckBox should be be clickable and should handle
different actions. What is the right way to implement such a
behaviour? At the moment I am setting
Which drawable does the default ListView use as a divider?
TIA.
--~--~-~--~~~---~--~~
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
As described previously, I have two threads that use a handler to
update items in a ListView Adapter. However, as they load, they
briefly show up in two spots in the list. This is really annoying, but
I can't figure out exactly what is going on. One thought I have is
that the reason I see this
hi all,
i have a listview as bellow,
---
Google
---
Yahoo!
--
if i want to go to the Google,
just click the Google of the list,
but it just active when i click on the word Google
because i wish can click anywhere if it's click on the same raw of
Hi,
I have a ListView. When I click a row Item (which are just TextView
instances) I want them to remain hilighted (default orange color). The
default behavior is that they flash orange.
Strangely, if I use the key pad (arrow up/down) to move between items,
it has the exact behavior I want. Why
I've been trying to add a linear layout to a listview header. The
listview appears fine and is working as expected, but when i try to
add a linearlayout to the header i get a java.lang.ClassCastException:
android.view.ViewGroup$LayoutParams occuring at the list.addHeaderView
(ll); line. I thought
When trying to add a header to a listview i keep on getting a
java.lang.ClassCastException: android.widget.LinearLayout
$LayoutParams. I thought it might be a problem with the widget i was
adding to the header so i made the simple test case below which add
just a colored linearlayout as the
Hi,
I want to have the following functionality.
I need to have a list view which should have two fields. I need to
listen to clicks on these two fields(TextViews). Based on which text
view was clicked, I need to start different activities. Is this
possible in a ListView? I have my custom
I have a list view full of contacts that I am able to search using
setTextFilterEnabled with the hard keyboard (don't know a better term)
and the soft keyboard when I use the InputMethodManager to show the
keyboard on request. The issue I have is when the user flips the
phone to the horizontal
Hey at all,
i have a strange problem and i dont know what to do
i have an activity with an layout
-linearlayout
- listview
- textview ( on the bottom line )
to make some nice listview lines i have my own adapter (extends
baseadapter)
when i show this activity everything looks ok, but
hey all
i have an activity with layout
- linearlayout
- listview
- textview ( on the bottom line )
to make nice rows in the listview i have my own adapter. when i show
the activity everything looks fine until i try to scroll. then the app
crashes with following messages:
06-16
Hi All,
I have a ListView whose layout contains several TextViews. When an
item is clicked on the ListView, is it possible to capture on which
TextView he has clicked?
Thanks,
Dexter
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
Guys,
When your intent kicks knocked on the head by the OS and then restored/
recreated
(for example when you slide out the keyboard on the G1) if you have a
ListView
populated with items in an activity they appear after the recreate.
However, if you have a dialog box full of list items and do
Hi,
One of my ListView's has a CheckBox on every item's RelativeLayout.
I just found that clicking on any item of the ListView does not
callback its OnItemClick().
If I remove the CheckBox from item layout, callback is ok then.
My app needs to get both callbacks from the CheckBox as well as
Hi,
I developped a ListView with a custom adapter (which extends
ArrayAdapter).
The problem is that i can't selected or highlighted items.
Is there a attribut to fix in the listView Layout or something else?
Best regards,
Tom
--~--~-~--~~~---~--~~
You received
Hi,
I have developed a ListActivity where each row of the list contain a
drawable (downloaded from an url, cached locally and in memory). So, I
use a custom SimpleAdaptor to fill the list.
My problem is that the list is very slow.
It seems like the component try to reuses a small number of row
Dear all, I'm having trouble to get the index of the active highlighted Item
on a List View.
Please, help me to get the index of the highlighted item
public class HelloForm extends Activity {
ListView lv; // my listview
/** Called when the activity is first created. */
@Override
I found some documentation that said for the 1.5 pre api that ScrollView and
ListView are not supported. I used ListViews in my aHome widgets. Does
anyone know if there is a way to scroll content in the new Cupcake widgets?
I believe there might be a way to scroll plain text, but I need to scrol
I have a list activity which is doing something very strange when you
select items.
It doesn't seem to be de-selecting old items if you click on a
different one.
if you use the trackball it seems to select every other item and then
swap the selection as you move up and down.
I'm not doing
Hi,
I have TabActivity that uses 2 other ListActivities for the tabs.
Both underlying ListViews are set to CHOICE_MODE_MULTIPLE.
When I run the following sequence of events, I get a strange result:
1) Setup one activity (tab) and its ListView using a CursorAdapter,
including checking some items
Hi,
I have TabActivity that uses 2 other ListActivities for the tabs.
Both underlying ListViews are set to CHOICE_MODE_MULTIPLE.
When I run the following sequence of events, I get a strange result:
1) Setup one activity (tab) and its ListView using a CursorAdapter,
including checking some items
Hi,
Does anyone have any pointers on developing a listview where the
layout of the rows of a listview are dependent on some to-be-
downloaded data.
For example. the rows will detail a time table, so the downloaded
items for each row will be a days worth of classes. But then the row
will have
Hello:
I developed an activity that extends the ListActivity.
It has a ListView that binds to a DB.
Thing is that I can click on the items of the view only with the
trackball. When I try touching the items or the view I can't, is not
responsive.
Below the view I have a button that works just
Hi
This must be something very simple but I've tried almost everything
and still can't get this to work.
Basically I've made a custom LinearLayout view with a TextView and an
ImageButton to be used as a row for a ListView. The moment I use an
ImageButton tapping on the row does not highlight
Hi,
I am rendering a ListView inside a dialog. The ListView elements are
very simple TextView objects. The problem: whatever I do, they never
take the full width in the list view, which has the side effect that
the list view selector only covers the actual text, not the whole list
entry (i.o.w.,
Hi all,
I have a ListView with the text filter enabled plus an
OnItemClickListener. I don't understand how to find out which item
from my initial list was clicked because in void onItemClick
(AdapterView ? parent, View v, int position, long id) position gives
the current position of the clicked
Hi All,
I m having problem in setting soem items in list. getChildAt() returns null
if its not in the visible area :(, is there any workaround for this?
for (int i = 1; i getListView().getCount(); i++)
{
mCheckBox =
Dear all,
I am facing a strange an issue that should simple to solve I suppose.
I wonder how can I automatically scroll to see an element in a list
view. Let's say I know that I want to see the element view number 6 in
my list view, how do I scroll my list to see this element ?
I look at the
Hi all , i'm rearranging items in the list by dragging the item. I'm
in the touch mode and want to scroll view couple of items then i'm on
the last/first visiblePosition. Since i'm in the touch mode
setSelection is useless. How i can scroll a list in the touch mode.
For drag i'm using
when i have listview and i use some listadapter provided by android
api then when you touch item in list it flashes with orange colour and
then action is processed
if i have my own adapter this flash doesn't happen. instead text color
changes to black for a moment (and becomes unreadable) is
I've noticed that the time it takes to enter my ListActivity is fairly
proportional to the number of items in the sqlite cursor. Indeed,
when I look at a trace, it seems as though fillWindow (i.e. filling
the cursor window) takes a HUGE amount of time when working with a
large cursor (one with
hi all,
now l have a listview,the item in listview is tablelayout.when listitem can
focus when i use the trackball,but when i touch the listitem,it lose focus,why?
my adapter is extended ArrayAdapter like this
public class SimpleStringAdapter extends ArrayAdapterTableLayout{
public
Hi guys,
Let's say i have a ListView with the text filter enabled, and an
OnItemClickListener, how can i find out which item from my initial
list was selected?
For example:
listView.setOnItemClickListener(new
OnItemClickListener(){
public
In my listview, I'm trying to make the list row show 2 imageviews as
well as the textview which holds the data. The layout of a single row
is like this: [textview | img1| img2]. The problem is the text inside
the textview overlaps the imageviews. I've tried various layout
options but can't seem
Hi,
I've set the row (view) being used in a ListView as non-focusable
along with non-clickable and have set the listview's focusable flag to
false as well. However, I still get the yellow highlight when I use
the scroll-ball on my device. How can I disable the yellow highlight
and use my own
Hi,
I am displaying a listview where the view used for each row includes
an ImageView and TextView, with the image displayed dependant on the
contents of the TextView. the images are at this testing phase pngs
approx 600bytes each, dimensions of max 100x35 px.
I have noticed on both a large
601 - 700 of 725 matches
Mail list logo