Questions tagged [redraw]

Describes the update of a display (or a part of it, like a program window) to show the latest version of the data.

385 questions
58
votes
12 answers

Force RecyclerView to redraw its items

Is there any way to redraw all items of RecyclerView? I have some Themes (in style.xml) and after changing the theme, I need the RecyclerView to be redrawn. So I want a method that will force to re-call onCreateViewHolder for each items of the…
Denis Covaci
  • 1,137
  • 1
  • 8
  • 13
54
votes
4 answers

Difference between InvalidateRect and RedrawWindow

When I want to redraw a window, is there any preferred function to call between InvalidateRect and RedrawWindow? For instance, are these two calls equal: (win would be a HWND) RedrawWindow(win, NULL, NULL, RDW_INVALIDATE); InvalidateRect(win, NULL,…
default
  • 11,485
  • 9
  • 66
  • 102
40
votes
4 answers

Redraw a single row in a listview

Is it possible to redraw a single row in a ListView? I have a ListView with rows that are LinearLayouts. I listen to a preference change and sometimes I need to change just one View inside the LinearLayout of a single row. Is there a way to make it…
Falmarri
  • 47,727
  • 41
  • 151
  • 191
26
votes
4 answers

How can I manually tell an owner-drawn WPF Control to refresh/redraw without executing measure or arrange passes?

We are doing custom drawing in a control subclass's OnRender. This drawing code is based on an external trigger and data. As such, whenever the trigger fires, we need to re-render the control based on that data. What we're trying to do is find out…
Mark A. Donohoe
  • 28,442
  • 25
  • 137
  • 286
26
votes
2 answers

Chrome does not redraw

I have some divs that show up on hover, and then are hidden. However, in Chrome (19.0.1084.56 m, Windows XP) when you unhover, Chrome doesn't redraw them as gone until you do something like scroll or resize the window. http://jsfiddle.net/y7NdR/3/ I…
brentonstrine
  • 21,694
  • 25
  • 74
  • 120
23
votes
3 answers

How to force a view to redraw immediately before the next line of code is executed

I have a LinearLayout that I would like to change the background color of when one of its child views (an ImageButton) is clicked. I am able to do this, but not immediately - the change doesn't occur on the screen until later (I think during an…
pvans
  • 1,017
  • 2
  • 10
  • 15
19
votes
3 answers

Android Edittext- Clearing Spans

I am trying to get an EditText to clear its spans by calling EditText.getText().clearSpans(). However, if I call this method, the EditText starts to behave strangely, with line feeds appearing as boxes and any spans I then set being in completely…
Henry Thompson
  • 2,441
  • 3
  • 23
  • 31
17
votes
4 answers

WPF forcing redraw of canvas

Okay, in windows forms you can use .refresh() to cause a redraw event on an element. Is there a similar solution in WPF? An explanation of what I'm doing, I'm drawing a maze on a canvas object, and would like to watch as the maze is drawn (so I can…
ohmusama
  • 4,159
  • 5
  • 24
  • 44
14
votes
4 answers

How to update Android ListView with dynamic data in real time?

I have a background thread loading data which I want to display in an Android ListView. The data changes very often (i.e. 1-2 times per second). Sometimes the number of rows in the dataset changes too (but certainly not as often as the data in the…
Android Dev
  • 485
  • 2
  • 4
  • 10
14
votes
6 answers

Openlayers-3 Force a map refresh

I have a custom styling that shows/hides features on the map, but when it is applied it doesn't activate until the map refreshes due to a feature update, but I need it to trigger immediately. I tried map.render and renderSync() but they did nothing.…
user4773894
11
votes
2 answers

LiveCharts WPF Slow with live data. Improve LiveCharts real-time plotting performance

I am investigating the use of LiveChart within a WPF application for the purpose of plotting in real time, temperature measurements. I have put together a simple line chart example to read data at 10Hz, and redraw for every sample. However, I am…
user5265160
  • 409
  • 1
  • 8
  • 19
10
votes
3 answers

html5 canvas redraw on resize

I have two canvas elements and need them to be resized on buttons click.
CodeGust
  • 831
  • 3
  • 15
  • 36
9
votes
1 answer

Layer-backed OpenGLView redraws only if window is resized

I have a window with a main view of type NSView and a subview which is a subclass of NSOpenGLView whose name is CustomOpenGLView. The subclass of NSOpenGLView is obtained through a Custom View in Interface Builder and by setting its class to…
Andrea3000
  • 1,018
  • 1
  • 11
  • 26
9
votes
2 answers

Plotly: How to update / redraw a plotly express figure with new data?

During debugging or computationally heavy loops, i would like to see how my data processing evolves (for example in a line plot or an image). In matplotlib the code can redraw / update the figure with plt.cla() and then plt.draw() or…
Jim
  • 1,579
  • 1
  • 11
  • 18
9
votes
2 answers

Trying to force redraw of UITableViewCell

I found this post on Beveled UITableViewCells from http://news.selectstartstudios.com/beveled-uitableviewcells/. I'm using the technique to reduce the width of the cells, and for the most part it works great. However, I have a small problem.…
Suresh
  • 363
  • 1
  • 4
  • 8
1
2 3
25 26