refresh

android: Refresh ListView using ListAdapter and SimpleCursorAdapter

狂风中的少年 提交于 2019-11-30 23:18:17
I'm trying to refresh a ListView that uses a ListAdapter created as a SimpleCursorAdapter. Here is my code for creating the Cursor and ListAdapter in onCreate which populates the ListView. tCursor = db.getAllEntries(); ListAdapter adapter=new SimpleCursorAdapter(this, R.layout.row, tCursor, new String[] columns, new int[] {R.id.rowid, R.id.date}); setListAdapter(adapter); Then, I add some data to the db in another method, but I can't figure out how to refresh the ListView. Similar questions on stackoverflow and other places mention using notifyDataSetChanged() and requery(), but neither are

Prevent refreshing / reloading a page with JavaScript

你。 提交于 2019-11-30 22:00:05
I know this is not recommended, but I need it because I have an iframe inside the page who has the actual content and I want that when the users hits refresh button, iframe reloads not entire page. I know I have to call onunload / onbeforeunload event, but I don't want to ask me if I want to leave the window, just don't. Is that possible? I've got handled the F5 key, but I like to prevent refreshing from button too. UPDATE: I wrote this 5 years ago, browsers do different stuff now, you can still use this for testing your browser set, but your experience may vary from my old research.

Refresh an iframe

假装没事ソ 提交于 2019-11-30 20:24:52
How to refresh an iframe? For example: <iframe src="http://google.com"></iframe> I click on "Videos" in this iframe ,then click on a button to refresh the iframe and I want when the iframe is refreshed ,to be on that "Videos" page. Pekka 웃 You can't refresh the inner document in there due to the single origin policy. Have you tried changing the iframe's src property and adding a random GET string to force a reload? This should work: <iframe id="myiframe" src="http://google.com"></iframe> document.getElementById("myiframe").src = "http://www.google.com?"+(+new Date()); You can only reload the

android: Refresh ListView using ListAdapter and SimpleCursorAdapter

我们两清 提交于 2019-11-30 18:58:07
问题 I'm trying to refresh a ListView that uses a ListAdapter created as a SimpleCursorAdapter. Here is my code for creating the Cursor and ListAdapter in onCreate which populates the ListView. tCursor = db.getAllEntries(); ListAdapter adapter=new SimpleCursorAdapter(this, R.layout.row, tCursor, new String[] columns, new int[] {R.id.rowid, R.id.date}); setListAdapter(adapter); Then, I add some data to the db in another method, but I can't figure out how to refresh the ListView. Similar questions

Auto Refresh IFrame HTML

旧街凉风 提交于 2019-11-30 15:44:32
How do I auto Refresh a Iframe every 3 Seconds with out it refreshing the entire page. I use <meta http-equiv="refresh" content="1"> but it shows the entire page refresh and puts you to the top of the page each time it does. My Iframe is pointed at a text file to read live messages I put in. Is there even a way to do this with out it refreshing the entire page, just the element. I am a HTML beginner so explain thoroughly please. I google alot and tried many things and so far nothing works and I try in many browser. My code So Far: <!DOCTYPE html> <html> <head> <link rel="shortcut icon" href=

How do I get Visual Studio 2010 to refresh my DataSet after I have updated the Database source?

孤街浪徒 提交于 2019-11-30 15:34:15
问题 I have added new columns to an existing MS Access 2010 Database that I have hooked into Visual Studio 2010 . After updating the Database, the Data Source window and DataSet do not have the new columns. I looked at answers such as this: Visual Studio DataSet Designer Refresh Tables , but configuring the default query with "SELECT * FROM Reservations" (where it has been suggested that updating the query will cause the table to refresh) hasn't refreshed anything. And the built-in "Refresh"

Angular.js: Is it possible to re-render ng-repeats based on existing scope data?

邮差的信 提交于 2019-11-30 14:38:54
问题 I have a bunch of connected ul lists in my view which are using a jQuery UI: Sortable directive to facilitate drag and drop and reordering of the list items. Changes I make via jQuery UI's drag and drop I apply to the $scope using the $apply function, this part works… The issue I am running into now however is that on drop into some of these lists I provide a custom form that the user needs to fill out. The user has the option to: fill out the form and continue which then does the $apply call

How do I get Visual Studio 2010 to refresh my DataSet after I have updated the Database source?

亡梦爱人 提交于 2019-11-30 14:18:36
I have added new columns to an existing MS Access 2010 Database that I have hooked into Visual Studio 2010 . After updating the Database, the Data Source window and DataSet do not have the new columns. I looked at answers such as this: Visual Studio DataSet Designer Refresh Tables , but configuring the default query with "SELECT * FROM Reservations" (where it has been suggested that updating the query will cause the table to refresh) hasn't refreshed anything. And the built-in "Refresh" buttons on the Data Sources and Database Explorer windows haven't caught the updates yet (there is also a

PHP refresh window? equivalent to F5 page reload?

。_饼干妹妹 提交于 2019-11-30 12:45:52
Is there anything in PHP that is the equivalent of manually pressing the F5 page reload button? My php script is in a frame and isn't the parent script but it needs to refresh the entire page and not just it's frame. With PHP you just can handle server-side stuff. What you can do is print this in your iframe: parent.window.location.reload(); Actually it is possible: Header('Location: '.$_SERVER['PHP_SELF']); Exit(); //optional And it will reload the same page. If you have any text before a header('Location: http://www.example.com/youformhere.php'); you'll have issues, because that must be sent

Angular.js: Is it possible to re-render ng-repeats based on existing scope data?

本秂侑毒 提交于 2019-11-30 11:09:07
I have a bunch of connected ul lists in my view which are using a jQuery UI: Sortable directive to facilitate drag and drop and reordering of the list items. Changes I make via jQuery UI's drag and drop I apply to the $scope using the $apply function, this part works… The issue I am running into now however is that on drop into some of these lists I provide a custom form that the user needs to fill out. The user has the option to: fill out the form and continue which then does the $apply call to persists the data into the $scope click a cancel button which instead of calling the $apply to