i developing application cordovawebview , have added below code in web_view.xml file.
<org.apache.cordova.cordovawebview android:id="@+id/cordovawebview" android:layout_width="fill_parent" android:layout_height="fill_parent" />
i have implemented methods cordovainterface. design page showing following error message.
tip: use view.isineditmode() in custom views skip code when shown in eclipse
could please tell me how resolve it?
isineditmode()
should used inside custom view constructor. try following code:
public class graphview extends view implements grapher { public graphview(context context, attributeset attrs) { super(context, attrs); if(!isineditmode()) init(context); } public graphview(context context) { super(context); if(!isineditmode()){ touchhandler = new touchhandler(this); init(context); } }
replace graphview cordovawebview.
view.isineditmode()
indicates whether view in edit mode. view in edit mode when displayed within developer tool. instance, if view being drawn visual user interface builder, method should return true. subclasses should check return value of method provide different behaviors if normal behavior might interfere host environment. instance: class spawns thread in constructor, drawing code relies on device-specific features, etc. method checked in drawing code of custom widgets.
Comments
Post a Comment