React native overlapped rendering issue - list

Overlapped rendering
I'm using react native to build a list of Notifications, but I sometimes have an issue like the image below.
When refreshing/adding data I sometimes get overlapped rendering where old data is displayed on top of new data.
I've added the key property on the ListItem in the renderRow method as described in the docs.
Anyone knows a fix or why this is happening?
Kind regards

Related

Displaying image using CDialog::CreateIndirect

I'm modifying MFC C++ code that previews dialogs from Win32 apps when they are being localised/internationalised. One of the limitations of our current approach is that we can't display images from an app being localised, we just insert a placeholder image.
What I would like is a way to enhance this functionality to display an image loaded externally from another app into a child dialog that I create myself.
We preview a dialog from a given Win32 program and recreate the dialogs plus any changes translators have made, using the CDialog::CreateIndirect function.
In effect, we are recreating the original dialog from the Win32 app as a child window of our software.
CDialog::CreateIndirect takes a DLGTEMPLATE structure as an argument which contains all of the data needed to reconstruct a dialog. It's here that we insert the resource id of our placeholder image.
I have searched to see is there are way to write the raw binary data of the image I want to display, or else dynamically add the image into my own app's list of resource IDs so I can use it that way, but ours seems to be an obscure use case.
Any help or advice would be appreciated, thanks.

Sending Ember Highcharts events back to parent component

I'm using Ember 2.3 and have built a controller around Ember Highcharts. When a chart point is clicked I send that event back to the controller via the following nasty bit of code added to the highcharts configuration object:
Graph.__container__.lookup('controller:accounts.account.outlets.outlet.ratings').send('pointClick', event);
(I know this is fundamentally wrong and should be using getOwner.lookup for the container reference)
This works without issue, but I'm now refactoring this controller to a component and can't think how to pass the graph event back to the component as components are not registered in the app container.
Any pointers to how to achieve this would be very much appreciated!
Thanks.
UPDATE
I've just discovered that I can send an action to a component from the Highcharts event function:
Graph.__container__.lookup('component:ratingsGraph').send('pointClick', event)
But this seems to create a new instance of the component, rather than send to the existing instance. I guess that makes sense as components aren't singletons.
Very frustrating!
Some days you can't see the wood for the trees!
Instead of defining the highcharts event function in the highcharts configuration parameters, I simply defined it within the component and passed it to highcharts. This enabled me to use a closure to hold reference to the defining component.
Doh!

ListView in android for dynamic data

how to refresh List View dynamic data content in android?
I tried loading dynamic data for the List View in android application but no luck .Any advice how to accomplish this?
Call notifyDataSetChanged() on your Adapter object once you've modified the data in that adapter.
Some additional specifics on how/when to call notifyDataSetChanged() can be viewed in this Google I/O video.
Or else Look at this link.it may helpful.
Dynamic ListView in Android app
Or else
The right thing to do is to call notifyDataSetChanged() on your Adapter.
Troubleshooting
If calling notifyDataSetChanged() doesn't work all the layout methods won't help either. Believe me the list view was properly updated. If you fail to find the difference you need to check where the data in your adapter comes from.
If this is just a collection you're keeping in memory check that you actually deleted the item from the collection before calling the notifyDataSetChanged().
If you're working with a database or service backend you'll have to call the method to retrieve the information again (or manipulate the in memory data) before calling the notifyDataSetChanged().
The thing is this notifyDataSetChanged only works if the dataset has changed. So that is the place to look if you don't find changes coming through. Debug if needed.
UI Thread
It is true that this has to be called from the UI thread. Other answers have examples on how to achieve this. However this is only required if you're working on this information from outside the UI thread. That is from a service or a non UI thread. In simple cases you'll be updating your data from a button click or another activity/fragment. So still within the UI thread. No need to always pop that runOnUiTrhead in.
More Information
Another nice post about the power of list Views is found here:http://www.vogella.com/articles/AndroidListView/article.html

Web control in bada not loading if created with UiBuilder

I'm trying to display a webpage inside the web control, when I create the control programmatically all works perfectly, but when I create the control using the Ui Builder (XML) and then get the control and instruct it to load a url:
__pWebControl = static_cast<Web*>(GetControl(L"IDC_WEB1"));
__pWebControl->LoadUrl("http://www.google.es");
it just shows a blank page, like nothing has done.
(Note: I've tried to call form->RequestDraw() with no success either)
Thanks.
Did you try waiting about two seconds before the redraw?
I've been using Osp::Web::Controls::Web in my apps extensively to display any kind of (non-editable, formatted) text. I ended up having to wait about a second or two before refreshing the entire frame to see any content in it.
OnTimerExpired(Osp::Base::Runtime::Timer& timer)
{
m_pFrame->RequestRedraw();
delete pTimerImp;
}
the timer is set like this:
pTimerImp = new Timer;
pTimerImp->Construct(*this);
pTimerImp->Start(2000);
Redrawing without waiting has always resulted in empty Web's on both WQVGA (slower) and WVGA (faster) models under both 1.1 (WQVGA) and 1.0/1.2 (WVGA).
Have you tried doing the same trick? It may help.
Have you tried to use Reload() after LoadUrl()?
I use SDK 2.0.3 and there is a WebControl which works quite well, so if you still have this problem, try the new SDK Version.

How to get complete HTML body using browser helper object (BHO) in case of DHTML/AJAX page?

I'm writing a BHO that analyze the HTML taken from the 'onDocumentComplete' event of 'DWebBrowserEvents2'. Currently it works fine, unless I have a DHTML/AJAX page, where HTML handle is delivered too soon.
For sample, I tried using it on 'http://www.google.com'. From the 'onDocumentComplete' event I can get most of the page but in the topmost link/anchors, the 'href' for maps, videos, orkut etc. is not available (normally it is javascript:void(0)).
Has anyone any ideas how to capture it when the page is fully loaded rather than just when the frame/body is loaded?
Thanks,
UPDATE
It seems there is some problem with the MSHTML API. I have posted the same question on MSDN forum and some response. Also I have detailed out my problem and findings....
http://social.msdn.microsoft.com/Forums/en-US/ieextensiondevelopment/thread/d517dbd1-df22-4dce-8ff9-0ca6786757f9
In case someone finds some way to solve this then please do share...
Thanks,
The AJAX DHTML changes mostly don't cause a further onDocumentComplete call.
You need to register for further Window or Document events such as DISPID_HTMLWINDOWEVENTS2_ONLOAD.
One method is to advise the window of a com object that you provide with the generic event sink interface.
hr = AtlAdvise(winDisp, pWinHandler, DIID_HTMLWindowEvents2, &dwCookie);
When this further event is triggered re examining the document you will find that it is updated.