public ZoomButton(android.content.Context context, android.util.AttributeSet attrs , int defStyle) : base(context, attrs, defStyle) { mRunnable = new _Runnable_30(this); mHandler = new android.os.Handler(); setOnLongClickListener(this); }
public void removeCompletionHandler(java.lang.Runnable onComplete) { if (completionHandlers != null) { completionHandlers.Remove(onComplete); } }
/// <summary>Only call from main thread!</summary> public bool execPendingActions () { if (mExecutingActions) throw new InvalidOperationException ("Recursive entry to executePendingTransactions"); if (!XobotActivityManager.IsMainThread) throw new InvalidOperationException ("Must be called from main thread of process"); bool didSomething = false; while (true) { int numActions; lock (this) { if (mPendingActions == null || mPendingActions.size () == 0) return didSomething; numActions = mPendingActions.size (); if (mTmpActions == null || mTmpActions.Length < numActions) { mTmpActions = new java.lang.Runnable[numActions]; } mPendingActions.toArray (mTmpActions); mPendingActions.clear (); mActivity.mHandler.removeCallbacks (mExecCommit); } mExecutingActions = true; { for (int i = 0; i < numActions; i++) { mTmpActions [i].run (); mTmpActions [i] = null; } } mExecutingActions = false; didSomething = true; } }
private void performCollapse() { if (isCollapsed()) { return; } if (mTabSpinner == null) { mTabSpinner = createSpinner(); } removeView(mTabLayout); addView(mTabSpinner, new android.view.ViewGroup.LayoutParams(android.view.ViewGroup .LayoutParams.WRAP_CONTENT, android.view.ViewGroup.LayoutParams.MATCH_PARENT)); if (mTabSpinner.getAdapter() == null) { mTabSpinner.setAdapter(new [email protected] (this)); } if (mTabSelector != null) { removeCallbacks(mTabSelector); mTabSelector = null; } mTabSpinner.setSelection(mSelectedTabIndex); }
private Message getPostMessage(java.lang.Runnable r) { Message m = Message.obtain(); m.callback = r; return(m); }
public FastScroller(android.content.Context context, android.widget.AbsListView listView ) { mDeferStartDrag = new _Runnable_132(this); mList = listView; init(context); }
/// <summary> /// Same as /// <see cref="obtain(Handler)">obtain(Handler)</see> /// , but assigns a callback Runnable on /// the Message that is returned. /// </summary> /// <param name="h">Handler to assign to the returned Message object's <em>target</em> member. /// </param> /// <param name="callback">Runnable that will execute when the message is handled.</param> /// <returns>A Message object from the global pool.</returns> public static android.os.Message obtain(android.os.Handler h, java.lang.Runnable callback) { android.os.Message m = obtain(); m.target = h; m.callback = callback; return(m); }
public void addCompletionHandler(java.lang.Runnable onComplete) { if (completionHandlers == null) { completionHandlers = new System.Collections.Generic.List <java.lang.Runnable>(); } completionHandlers.Add(onComplete); }
public virtual void scheduleDrawable(android.graphics.drawable.Drawable who, java.lang.Runnable what, long when) { if (who == mCurrDrawable && getCallback() != null) { getCallback().scheduleDrawable(this, what, when); } }
private Message getPostMessage(java.lang.Runnable r, object token) { Message m = Message.obtain(); m.obj = token; m.callback = r; return(m); }
public virtual void scheduleDrawable(android.graphics.drawable.Drawable who, java.lang.Runnable what, long when) { android.graphics.drawable.Drawable.Callback callback = getCallback(); if (callback != null) { callback.scheduleDrawable(this, what, when); } }
public virtual void animateToTab(int position) { android.view.View tabView = mTabLayout.getChildAt(position); if (mTabSelector != null) { removeCallbacks(mTabSelector); } mTabSelector = new _Runnable_244(this, tabView); post(mTabSelector); }
public virtual bool postAtFrontOfQueue(java.lang.Runnable arg0) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; if (!IsClrObject) { return(@__env.CallBooleanMethod(this.JvmHandle, global::android.os.Handler._postAtFrontOfQueue6434, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0))); } else { return(@__env.CallNonVirtualBooleanMethod(this.JvmHandle, global::android.os.Handler.staticClass, global::android.os.Handler._postAtFrontOfQueue6434, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0))); } }
public virtual void removeCallbacks(java.lang.Runnable arg0, java.lang.Object arg1) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; if (!IsClrObject) { @__env.CallVoidMethod(this.JvmHandle, global::android.os.Handler._removeCallbacks6436, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1)); } else { @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.os.Handler.staticClass, global::android.os.Handler._removeCallbacks6436, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1)); } }
public override void unscheduleSelf(java.lang.Runnable arg0) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; if (!IsClrObject) { @__env.CallVoidMethod(this.JvmHandle, global::android.graphics.drawable.AnimationDrawable._unscheduleSelf3837, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); } else { @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.graphics.drawable.AnimationDrawable.staticClass, global::android.graphics.drawable.AnimationDrawable._unscheduleSelf3837, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); } }
void InitTimer(CanvasView view) { const int TIMER_RATE = 16; java.lang.Runnable runnable = null; runnable = ((java.lang.Runnable.Delegate)(() => { view.invalidate(); view.postDelayed(runnable, TIMER_RATE); })).AsInterface(); view.postDelayed(runnable, TIMER_RATE); }
public virtual void queueEvent(java.lang.Runnable arg0) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; if (!IsClrObject) { @__env.CallVoidMethod(this.JvmHandle, global::android.opengl.GLSurfaceView._queueEvent6086, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); } else { @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.opengl.GLSurfaceView.staticClass, global::android.opengl.GLSurfaceView._queueEvent6086, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); } }
internal void clearForRecycle() { flags = 0; what = 0; arg1 = 0; arg2 = 0; obj = null; replyTo = null; when = 0; target = null; callback = null; data = null; }
internal TN() { mShow = new _Runnable_302(this); mHide = new _Runnable_308(this); // XXX This should be changed to use a Dialog, with a Theme.Toast // defined that sets up the layout params appropriately. android.view.WindowManagerClass.LayoutParams @params = mParams; @params.height = android.view.ViewGroup.LayoutParams.WRAP_CONTENT; @params.width = android.view.ViewGroup.LayoutParams.WRAP_CONTENT; @params.flags = android.view.WindowManagerClass.LayoutParams.FLAG_NOT_FOCUSABLE | android.view.WindowManagerClass.LayoutParams.FLAG_NOT_TOUCHABLE | android.view.WindowManagerClass .LayoutParams.FLAG_KEEP_SCREEN_ON; @params.format = android.graphics.PixelFormat.TRANSLUCENT; @params.windowAnimations = [email protected]_Toast; @params.type = android.view.WindowManagerClass.LayoutParams.TYPE_TOAST; @params.setTitle(java.lang.CharSequenceProxy.Wrap("Toast")); }
public CN1Media(Stream s, string mime, java.lang.Runnable onComplete, Canvas cl) { this.cl = cl; using (AutoResetEvent are = new AutoResetEvent(false)) { SilverlightImplementation.dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { elem = new MediaElement(); cl.Children.Add(elem); elem.MediaOpened += elem_MediaOpened; elem.SetSource(s.AsRandomAccessStream(), ""); video = mime.StartsWith("video"); this.onComplete = onComplete; elem.MediaEnded += elem_MediaEnded; are.Set(); }).AsTask().ConfigureAwait(false).GetAwaiter().GetResult(); are.WaitOne(); } }
public CN1Media(string uri, bool video, java.lang.Runnable onComplete, Canvas cl) { this.cl = cl; using (AutoResetEvent are = new AutoResetEvent(false)) { SilverlightImplementation.dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { elem = new MediaElement(); cl.Children.Add(elem); elem.MediaOpened += elem_MediaOpened; elem.Source = new Uri(uri, UriKind.RelativeOrAbsolute); this.video = video; this.onComplete = onComplete; elem.MediaEnded += elem_MediaEnded; are.Set(); }).AsTask().ConfigureAwait(false).GetAwaiter().GetResult(); are.WaitOne(); } }
/// <summary>Only call from main thread!</summary> public bool execPendingActions() { if (mExecutingActions) { throw new InvalidOperationException("Recursive entry to executePendingTransactions"); } if (!XobotActivityManager.IsMainThread) { throw new InvalidOperationException("Must be called from main thread of process"); } bool didSomething = false; while (true) { int numActions; lock (this) { if (mPendingActions == null || mPendingActions.size() == 0) { return(didSomething); } numActions = mPendingActions.size(); if (mTmpActions == null || mTmpActions.Length < numActions) { mTmpActions = new java.lang.Runnable[numActions]; } mPendingActions.toArray(mTmpActions); mPendingActions.clear(); mActivity.mHandler.removeCallbacks(mExecCommit); } mExecutingActions = true; { for (int i = 0; i < numActions; i++) { mTmpActions [i].run(); mTmpActions [i] = null; } } mExecutingActions = false; didSomething = true; } }
public Interpreter getInterpreter() { if (interpreter == null) { if (false) { jlispThread = new Thread(new ThreadStart(StartJLISP)); jlispThread.Start(); } else { // StartInstanceBlocked(); // isReady = true; jrunnable = new JRunnableLisp(this); jthread = new java.lang.Thread(jrunnable); jthread.start(); } while (!isReady) { java.lang.Thread.sleep(1000);// Thread.Sleep(1000);// ironTextBoxControl.Update(); Yield(); } } if (varPackage == null) { varPackage = Symbol._PACKAGE_; } LispObject pkg = varPackage.symbolValue(); if (lastPackage != pkg) { lastPackage = pkg; // ironTextBoxControl.Prompt = ((Package)pkg).getName() + "> "; // ironTextBoxControl.getIronTextBox(); // ironTextBoxControl.getIronTextBox().Parent; //ironTextBoxControl.ConsoleTextBox } return(interpreter); }
public SearchView(android.content.Context context) : this(context, null) { mShowImeRunnable = new _Runnable_137(this); mUpdateDrawableStateRunnable = new _Runnable_148(this); mOnClickListener = new _OnClickListener_787(this); mTextKeyListener = new _OnKeyListener_836(this); mOnEditorActionListener = new _OnEditorActionListener_1059(this); mOnItemClickListener = new _OnItemClickListener_1233(this); mOnItemSelectedListener = new _OnItemSelectedListener_1244(this); mTextWatcher = new _TextWatcher_1530(this); }
public PrivilegedActionAnonymousInnerClassHelper(java.lang.Runnable proc) { this.Proc = proc; }
public android.view.MenuItem setCallback(java.lang.Runnable callback) { mItemCallback = callback; return this; }
public CN1Media(Stream s, string mime, java.lang.Runnable onComplete) { System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() => { elem = new MediaElement(); elem.SetSource(s); video = true; this.onComplete = onComplete; elem.MediaEnded += elem_MediaEnded; }); }
public Idler(java.lang.Runnable callback) { throw new System.NotImplementedException(); }
public virtual void runOnMainSync(java.lang.Runnable runner) { throw new System.NotImplementedException(); }
public Thread(java.lang.Runnable arg0) : base(global::MonoJavaBridge.JNIEnv.ThreadEnv) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(java.lang.Thread.staticClass, global::java.lang.Thread._Thread13375, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); Init(@__env, handle); }
public ZoomButton(android.content.Context context) : this(context, null) { mRunnable = new _Runnable_30(this); }
public Interpreter getInterpreter() { if (interpreter == null) { if (false) { jlispThread = new Thread(new ThreadStart(StartJLISP)); jlispThread.Start(); } else { // StartInstanceBlocked(); // isReady = true; jrunnable = new JRunnableLisp(this); jthread = new java.lang.Thread(jrunnable); jthread.start(); } while (!isReady) { java.lang.Thread.sleep(1000);// Thread.Sleep(1000);// ironTextBoxControl.Update(); Yield(); } } if (varPackage == null) { varPackage = Symbol._PACKAGE_; } LispObject pkg = varPackage.symbolValue(); if (lastPackage != pkg) { lastPackage = pkg; // ironTextBoxControl.Prompt = ((Package)pkg).getName() + "> "; // ironTextBoxControl.getIronTextBox(); // ironTextBoxControl.getIronTextBox().Parent; //ironTextBoxControl.ConsoleTextBox } return interpreter; }
public ZoomButton(android.content.Context context, android.util.AttributeSet attrs ) : this(context, attrs, 0) { mRunnable = new _Runnable_30(this); }
public ListActivity() { mRequestFocus = new _Runnable_190(this); mOnClickListener = new _OnItemClickListener_316(this); }
public Gallery(android.content.Context context) : this(context, null) { mFlingRunnable = new android.widget.Gallery.FlingRunnable(this); mDisableSuppressSelectionChangedRunnable = new _Runnable_122(this); }
public SearchView(android.content.Context context, android.util.AttributeSet attrs ) : base(context, attrs) { mShowImeRunnable = new _Runnable_137(this); mUpdateDrawableStateRunnable = new _Runnable_148(this); mOnClickListener = new _OnClickListener_787(this); mTextKeyListener = new _OnKeyListener_836(this); mOnEditorActionListener = new _OnEditorActionListener_1059(this); mOnItemClickListener = new _OnItemClickListener_1233(this); mOnItemSelectedListener = new _OnItemSelectedListener_1244(this); mTextWatcher = new _TextWatcher_1530(this); android.view.LayoutInflater inflater = (android.view.LayoutInflater)context.getSystemService (android.content.Context.LAYOUT_INFLATER_SERVICE); inflater.inflate([email protected]_view, this, true); mSearchButton = findViewById([email protected]_button); mQueryTextView = (android.widget.SearchView.SearchAutoComplete)findViewById([email protected] .id.search_src_text); mQueryTextView.setSearchView(this); mSearchEditFrame = findViewById([email protected]_edit_frame); mSearchPlate = findViewById([email protected]_plate); mSubmitArea = findViewById([email protected]_area); mSubmitButton = findViewById([email protected]_go_btn); mCloseButton = (android.widget.ImageView)findViewById([email protected]_close_btn ); mVoiceButton = findViewById([email protected]_voice_btn); mSearchHintIcon = (android.widget.ImageView)findViewById([email protected]_mag_icon ); mSearchButton.setOnClickListener(mOnClickListener); mCloseButton.setOnClickListener(mOnClickListener); mSubmitButton.setOnClickListener(mOnClickListener); mVoiceButton.setOnClickListener(mOnClickListener); mQueryTextView.setOnClickListener(mOnClickListener); mQueryTextView.addTextChangedListener(mTextWatcher); mQueryTextView.setOnEditorActionListener(mOnEditorActionListener); mQueryTextView.setOnItemClickListener(mOnItemClickListener); mQueryTextView.setOnItemSelectedListener(mOnItemSelectedListener); mQueryTextView.setOnKeyListener(mTextKeyListener); mQueryTextView.setOnFocusChangeListener(new _OnFocusChangeListener_265(this)); android.content.res.TypedArray a = context.obtainStyledAttributes(attrs, [email protected] .styleable.SearchView, 0, 0); setIconifiedByDefault(a.getBoolean([email protected]_iconifiedByDefault , true)); int maxWidth = a.getDimensionPixelSize([email protected]_maxWidth , -1); if (maxWidth != -1) { setMaxWidth(maxWidth); } java.lang.CharSequence queryHint = a.getText([email protected]_queryHint ); if (!android.text.TextUtils.isEmpty(queryHint)) { setQueryHint(queryHint); } int imeOptions = a.getInt([email protected]_imeOptions, -1 ); if (imeOptions != -1) { setImeOptions(imeOptions); } int inputType = a.getInt([email protected]_inputType, -1); if (inputType != -1) { setInputType(inputType); } a.recycle(); bool focusable = true; a = context.obtainStyledAttributes(attrs, [email protected], 0, 0); focusable = a.getBoolean([email protected]_focusable, focusable); a.recycle(); setFocusable(focusable); mVoiceWebSearchIntent = new android.content.Intent(android.speech.RecognizerIntent .ACTION_WEB_SEARCH); mVoiceWebSearchIntent.addFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK); mVoiceWebSearchIntent.putExtra(android.speech.RecognizerIntent.EXTRA_LANGUAGE_MODEL , android.speech.RecognizerIntent.LANGUAGE_MODEL_WEB_SEARCH); mVoiceAppSearchIntent = new android.content.Intent(android.speech.RecognizerIntent .ACTION_RECOGNIZE_SPEECH); mVoiceAppSearchIntent.addFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK); mDropDownAnchor = findViewById(mQueryTextView.getDropDownAnchor()); if (mDropDownAnchor != null) { mDropDownAnchor.addOnLayoutChangeListener(new _OnLayoutChangeListener_313(this)); } updateViewsVisibility(mIconifiedByDefault); updateQueryHint(); }
public virtual bool selectDrawable(int idx) { if (idx == mCurIndex) { return false; } long now = android.os.SystemClock.uptimeMillis(); if (mDrawableContainerState.mExitFadeDuration > 0) { if (mLastDrawable != null) { mLastDrawable.setVisible(false, false); } if (mCurrDrawable != null) { mLastDrawable = mCurrDrawable; mExitAnimationEnd = now + mDrawableContainerState.mExitFadeDuration; } else { mLastDrawable = null; mExitAnimationEnd = 0; } } else { if (mCurrDrawable != null) { mCurrDrawable.setVisible(false, false); } } if (idx >= 0 && idx < mDrawableContainerState.mNumChildren) { android.graphics.drawable.Drawable d = mDrawableContainerState.mDrawables[idx]; mCurrDrawable = d; mCurIndex = idx; if (d != null) { if (mDrawableContainerState.mEnterFadeDuration > 0) { mEnterAnimationEnd = now + mDrawableContainerState.mEnterFadeDuration; } else { d.setAlpha(mAlpha); } d.setVisible(isVisible(), true); d.setDither(mDrawableContainerState.mDither); d.setColorFilter(mColorFilter); d.setState(getState()); d.setLevel(getLevel()); d.setBounds(getBounds()); } } else { mCurrDrawable = null; mCurIndex = -1; } if (mEnterAnimationEnd != 0 || mExitAnimationEnd != 0) { if (mAnimationRunnable == null) { mAnimationRunnable = new _Runnable_325(this); } else { unscheduleSelf(mAnimationRunnable); } // Compute first frame and schedule next animation. animate(true); } invalidateSelf(); return true; }
/// <summary> /// <p>Builds the popup window's content and returns the height the popup /// should have. /// </summary> /// <remarks> /// <p>Builds the popup window's content and returns the height the popup /// should have. Returns -1 when the content already exists.</p> /// </remarks> /// <returns>the content's height or -1 if content already exists</returns> private int buildDropDown() { android.view.ViewGroup dropDownView; int otherHeights = 0; if (mDropDownList == null) { android.content.Context context = mContext; mShowDropDownRunnable = new _Runnable_976(this); mDropDownList = new android.widget.ListPopupWindow.DropDownListView(context, !mModal ); if (mDropDownListHighlight != null) { mDropDownList.setSelector(mDropDownListHighlight); } mDropDownList.setAdapter(mAdapter); mDropDownList.setOnItemClickListener(mItemClickListener); mDropDownList.setFocusable(true); mDropDownList.setFocusableInTouchMode(true); mDropDownList.setOnItemSelectedListener(new _OnItemSelectedListener_994(this)); mDropDownList.setOnScrollListener(mScrollListener); if (mItemSelectedListener != null) { mDropDownList.setOnItemSelectedListener(mItemSelectedListener); } dropDownView = mDropDownList; android.view.View hintView = mPromptView; if (hintView != null) { // if an hint has been specified, we accomodate more space for it and // add a text view in the drop down menu, at the bottom of the list android.widget.LinearLayout hintContainer = new android.widget.LinearLayout(context ); hintContainer.setOrientation(android.widget.LinearLayout.VERTICAL); android.widget.LinearLayout.LayoutParams hintParams = new android.widget.LinearLayout .LayoutParams(android.view.ViewGroup.LayoutParams.MATCH_PARENT, 0, 1.0f); switch (mPromptPosition) { case POSITION_PROMPT_BELOW: { hintContainer.addView(dropDownView, hintParams); hintContainer.addView(hintView); break; } case POSITION_PROMPT_ABOVE: { hintContainer.addView(hintView); hintContainer.addView(dropDownView, hintParams); break; } default: { android.util.Log.e(TAG, "Invalid hint position " + mPromptPosition); break; } } // measure the hint's height to find how much more vertical space // we need to add to the drop down's height int widthSpec = android.view.View.MeasureSpec.makeMeasureSpec(mDropDownWidth, android.view.View .MeasureSpec.AT_MOST); int heightSpec = android.view.View.MeasureSpec.UNSPECIFIED; hintView.measure(widthSpec, heightSpec); hintParams = (android.widget.LinearLayout.LayoutParams)hintView.getLayoutParams(); otherHeights = hintView.getMeasuredHeight() + hintParams.topMargin + hintParams.bottomMargin; dropDownView = hintContainer; } mPopup.setContentView(dropDownView); } else { dropDownView = (android.view.ViewGroup)mPopup.getContentView(); android.view.View view = mPromptView; if (view != null) { android.widget.LinearLayout.LayoutParams hintParams = (android.widget.LinearLayout .LayoutParams)view.getLayoutParams(); otherHeights = view.getMeasuredHeight() + hintParams.topMargin + hintParams.bottomMargin; } } // getMaxAvailableHeight() subtracts the padding, so we put it back // to get the available height for the whole window int padding = 0; android.graphics.drawable.Drawable background = mPopup.getBackground(); if (background != null) { background.getPadding(mTempRect); padding = mTempRect.top + mTempRect.bottom; // If we don't have an explicit vertical offset, determine one from the window // background so that content will line up. if (!mDropDownVerticalOffsetSet) { mDropDownVerticalOffset = -mTempRect.top; } } // Max height available on the screen for a popup. bool ignoreBottomDecorations = mPopup.getInputMethodMode() == android.widget.PopupWindow .INPUT_METHOD_NOT_NEEDED; int maxHeight = mPopup.getMaxAvailableHeight(getAnchorView(), mDropDownVerticalOffset , ignoreBottomDecorations); if (mDropDownAlwaysVisible || mDropDownHeight == android.view.ViewGroup.LayoutParams .MATCH_PARENT) { return maxHeight + padding; } int listContent = mDropDownList.measureHeightOfChildren(android.view.View.MeasureSpec .UNSPECIFIED, 0, android.widget.ListView.NO_POSITION, maxHeight - otherHeights, -1); // add padding only if the list has items in it, that way we don't show // the popup if it is not needed if (listContent > 0) { otherHeights += padding; } return listContent + otherHeights; }
/// <summary>Sets whether the zoom controls should be visible to the user.</summary> /// <remarks>Sets whether the zoom controls should be visible to the user.</remarks> /// <param name="visible">Whether the zoom controls should be visible to the user.</param> public virtual void setVisible(bool visible) { if (visible) { if (mOwnerView.getWindowToken() == null) { if (!mHandler.hasMessages(MSG_POST_SET_VISIBLE)) { mHandler.sendEmptyMessage(MSG_POST_SET_VISIBLE); } return; } dismissControlsDelayed(ZOOM_CONTROLS_TIMEOUT); } if (mIsVisible == visible) { return; } mIsVisible = visible; if (visible) { if (mContainerLayoutParams.token == null) { mContainerLayoutParams.token = mOwnerView.getWindowToken(); } mWindowManager.addView(mContainer, mContainerLayoutParams); if (mPostedVisibleInitializer == null) { mPostedVisibleInitializer = new _Runnable_374(this); } mHandler.post(mPostedVisibleInitializer); // Handle configuration changes when visible mContext.registerReceiver(mConfigurationChangedReceiver, mConfigurationChangedFilter ); // Steal touches events from the owner mOwnerView.setOnTouchListener(this); mReleaseTouchListenerOnUp = false; } else { // Don't want to steal any more touches if (mTouchTargetView != null) { // We are still stealing the touch events for this touch // sequence, so release the touch listener later mReleaseTouchListenerOnUp = true; } else { mOwnerView.setOnTouchListener(null); } // No longer care about configuration changes mContext.unregisterReceiver(mConfigurationChangedReceiver); mWindowManager.removeView(mContainer); mHandler.removeCallbacks(mPostedVisibleInitializer); if (mCallback != null) { mCallback.onVisibilityChanged(false); } } }
public virtual void waitForIdle(java.lang.Runnable recipient) { throw new System.NotImplementedException(); }
public ListFragment() { mRequestFocus = new _Runnable_151(this); mOnClickListener = new _OnItemClickListener_158(this); }
public SyncRunnable(java.lang.Runnable target) { throw new System.NotImplementedException(); }
public RunnableAnonymousInnerClassHelper(PrivilegedThreadFactory outerInstance, java.lang.Runnable r) { this.OuterInstance = outerInstance; this.r = r; }
public CN1Media(string uri, bool video, java.lang.Runnable onComplete) { System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() => { elem = new MediaElement(); elem.Source = new Uri(uri, UriKind.RelativeOrAbsolute); this.video = video; this.onComplete = onComplete; elem.MediaEnded += elem_MediaEnded; }); }
public Gallery(android.content.Context context, android.util.AttributeSet attrs, int defStyle) : base(context, attrs, defStyle) { mFlingRunnable = new android.widget.Gallery.FlingRunnable(this); mDisableSuppressSelectionChangedRunnable = new _Runnable_122(this); mGestureDetector = new android.view.GestureDetector(context, this); mGestureDetector.setIsLongpressEnabled(true); android.content.res.TypedArray a = context.obtainStyledAttributes(attrs, [email protected] .styleable.Gallery, defStyle, 0); int index = a.getInt([email protected]_gravity, -1); if (index >= 0) { setGravity(index); } int animationDuration = a.getInt([email protected]_animationDuration , -1); if (animationDuration > 0) { setAnimationDuration(animationDuration); } int spacing = a.getDimensionPixelOffset([email protected]_spacing , 0); setSpacing(spacing); float unselectedAlpha = a.getFloat([email protected]_unselectedAlpha , 0.5f); setUnselectedAlpha(unselectedAlpha); a.recycle(); // We draw the selected item last (because otherwise the item to the // right overlaps it) mGroupFlags |= FLAG_USE_CHILD_DRAWING_ORDER; mGroupFlags |= FLAG_SUPPORT_STATIC_TRANSFORMATIONS; }
public Gallery(android.content.Context context, android.util.AttributeSet attrs) : this(context, attrs, [email protected]) { mFlingRunnable = new android.widget.Gallery.FlingRunnable(this); mDisableSuppressSelectionChangedRunnable = new _Runnable_122(this); }
public PrivilegedActionAnonymousInnerClassHelper(WaitDispatchSupport outerInstance, java.lang.Runnable run) { this.OuterInstance = outerInstance; this.Run = run; }