public static void switchTab(int index) { try { PerformOnUiThread.exec(new SwitchTabTask(index), false); } catch (Exception e) { reportFail("switchTab", e); } }
public static void create(int type, Object params) { try { PerformOnUiThread.exec(new CreateTask(type, params), false); } catch (Exception e) { reportFail("create", e); } }
public static void remove() { try { PerformOnUiThread.exec(new CreateTask(NOBAR_TYPE, null), false); } catch (Exception e) { reportFail("remove", e); } }
public static IRhoBluetoothManager sharedInstance() { if (ourInstance == null) { PerformOnUiThread.exec( new Runnable() { public void run() { RhoBluetoothManager.logi(TAG, "make IRhoBluetoothManager instance"); String className = "RhoBluetoothManagerNew"; int sdkVersion = Integer.parseInt(Build.VERSION.SDK); if (sdkVersion < Build.VERSION_CODES.ECLAIR) { RhoBluetoothManager.logi( TAG, "sharedInstance - old version of System - NO Bluetooth !"); className = "RhoBluetoothManagerOld"; } try { String pkgname = RhoBluetoothManager.class.getPackage().getName(); String fullName = pkgname + "." + className; Class<? extends IRhoBluetoothManager> klass = Class.forName(fullName).asSubclass(IRhoBluetoothManager.class); ourInstance = klass.newInstance(); ourInstance.init(); } catch (Exception e) { RhoBluetoothManager.loge( TAG, "exception during make IRhoBluetoothManager instance: " + e.getMessage()); throw new IllegalStateException(e); } } }, true); } return ourInstance; }
public void onClick(View v) { PerformOnUiThread.exec( new Runnable() { public void run() { RhodesService.loadUrl(ActionCustom.this.url); } }); }
public static void setFullScreenMode(final boolean mode) { sFullScreen = mode; PerformOnUiThread.exec( new Runnable() { @Override public void run() { if (sTopActivity != null) { sTopActivity.setFullScreen(mode); } } }); }
public static void takeSignature(String url, Object params) { try { processParams(params); getSharedInstance().mProperties.penColor = getSharedInstance().mProperties.penColor | 0xFF000000; getSharedInstance().mProperties.bgColor = getSharedInstance().mProperties.bgColor | 0xFF000000; getSharedInstance().mProperties.setPropertyByName(SignatureProperties.CALLBACK, url); Runnable runnable = new Picture(ImageCapture.class); PerformOnUiThread.exec(runnable); } catch (Exception e) { Logger.E(TAG, e); } }
public static void inlineSignatureClear(IRhoExtManager extmanager) { PerformOnUiThread.exec( new Runnable() { public void run() { if (ourInlineSignatureView != null) { ourInlineSignatureView.doClear(); // RhodesService.getInstance().getMainView().getWebView(-1).getView().invalidate(); // ViewGroup wv = // (WebView)RhodesService.getInstance().getMainView().getWebView(-1).getView(); // if (wv != null) { // wv.invalidate(); // } } } }); }
public static void inlineSignatureHide(final IRhoExtManager extManager) { PerformOnUiThread.exec( new Runnable() { public void run() { if (ourInlineSignatureView != null) { Object webView_obj = extManager.getWebView(); if (webView_obj instanceof ViewGroup) { ViewGroup wv = (ViewGroup) webView_obj; if ((wv != null) && (ourInlineSignatureView != null)) { wv.removeView(ourInlineSignatureView); ourInlineSignatureView = null; } } else { ViewGroup wv = (ViewGroup) (((View) webView_obj).getParent()); if ((wv != null) && (ourInlineSignatureView != null)) { wv.removeView(ourInlineSignatureView); ourInlineSignatureView = null; } } } } }); }
public static void inlineSignatureVisible( final IRhoExtManager extManager, boolean visible, Object params) { if (!visible) { inlineSignatureHide(extManager); return; } processParams(params); PerformOnUiThread.exec( new Runnable() { public void run() { reportMsg(" $$$ Start make of Signature View"); Object webView_obj = extManager.getWebView(); if (webView_obj instanceof ViewGroup) { ViewGroup wv = (ViewGroup) webView_obj; if ((wv != null) && (ourInlineSignatureView != null)) { wv.removeView(ourInlineSignatureView); ourInlineSignatureView = null; } } else { ViewGroup wv = (ViewGroup) (((View) webView_obj).getParent()); if ((wv != null) && (ourInlineSignatureView != null)) { wv.removeView(ourInlineSignatureView); ourInlineSignatureView = null; } } ourInlineSignatureView = new SignatureView(ContextFactory.getUiContext(), null); { // if ((getSharedInstance().mProperties.bgColor & 0xFF000000) != 0xFF000000) { // ourInlineSignatureView.setVisibility(View.INVISIBLE); ourInlineSignatureView.isTransparency = true; // } ourInlineSignatureView.setupView( getSharedInstance().mProperties.penColor, getSharedInstance().mProperties.penWidth, getSharedInstance().mProperties.bgColor); ourInlineSignatureView.setLayoutParams( new AbsoluteLayout.LayoutParams( getSharedInstance().mProperties.width, getSharedInstance().mProperties.height, getSharedInstance().mProperties.left, getSharedInstance().mProperties.top)); } if (webView_obj instanceof ViewGroup) { ViewGroup wv = (ViewGroup) webView_obj; if ((wv != null) && (ourInlineSignatureView != null)) { wv.addView(ourInlineSignatureView); wv.bringChildToFront(ourInlineSignatureView); ourInlineSignatureView.requestFocus(); ourInlineSignatureView.bringToFront(); ourInlineSignatureView.invalidate(); } } else { ViewGroup wv = (ViewGroup) (((View) webView_obj).getParent()); if ((wv != null) && (ourInlineSignatureView != null)) { wv.addView(ourInlineSignatureView); wv.bringChildToFront(ourInlineSignatureView); ourInlineSignatureView.requestFocus(); ourInlineSignatureView.bringToFront(); ourInlineSignatureView.invalidate(); } } // wv.invalidate(); reportMsg(" $$$ Finish make of Signature View"); } }); }