public void onClick(android.view.View arg0) { Thread t = new Thread(() => { try { MonoJavaBridge.JavaBridge.Log("1"); HttpWebRequest req = WebRequest.Create("http://api.twitter.com/1/statuses/home_timeline.json") as HttpWebRequest; MonoJavaBridge.JavaBridge.Log("2"); req.Credentials = new NetworkCredential("herrodere", "foobar"); var resp = req.GetResponse(); var respStream = resp.GetResponseStream(); byte[] b = new byte[100]; respStream.Read(b, 0, b.Length); var text = new System.IO.StreamReader(respStream).ReadToEnd(); Console.WriteLine(text); result = text; MonoJavaBridge.JavaBridge.Log("done"); mHandler.post(this); JNIEnv.defaultVM.DetachCurrentThread(); } catch (Exception ex) { Console.WriteLine(ex.Message); } }); t.Start(); }
public override void onListItemClick (ListView list, View v, int pos, long id) { var item = (Map<String,Object>)list.getItemAtPosition (pos); var monkey = (Monkey)item.get ("monkey"); if (listener != null) listener.onMonkeySelected (monkey); }
protected override void onListItemClick (ListView l, View v, int position, long id) { var item = (Map<String,Object>)l.getItemAtPosition (position); var type = (Type)item.get("type"); var intent = new Intent (this, typeof (TestActivity)); intent.putExtra ("type", type.FullName); startActivity (intent); }
public void onClick (View v) { finish (); }
public void onClick(View v) { that.StartPendingAlarm(NotifyServiceFromTimer.Class, 1000 * 8, 1000 * 41); that.startservice.setEnabled(false); that.stopservice.setEnabled(true); }
public void onClick(View v) { that.CancelPendingAlarm(NotifyServiceFromTimer.Class); that.startservice.setEnabled(true); that.stopservice.setEnabled(false); }
public void recomputeViewAttributes (View child) { throw new NotImplementedException (); }
public void requestTransparentRegion (View child) { throw new NotImplementedException (); }
public void setView(View view) { }
public void setOnTouchListener(View.OnTouchListener l) { }
public bool showContextMenuForChild (View originalView) { return false; }
public ActionMode startActionModeForChild (View originalView, ActionMode.Callback callback) { throw new NotImplementedException (); }
public void bringChildToFront (View child) { throw new NotImplementedException (); }
public void focusableViewAvailable (View v) { if (view == null) return; if (!view.hasFocus ()) { v.requestFocus (); } }
public View focusSearch (View v, int direction) { // FIXME return null; }
public bool getChildVisibleRect (View child, Rect r, Point offset) { throw new NotImplementedException (); }
public void clearChildFocus (View child) { View old_focus = focused; focused = null; if (view != null && !view.hasFocus ()) { // If a view gets the focus, the listener will be invoked from requestChildFocus() if (!view.requestFocus(View.FOCUS_FORWARD)) attach_info.mTreeObserver.dispatchOnGlobalFocusChange(old_focus, null); } else if (old_focus != null) { attach_info.mTreeObserver.dispatchOnGlobalFocusChange(old_focus, null); } }
public void createVrToast(View toastView) { // Find how big the toast wants to be. toastView.measure(0, 0); toastView.layout(0, 0, toastView.getMeasuredWidth(), toastView.getMeasuredHeight()); Log.v(TAG, "toast size:" + toastView.getWidth() + "x" + toastView.getHeight()); toastTexture.setDefaultBufferSize(toastView.getWidth(), toastView.getHeight()); try { Canvas canvas = toastSurface.lockCanvas(null); toastView.draw(canvas); toastSurface.unlockCanvasAndPost(canvas); } catch { Log.e(TAG, "lockCanvas threw exception"); } nativePopup(appPtr, toastView.getWidth(), toastView.getHeight(), 7.0f); }
public void invalidateChild (View child, Rect r) { XobotActivityManager.RequestInvalidate (this); }
public void onClick(View v) { value(that, new EventArgs()); }
// https://sites.google.com/a/jsc-solutions.net/backlog/knowledge-base/2013/20/20130722-new-release public virtual void addView(View view, ViewGroup.LayoutParams @params) { }
public virtual Builder setView(View view) { return default(Builder); }
public virtual void updateViewLayout(View view, ViewGroup.LayoutParams @params) { }
public void childDrawableStateChanged (View child) { ; // Do nothing }
public void requestChildFocus (View child, View focused) { if (this.focused != focused) { attach_info.mTreeObserver.dispatchOnGlobalFocusChange (this.focused, focused); this.focused = focused; } }
public static void TryHideActionbar(this Activity that, View view) { try { //Log.wtf("AndroidGLSpiralActivity", "TryHideActionbar"); var h = new HideLater { that = that, view = view }; view.setOnSystemUiVisibilityChangeListener( h ); h.onSystemUiVisibilityChange(0); //Log.wtf("AndroidGLSpiralActivity", "TryHideActionbar done"); } catch { Log.wtf("AndroidGLSpiralActivity", "TryHideActionbar error"); //throw; } }
public bool requestChildRectangleOnScreen (View child, Rect rectangle, bool immediate) { return false; }
public virtual void removeView(View view) { }
public bool requestSendAccessibilityEvent (View child, android.view.accessibility.AccessibilityEvent @event) { throw new NotImplementedException (); }
public bool onTouch(View arg0, MotionEvent arg1) { return yield(arg0, arg1); }
public override void setContentView (View view) { setContentView (view, new ViewGroup.LayoutParams ( ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT)); }