refresh

I have a bar chart which I want to update and I tried the revalidate and repaint methods but with no success

吃可爱长大的小学妹 提交于 2019-12-03 18:16:10
问题 class GraphGenerator1 extends JPanel { ChartPanel chartPanel, sbc; void generator(int t, int Value1, int Value2) { if (t == 1) { DefaultCategoryDataset gData = new DefaultCategoryDataset(); gData.setValue(Value1, "What you saved", ""); gData.setValue(Value2, "What you paid", ""); JFreeChart chart = ChartFactory.createBarChart("", "", "", gData, PlotOrientation.VERTICAL, false, false, false); chart.setBackgroundPaint(Color.WHITE); BarRenderer br = (BarRenderer) chart.getCategoryPlot()

Android Refresh activity when returns to it

混江龙づ霸主 提交于 2019-12-03 16:09:02
问题 I need a little help with refreshing one of my activities in my application. I'm using tab host activity and connecting to web service and downloading some data from one of my child activities. When I press sync button in my child activity I'm starting a new activity which is not in tab host and when the sync is done, it returns to it's parent (child activity). The thing that I want to achieve is to refresh the activity when I return back to it. As I checked over the internet I find that the

How to refresh captcha image on page refresh/load?

旧时模样 提交于 2019-12-03 15:54:48
I want to force my site to refresh the captcha image everytime it loads, so I have a javascript method triggered with the onload() event. Here I have the following line: document.getElementById('yw0_button').click; Firebug doesn't detect any errors, and for testing purposes I have added an alert right after the displayed line, and the alert pops up each time the page is loaded. However, the image doesn't refresh! This is what I believe is relevant about the view file: <?php if(extension_loaded('gd')): ?> <div class="row"> <?php echo $form->labelEx($model,'verifyCode'); ?> <div> <?php $this-

Auto Refresh a page in Rails 3

妖精的绣舞 提交于 2019-12-03 15:52:53
How to periodically auto refresh page with paramaters in Rails 3? Place the following HTML within the <head> of the applicable views. This should not be used when the page had POST parameters sent, only GET parameters. Change the 5 to the interval, in seconds, you want the page to refresh at. <meta http-equiv="refresh" content="5" /> Though this works, I'd recommend considering using AJAX to refresh only the needed content which will not only be faster but less jolting to the user and will have a lower impact on your server's load. This is not specific to Rails and applies to any webpage.

Method to refresh Fragment content when data changed ( like recall onCreateView)

不问归期 提交于 2019-12-03 15:04:06
I have an Activity with a fragment container in layout. 3 different Fragment can be displayed in it. There fragments contains a listview which displays data with custom Adapter i made. So each list elements is created during onCreateView , after i queried a database to have data. But sometimes some data may changes in my database, si i would like to redraw/recreate it the Listview. What would be the best way (i mean the less ressources demanding) to refresh my fragment view ? Is there a method to recall onCreateView manually ? Detach and attach it with Fragment currentFragment =

Refresh remote Git branches in Android studio

六眼飞鱼酱① 提交于 2019-12-03 14:53:28
问题 There is a new branch in the remote repository, but it does not appear in the git branches in android studio. How can I refresh that list to show the new branch? I have tried git branch -r but new branch is not showing in the list. 回答1: In your Android Studio menu bar, click on VCS > Git > Fetch Check the image: 回答2: You can try using VCS (from menu) then click on Git and then on Fetch . Alternatively, you can use git fetch --all 回答3: Try using git fetch or use git fetch --all 来源: https:/

Android ListView adapter wont refresh

拈花ヽ惹草 提交于 2019-12-03 14:26:10
I'm having a lot of trouble refreshing a list view with a custom adapter. I've been searching online for the past hour and I can't seem to find any solution that will make my list view refresh. I've tried notifyDataSetChanged, and also listView.invalidate, but nothing seems to be working. Any help would be greatly appreciated. I can see the data being updated using logcat, but it is not being refreshed on the screen and I have no idea why. Below is the code. ArrayList<Student> students = new ArrayList<Student>(); listview = (ListView) findViewById(R.id.listView); adapter = new StudentAdapter

Refresh Current Activity without Delay

让人想犯罪 __ 提交于 2019-12-03 13:25:31
I am new to android development.So I want to refresh the current activity when Radio button clicked.When I clicked the radio button I want to change the language and refresh the current Activity without any delay.Now I click the button the current layout gone and open new one.But it takes some time.Anyone can see there is new layout coming. This is my code Intent intent = getIntent(); intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); finish(); startActivity(intent); You can try this: Intent intent = getIntent(); overridePendingTransition(0, 0); intent.addFlags(Intent.FLAG_ACTIVITY_NO

Refreshing ArrayAdapter onResume [notifyDataSetChanged() not working]

你离开我真会死。 提交于 2019-12-03 12:29:24
I am creating a contact list app using Fragments where one frag is a list of names in the contact list and the other is the rest of the details. Here is the class that displays the list of names public class MyListFragment extends ListFragment { private ContactStorage contactStorage = new ContactStorage(); public final static String TAG = "FRAGMENTS"; private MainActivity parent; ArrayAdapter<String> adapter; ArrayList<String> entries = new ArrayList<String>(); String array[]; public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater

How to display a constantly changing image file in a browser without refresh flicker?

雨燕双飞 提交于 2019-12-03 11:37:43
问题 I'm displaying an image (from a file) on the browser using html... I have another program that keeps taking a screenshot of my screen and storing it as an image file "image.jpeg". I am displaying this image on the browser periodically using setTimeout. However the image is not changing on the browser.. Here is my code... I have used an Image object so that a new image is loaded everytime the javascript function runs, however that does not seem to be working... <html> <head> <script type="text