redraw

Redrawing elements ignores user-scalable=0 in Android Browser. Why?

拜拜、爱过 提交于 2019-12-04 17:46:33
This is the meta tag <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> Problem - I wanted to force a redraw (to solve another problem) when the orientation was changed by hiding and unhiding a container <div id="redraw>" . Once redraw occurs however, the Android browser now allows me to zoom in even though I had set user-scalable=0 . Why is this? My guess was that Android had changed the meta tag on redraw by setting user-scalable=1 . But this was not the case, because as you can see in the function redrawOrientation()

Android Edittext- Clearing Spans

邮差的信 提交于 2019-12-04 15:57:53
问题 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 the wrong place. So my question is: How do I clear spans from and EditText? (Without calling setText()- the text may be thousands of lines long and its too slow to redraw it all frequently) Thanks very much! 回答1: Had the same problem. Solved it by

Layer-backed OpenGLView redraws only if window is resized

只谈情不闲聊 提交于 2019-12-04 08:09:56
问题 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 CustomOpenGLView . This is made according to the Apple Sample Code Layer Backed OpenGLView. The app is made to draw something to the OpenGLContext every, let's say, 0.05 seconds. With Core Animation Layer disabled I am able to see the moving object in

Openlayers-3 Force a map refresh

醉酒当歌 提交于 2019-12-04 06:35:10
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. mapResize() doesn't appear to do anything either, but if I wait for a feature to be updated or move the map it works. Any ideas? How can I FORCE the map to redraw on demand, regardless of a feature update? I believe you need to force your layer's source to update, you can do so by calling the changed function on it: yourLayer.getSource().changed();

Xamarin.Forms - Force ListView layout to redraw

若如初见. 提交于 2019-12-04 03:24:23
问题 I have a ListView with HasUnevenRows = true , where the content of each cell is variant to begin with, but the content can also change on the fly (through clicking of a button in the cell). When the ListView initially loads, the system must perform a calculation in order to correctly determine and draw the heights of each cell based on their content. But when I update the content after the initial load, this same calculation is apparently not done, because the height of the cell does not

What could cause redraw issues on 64-bit vista but not in 32-bit in .NET WInForms?

↘锁芯ラ 提交于 2019-12-04 03:16:04
This happens when compiling for Any Cpu as well as compiling to x86. Sections of the GUI doesn't redraw unless it's resized, for instance if the main form is maximized some of the controls don't resize with it, and others have sections that don't redraw and displays the what was previously there. This works fine on 32-bit machines, both XP and Vista, but on 64-bit Vista (don't have x64 XP to test with) the redrawing just isn't working properly. Anyone have any ideas on where to start tracking this down? Edit: This occurs on 2 separate machines, and at least the one I'm currently on has the

Force RecyclerView to redraw its items

北慕城南 提交于 2019-12-03 10:32:04
问题 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 adapter. I tried to: call adapter.notifyDataSetChanged but onCreateViewHolder is not called call recyclerView.setVisibility(View.GONE) and then recyclerView.setVisibility(View.VISIBLE) call recyclerView.invalidate() call recyclerView.setAdapter(null)

Android Edittext- Clearing Spans

我是研究僧i 提交于 2019-12-03 10:05:57
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 the wrong place. So my question is: How do I clear spans from and EditText? (Without calling setText()- the text may be thousands of lines long and its too slow to redraw it all frequently) Thanks very much! Had the same problem. Solved it by removing only the types of spans that I added to the EditText. I guess clearSpans removes more than it should

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

僤鯓⒐⒋嵵緔 提交于 2019-12-03 04:42:50
问题 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 how to force the control to re-render but without going through an entire layout pass. As stated above, most answers I've seen revolve around invalidating the Visual which invalidates the layout which forces new measure and arrange passes which is

Force RecyclerView to redraw its items

空扰寡人 提交于 2019-12-03 01:04:22
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 adapter. I tried to: call adapter.notifyDataSetChanged but onCreateViewHolder is not called call recyclerView.setVisibility(View.GONE) and then recyclerView.setVisibility(View.VISIBLE) call recyclerView.invalidate() call recyclerView.setAdapter(null) and then recyclerView.setAdapter(adapter) . This works well for 90% items. Only 90% of items will get