Android :: Refreshing Data In ExpandableListView?

Apr 24, 2010

My problem is when I want to refresh data in ExpandableListView while being in that current activity. I create adapter and when I want to add new data to list I call again constructor of that adapter(it is my private variable) with all new data....and then I call onContentChanged() method to redraw my list.
But what happens is that I cant expand my list any more...like it is blocked or something and logcat isn't saying anything...

This is the code that i call after setting new data in arraylists and maps:

CODE:....................

Android :: Refreshing data in ExpandableListView?


Android :: Dynamically Build Data For ExpandableListView?

May 3, 2010

I'm using "ExpandableListView" in my application to display some options that . I need a way to build automatically the information to show when a group is expanded as the information might be different each time the group is expanded.

View 1 Replies View Related

Android :: LocationListener Not Refreshing

May 25, 2010

I'm trying to develop a small app, that can retrieve GPS coordinates, and store them, so I can retrace the path I took. The thing is, the GPS on Android emulator is kind of screwing around with my nerves... First of all, the Mock Position system doesn't work, so I'm manually fixing the coordinates with telnet "geo fix" command. Second of all, the location listener seems to not be refreshing. I'm lauching the app, fixing a first set of coordinates, and observing the response I expect. But when I push a second set of coordinates, the app simply doesn't react.

I tried a lot -big lot- of ideas on this, and I'm kind of running short...

By the way, I'm developping on Eclipse with ADT, and the SDK for Android 1.5 (French HTC Heros are still with Android 1.5) so that I can use my own app.

Here's my code (just the coordinate retrieval part) :

CODE:.................

View 3 Replies View Related

Android :: Refreshing A Spinner

Jul 3, 2010

I have a view with a spinner. The activity starts another acvitity with a popup where I add or delete values that the parent shows in the Spinner.

So, in onActivityResult() I refresh the content of the Spinner so that it reflects any additional or deleted values, by calling my fillSpinner() method.

The parameter to this method is the previously selected value:

CODE:..........

When I open the Spinner, it contains the correct list (i.e. it was refreshed) and the correct value is selected. However, the Spinner control itself (in its closed state) does not show the selected value, but the first in the list.

When I step through the code in the debugger, the Spinner value is correct before and after I call setSelection() (and it is always called with the same correct id). However, since I cannot step out of the event, when I resume the execution after a short moment the value in the Spinner changes.

In other words, the spinner's displayed string is changed and is different from the selected item when I return from my popup activity.

View 1 Replies View Related

Android :: Refreshing A Listview

Jul 7, 2010

I have a listview that's populated by rows that get their data from a web server. It all works totally fine except I want to have a refresh button to re-download the data. I'm getting the data through an asynctask (getting the data in doinbackground) and then setting the listadapter in onpostexecute. All I do to run the asynctask which should take care of everything is run

new PopulateListTask().execute();

However, in my optionsSelect method, creating a new asynctask just like I did in oncreate doesn't do anything. It doesn't even enter doInBackground. I've tried using listView.invalidate() and listView.invalidateViews(). Is there some special way I'm supposed to repopulate a listview?

My only guess is that since I'm using a custom adapter, my getView method is creating some kind of error, but that wouldn't explain why it's not even entering my asynctask's doInBackground method. Thoughts?

Posting some code. This is a trimmed down version.

CODE:............

I'm getting this in my logcat when executing my asynctask the 2nd time. Any idea what it means? I tried googling to no avail.

View 1 Replies View Related

Android :: Refreshing An Activity

Aug 23, 2010

I created an Activity which allows navigating between pages with a couple of Buttons (Previous and Next). When the user clicks one of the buttons, the Activity (same) needs to be "refreshed". In order to do this, I set up the buttons to make a call to onCreate(this); after they set up the other stuff that the activity uses for the paging to work. And it is working so far, but I'm wondering if there is a better way. Is there?

View 3 Replies View Related

Android :: TabActivity - Refreshing ?

Aug 18, 2009

