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
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
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
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
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
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
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
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
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
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:....................
View 1 Replies
View Related
Aug 17, 2010
I created a ListView that contains a row which in turn contain text and a button. The idea is to have the button function as a delete button to remove the row from the list as well as the database. I order to do this I created an adapter to handle the button click. This code is below. Deleting the database record works fine, but I have not yet succeeded in refreshing the ListView so the record will no longer be displayed.
public class FeedArrayAdapter extends ArrayAdapter {
private ARssEReaderDBAdapter dba;
private String TAG = "FeedArrayAdapter";
private View v;
private ListView feedList;..............
View 1 Replies
View Related
Oct 2, 2009
I've got an App Widget that gets updated (er... I try to update it) with the following chunk of code: ComponentName thisWidget = new ComponentName(context, MyAppWidgetProvider.class); AppWidgetManager manager = AppWidgetManager.getInstance(context); manager.updateAppWidget(thisWidget, remoteViews);
The problem I'm seeing is that it the user interface is updating always one behind (i.e. using the previous remoteView to update the user interface). So, i make that call with a certain configuration in remoteViews, and it doesn't reflect in the UI until the next time I call it with a different remoteView. I know this is kinda vague and I don't have a lot of details here, but i was wondering if I'm missing something very obvious.
View 2 Replies
View Related
Mar 29, 2010
I want code for refershing my page automatically when i click on any button.For Ex I have a people page In that page i delete people from total peoples using one button but that selected people is not deleted immediately That means the People page is not refreshing.So,I want code for refreshing that page.Give me any suggestions.Thanks in advance
View 1 Replies
View Related
Mar 18, 2010
I'm trying to add views dynamically to a linearlayout. I see through getChildCount() that the views are added to the layout, but even calling invalidate() on the layout doesn't give me the childs showed up.
View 1 Replies
View Related
Sep 29, 2010
I have a Moto Droid 2.2 with "Alarm Clock Plus v2" set as my clock when in the multi-media dock. The weather information will load the current weather when the application first starts up, however will not refresh.
If I tap on the weather it will open the weather info with up to date info but going back to the clock will still show the old data. By removing the phone from the dock (thus exiting Alarm Clock Plus) and putting it back on the dock (thus running Alarm Clock Plus again) the weather info becomes current.
Has anyone else run into this? I looked in the settings for Alarm Clock Plus v2 and could not find any information on how often to refresh the weather info.
View 1 Replies
View Related
Jul 29, 2010
I have created an option menu which also has a sub menu. In the sub menu I have a setting for enabling/disabling images in my application based on the application level flag that i change based on the option being clicked.What I am observing is that when i click on the "Menu" and change the settings from enable Images to disable Images. its not reflecting.I have put the debug log and what have been seen is the onOptionCreateMenu method is getting called only one time- first time when i click the "Menu" button. That is the reason the changed sub menu is not getting reflected.My question is that is there a way i can re-create the option menu every time user presses the "Menu Button".
View 3 Replies
View Related
Mar 26, 2010
How do you stop the Droid Eris mail from not keep checking for new mail? I tried clicking stop and closing it but it still keeps refreshing all new email. Any help to stop this action?
View 5 Replies
View Related
Jun 13, 2010
This Android application on Google uses the following method to refresh the database after replacing the database file with a backup:
CODE:...........
I did not build this app, and I am not sure what happens. I am trying to make this idea work in my own application, but the data appears to be cached by the views, and the app continues to show data from the database that was replaced, even after I call cleanup() and reopen the database. I have to terminate and restart the activity in order to see the new data.
I tried to call invalidate on my TabHost view, which pretty much contains everything. I thought that the views would redraw and refresh their underlying data, but this did also not have the expected result.
I ended up restarting the activity programmatically, which works, but this seems to be a drastic measure. Is there a better way?
View 1 Replies
View Related
Jan 11, 2010
Is anyone else finding that their Facebook notifications page will NOT refresh?
Mine has been stuck since Jan 6 (only that page) and g I can just go to the website, it's downright annoying.
View 8 Replies
View Related
Nov 8, 2010
I have set up Eclipse to run as smoothly as possible because I was having a lot of problems with it running out of memory in my last machine. One of the configurations was to have it automatically refresh the workspace every time I save. I don't know if that is the problem but I thought I's mention it. Here's a screenshot of the error:
It happens every time I open Eclipse and save anything. I was also having another problem with something to do with my workspace being compliant with Java 1.6 when I need 1.5. But then I switched and the problem went away. This problem then popped up. Does anyone know any solution to this because it is really getting annoying now.
View 4 Replies
View Related
Sep 11, 2009
This is a very common scenario: displaying images in a ListView which have to be downloaded from the internet.Right now I have a custom subclass of ArrayAdapter which I use for the ListView. In my getView() implementation of the ArrayAdapter, I spawn a separate thread to load an image. After the loading is done, it looks up the appropriate ImageView and sets the image with ImageView.setImageDrawable(). So the solution I used is kind of similar to this one: http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-listviewThe problem I'm having is that as soon as I make the call to setImageDrawable() on the ImageView, the ListView somehow refreshes all currently visible rows in the list! This results in kind of an infinite loop. Code...
View 2 Replies
View Related
Apr 22, 2010
I'm trying to write code that draws accuracy circles around a gps location based on a time param. I have no problem setting up the GPS, or of calculating how to draw the circles.What's been killing me is that the Overlays always overwrite one another.So I can never have more than one circle.I've looked at all the examples and tutorials online but they seem to be obsessed with putting in icons or with Drawing from some database or array.If I understood correctly I should be able to do itemizedoverlays and just draw as i go without having to track each readout in an array.
View 9 Replies
View Related
Sep 15, 2010
the Facebook for android apps of the htc desire is not receiving notifications. When i refresh the page of the notifications, a error will occur. All the rest can be used except for the notifications. Anyone has the same problems? or if you know the solution kindly help.
View 5 Replies
View Related
Sep 10, 2010
How do you refresh a web page in the stock browser? Am I missing something, seems like this should be basic functionality?
View 6 Replies
View Related
Mar 24, 2010
I woke up this morning and checked my phone(as I always do) and saw there were no emails. I found it strange since I usually get emails throughout the night(forum emails what?). I went to my computer and sure enough, there were 11 emails waiting for me.
I refreshed on the phone and they all popped up. A couple hours later the same thing happened. Looked at my phone and felt something was off. The computer showed 7 new emails. Refreshed the phone and bam, they popped up.
Anyone else getting a delay or no gmails(unless refreshed) on their phone at all?
View 6 Replies
View Related
Nov 11, 2009
I've had the same "Most Viewed" and "Most Discussed" videos on my Youtube app homepage since the day I got the phone... I can't stand apps that never update properly and so far the Youtube and Facebook ones are both doing it
View 5 Replies
View Related
Apr 14, 2010
I'm using the HTC email service on a rooted Sprint Hero, Fresh 1.1 Gumbo. i have no apps installed that did not come with the ROM, my mobile is toggled on, i don't ever use wi-fi, and my email accounts are both gmail and yahoo (although my default is yahoo)...i think that covers any possible questions. anyhow the problem is sometimes my emails will not refresh at 15 minutes.
View 13 Replies
View Related
Aug 10, 2010
My mail was working fine up until I updated to 2.1.
Now my mail won't refresh automatically; if I go into the mail app and manually refresh the mail still comes through, but even though I have it set to refresh every hour it doesn't seem to do so!
I have all the alerts on, and I have also tired deleting and re-adding the account again with no luck!
View 3 Replies
View Related
Aug 4, 2010
My 'People'/contacts app is linked to my Facebook account but seems to have stopped refreshing/updating when they do things like update their status or profile pictures. I have updated the Facebook app but to no avail; people on the Legend's Facebook page say that it is an error of which HTC are aware and 'working on', but I thought I would check here to see if anyone knew anything else about it. It's not a major problem but it can be rather annoying to see the same status update over and over again.
View 1 Replies
View Related
Jun 2, 2012
I recently moved a hundred or so photos off my phone but the thumbnails still show in the directory view of photo album. I can remove them one at a time, but it's tedious. I can't find a way to refresh it, and can't find the directory where the thumbnails are stored to wipe them out en masse .
View 2 Replies
View Related