I have a TabActivity based class which has 3 tabs. All are ListActivities (but that's not important for this problem)

I'm updating the TabHost's TabSpec's to change the text on the tabs. This works fine and the ListActivities display correctly.

Iater on the execution flow I need to update the Text on the tabs from "Current Text" to "Current Text (3)", for example. I update the TabSpec.setIndicator() with the new text, and attempt to call invalidate() on the TabWidget (and all it's children). But the tab text refuses to update!

View 5 Replies View Related

Android :: Xml Parser With Expandablelistview

Oct 27, 2010

I need to implement an xml parser and the parsed result into an expandablelistview.

View 1 Replies View Related

Android :: ExpandableListView Won't Redraw

Jul 29, 2009

I have an expandable list view with a static array for the group data and an SQLite database for the child data. It is implemented with the BaseExpandableListAdapter and works great, except, when I edit the database to delete or add children to the list I do not see the changes onscreen. It looks like I can use the registerDataSetObserver method to notify the adapter and expandable list of a data change. What I have to do in the callback to make Android redraw the list after data changes is what I need to know. Can I do it? Documentation on this part of the SDK is a bit sparse and expandable list view example code is not a good match. Can anyone offer advice on how to use a DataSetObserver? It feels like I have to switch over to a Cursor type adapter.

View 2 Replies View Related

Android :: Set ChlidDivider In ExpandableListView?

Dec 15, 2009

This is my ExpandableListView

CODE:..............

When I execute this in emulator, green(childDivider color) is all over the place.

It seems if childDivider is ColorDrawable, it has no bound.

View 2 Replies View Related

Android :: Filter In ExpandableListView?

Mar 18, 2010

I have an ExpandableListView with several groups and each group contains several children. I want to make this list searchable, just like a regular list view. I have a SimpleCursorTreeAdapter (mAdapter) for this expandlable list.

I tried to use the built in list filter using:

CODE:.......

The above code does not work for filtering.

How can I implement the search/filter functionality?

View 2 Replies View Related

Android :: Animating The ExpandableListView?

Sep 17, 2010

Is it possible to animate the expanding and collapsing of the groups in a ExpandableListView.

View 3 Replies View Related

Android :: Onchildclick In ExpandableListView?

Jun 17, 2009

I need a solution how to get the OnChildClick working for my ExpanableListActivity.

when starting of this project the Listener was working, but now i get nothing out of it?

i tried setting the listener through: "getExpandableListView().setOnChildClickListener(this);" at several point, but it isn't responding.

Here's the source code:

CODE:............

View 3 Replies View Related

Android :: LinearLayout In ExpandableListView

Jul 18, 2010

I want to inflate a childView of ExpandableChildView component.

Code:.............

Where linearOpt is a vector that contains a lot of LinearLayout objects that I have instantiated.

CODE:..

This is R.layout.itemrow xml:

But I received this error:

CODE:.................

View 1 Replies View Related

Android :: Expandablelistview Can Not Use NotifyDataSetChanged()?

Oct 20, 2010

I want to refresh my expandablelistview, but it seems there is no way to use notifyDataSetChanged()? how can i refresh my expandablelistview?

View 2 Replies View Related

Android :: Weather Widgets Not Refreshing

Feb 21, 2010

Anyone else having problems with the Weather Widgets app clock not refreshing? The weather seems to do its job every 30 minutes, but the clock gets stuck at times. Like today, it was 3 hours off. Anyone know of a fix for this? I checked for updates, but no luck.

View 4 Replies View Related

Android :: Refreshing An Activity On Tabwidget

May 24, 2010

I need to refresh my listview on my activity whenever i remove an item. I tried to call the activity (startActivity(Intent) ) it works but i lose the tabwidget.How Can I refresh my list without any lost ?

View 10 Replies View Related

Android :: Refreshing A ListActivity Within TabView

Nov 20, 2009

I'm running into some issues here with my app. I have 4 tabs run through a tabActivity. One tab sends an intent and run my ListActivity that populates the screen from a simpleCursorAdapter. My problem is that when I change back to this tab, after the first time its run, the list never refreshes regardless of the changes made to the database via other tabs. Is there something I can call from onTabChanged to refresh my ListActivity?

View 3 Replies View Related

Android :: ScoreMobile - How Does Refreshing Work

Sep 20, 2010

In the Settings menu, there is an "Auto Refresh" option which you can set to "Never," but there is also a "Ticker Refresh" option which you can't turn off. What do each of these things control? Is the Auto Refresh just for when the app is running? Does it affect the widget at all?

Does the Ticker Refresh option only affect the widget? Does it have any effect if the widget is not being used on any homescreen?

View 1 Replies View Related

Android :: ExpandableListView Context Menu

May 14, 2010

I'm trying to add a context menu to my ExpandableListView. I've implemented onCreateContextMenu() and onContextItemSelected() but if I hold my finger on a menu item context menu doesn't appear. What's my mistake?

View 1 Replies View Related

Android :: ExpandableListView - Is Conditional Expansion Possible

Aug 12, 2010

I have an ExpandableListView bound to a SQLite database. To simplify things, lets assume the database contains two columns: title and body. In the ExpandableListView, there is a group for each title, and a childfor each corresponding body.

Now to make things more interesting, some of the rows in the SQLite database do not have a body (that is... they only have a title). As you can see, if there is no body, then there is no reason to expand the group... because the child will be empty (i.e. String body == "").

I'm searching for a way to catch a situation like this, and skip the group's expansion. I don't want a blank child to be expanded. To put it in psuedo code, I want something like this:

CODE:...............

View 1 Replies View Related

Android :: Create A ExpandableListView In One Activity?

Nov 2, 2010

I'm trying to create a ExpandableListView in one activity. I've looked in apis demos, and I've created ExpandableListView. The problem is, that I need to have this ExpandableListView in activity that is already created, and not in a new one.

I've used this code:

CODE:..............

View 3 Replies View Related

Android :: Possible For The Child Of An ExpandableListView Also Be A Parent?

Nov 5, 2010

Is it possible for the child of an ExpandableListView also be a parent?

For example, I need something like the following: ParentA ChildA ChildB ParentB ChildC GrandchildA? GrandchildB? ParentC

View 4 Replies View Related

Android :: ExpandableListView Indicator Over My Text

Dec 2, 2009

I'm using an ExpandableListView in one of my activity in a RelativeLayout

CODE:.............

And I'm using a custom expandableListAdaptaer which group view is:

CODE:............

(Found on examples of API_Demos, ExpandableList1)

A user of my application report me this photo http://binomed-android-project.googlecode.com/issues/attachment?aid=-... As you can see, the indicator of group items is over the text of group item despite the padding of 36...

And if I'm running emulator WVGA800 or an emulator with "abstracted LCD density" to 240 I have the same problem, but with my phone (HTC G1), I don't have any problem.

What is strange is that I try the application API_Demo with an emulator WVGA800 or an emulator with "abstracted LCD density" to 240 and I go to ExpandableList1 activity and all is alright !

I also try to copy the inner class available in ExpandableList1 for adapter and I launch it into my activity and I also have the problem see on photo

I am forced to manage density into my adapters in order to adjust the padding?

View 3 Replies View Related

Android :: Customize The Parent In An ExpandableListView?

Sep 16, 2010

I'm trying to customize the parent(or header) for an expandablelist and I haven't found a solution yet. I want an imageview and two textviews in the parent. This is driving me insane atm.

View 2 Replies View Related

Android :: ChoiceMode Compatible With ExpandableListView?

May 12, 2010

Is it possible to make a multiple choice list with android:choiceMode="multipleChoice" or setChoiceMode(ListView.CHOICE_MODE_MULTIPLE) on an ExpandableListView? I am able to do this with CheckBoxes on a plain ListView, but it doesn't seem to be working with ExpandableListView. In the latter, clicking the list item (either parent or child) does not affect the checkbox as it does in the former.

I have noticed that it is possible to click exactly on the checkbox to make it toggle, but this is a very small target.

View 1 Replies View Related

Android :: Getting Item's Index From Id In ExpandableListView

Jun 4, 2010

I need to get item's index(position) knowing its ID while using ExpandableListView. Is there any way to do this without making complete hash id->index and searching it?

View 1 Replies View Related

Android :: Disable Collapsing Of ExpandableListView

Aug 11, 2010

The default behavior of ExpandableListView is to collapse a group when its header is clicked. Is it possible to prevent this from happening?

I've tried: Setting OnTouchListener on the list. This interferes with scrolling. Setting an OnGroupClickListener on the list (in onCreate()). This works for all clicks after the first.

Why might the OnGroupClickListener miss the first click?

View 2 Replies View Related

Android :: Use An Expandablelistview As A Dropdownview For A Spinner ?

Oct 5, 2010

I have a 2d array of strings. I would like to use a spinner to allow users to select values from the 2nd lvl of the array but I would like to display the selection options in a expandablelistview using the values of the 1st lvl of the array as category headers. Is this possible, how this should be implemented ?

View 1 Replies View Related

Android :: Implement An Activity That Uses ExpandableListView

Sep 3, 2010

Im trying to implement an activity that uses ExpandableListView and I have gotten so far but now I have found some strange behavior.

My activity is meant to record food intake as specified by the user. they have a choice of menus (breakfast, lunch and dinner - the outer group) which expand to show their contents.
when a user clicks on an inner menu item a dialog appears asking them for the qty. once they enter a qty and dismiss the dialog the text on the menu item changes to reflect the quantity of that item that has been consumed

The above image shows the list in a closed state.

Below is the list after I have opened the lunch menu and clicked on 'Potato Chips' and indicating a Quantity of 1. As you can see the 'Potato' itemtext has now been changed to reflect the Qty of 1.

The strange part happens now. if I click on 'Lunch' and close the list and then click on it again re-opening it, the 'Qty X 1' text has jumped to another item (Milk)

Each time I open and close the list it jumps back and forth between the two items. Also if I open up other items, such as breakfast, I find that they too have now gotten items with 'Qty X 1' even though I havent clicked them.

The bits of code that are relevant are as such:

The XML for a child element:

CODE:................

The code thats triggered on clicking a child element:

CODE:..................

The above code opens a dialog, accepts a value for quantity, appends the list element to reflect this, also saves to database and sets a textview with the selected item and quantity.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved