Esempio n. 1
0
 /// <summary>Remove a previously installed global layout callback</summary>
 /// <param name="victim">The callback to remove</param>
 /// <exception cref="System.InvalidOperationException">
 /// If
 /// <see cref="isAlive()">isAlive()</see>
 /// returns false
 /// </exception>
 /// <seealso cref="addOnGlobalLayoutListener(OnGlobalLayoutListener)">addOnGlobalLayoutListener(OnGlobalLayoutListener)
 ///     </seealso>
 public void removeGlobalOnLayoutListener(android.view.ViewTreeObserver.OnGlobalLayoutListener
                                          victim)
 {
     checkIsAlive();
     if (mOnGlobalLayoutListeners == null)
     {
         return;
     }
     mOnGlobalLayoutListeners.remove(victim);
 }
Esempio n. 2
0
 /// <summary>
 /// Register a callback to be invoked when the global layout state or the visibility of views
 /// within the view tree changes
 /// </summary>
 /// <param name="listener">The callback to add</param>
 /// <exception cref="System.InvalidOperationException">
 /// If
 /// <see cref="isAlive()">isAlive()</see>
 /// returns false
 /// </exception>
 public void addOnGlobalLayoutListener(android.view.ViewTreeObserver.OnGlobalLayoutListener
                                       listener)
 {
     checkIsAlive();
     if (mOnGlobalLayoutListeners == null)
     {
         mOnGlobalLayoutListeners = new java.util.concurrent.CopyOnWriteArrayList <android.view.ViewTreeObserver
                                                                                   .OnGlobalLayoutListener>();
     }
     mOnGlobalLayoutListeners.add(listener);
 }
Esempio n. 3
0
 public void removeGlobalOnLayoutListener(android.view.ViewTreeObserver.OnGlobalLayoutListener arg0)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::android.view.ViewTreeObserver._removeGlobalOnLayoutListener9668, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.view.ViewTreeObserver.staticClass, global::android.view.ViewTreeObserver._removeGlobalOnLayoutListener9668, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
 }
Esempio n. 4
0
 /// <summary>Create a new instance.</summary>
 /// <remarks>Create a new instance.</remarks>
 /// <param name="context">The application environment.</param>
 /// <param name="attrs">A collection of attributes.</param>
 /// <param name="defStyle">The default style to apply to this view.</param>
 public ActivityChooserView(android.content.Context context, android.util.AttributeSet
                            attrs, int defStyle) : base(context, attrs, defStyle)
 {
     mModelDataSetOberver    = new _DataSetObserver_118(this);
     mOnGlobalLayoutListener = new _OnGlobalLayoutListener_132(this);
     android.content.res.TypedArray attributesArray = context.obtainStyledAttributes(attrs
                                                                                     , [email protected], defStyle, 0);
     mInitialActivityCount = attributesArray.getInt([email protected]_initialActivityCount
                                                    , android.widget.ActivityChooserView.ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_DEFAULT
                                                    );
     android.graphics.drawable.Drawable expandActivityOverflowButtonDrawable = attributesArray
                                                                               .getDrawable([email protected]_expandActivityOverflowButtonDrawable
                                                                                            );
     attributesArray.recycle();
     android.view.LayoutInflater inflater = android.view.LayoutInflater.from(mContext);
     inflater.inflate([email protected]_chooser_view, this, true);
     mCallbacks = new android.widget.ActivityChooserView.Callbacks(this);
     mActivityChooserContent = (android.widget.LinearLayout)findViewById([email protected]
                                                                         .id.activity_chooser_view_content);
     mActivityChooserContentBackground = mActivityChooserContent.getBackground();
     mDefaultActivityButton            = (android.widget.FrameLayout)findViewById([email protected]
                                                                                  .id.default_activity_button);
     mDefaultActivityButton.setOnClickListener(mCallbacks);
     mDefaultActivityButton.setOnLongClickListener(mCallbacks);
     mDefaultActivityButtonImage = (android.widget.ImageView)mDefaultActivityButton.findViewById
                                       ([email protected]);
     mExpandActivityOverflowButton = (android.widget.FrameLayout)findViewById([email protected]
                                                                              .id.expand_activities_button);
     mExpandActivityOverflowButton.setOnClickListener(mCallbacks);
     mExpandActivityOverflowButtonImage = (android.widget.ImageView)mExpandActivityOverflowButton
                                          .findViewById([email protected]);
     mExpandActivityOverflowButtonImage.setImageDrawable(expandActivityOverflowButtonDrawable
                                                         );
     mAdapter = new android.widget.ActivityChooserView.ActivityChooserViewAdapter(this
                                                                                  );
     mAdapter.registerDataSetObserver(new _DataSetObserver_239(this));
     android.content.res.Resources resources = context.getResources();
     mListPopupMaxWidth = System.Math.Max(resources.getDisplayMetrics().widthPixels /
                                          2, resources.getDimensionPixelSize([email protected]_prefDialogWidth
                                                                             ));
 }
Esempio n. 5
0
		/// <summary>Create a new instance.</summary>
		/// <remarks>Create a new instance.</remarks>
		/// <param name="context">The application environment.</param>
		/// <param name="attrs">A collection of attributes.</param>
		/// <param name="defStyle">The default style to apply to this view.</param>
		public ActivityChooserView(android.content.Context context, android.util.AttributeSet
			 attrs, int defStyle) : base(context, attrs, defStyle)
		{
			mModelDataSetOberver = new _DataSetObserver_118(this);
			mOnGlobalLayoutListener = new _OnGlobalLayoutListener_132(this);
			android.content.res.TypedArray attributesArray = context.obtainStyledAttributes(attrs
				, [email protected], defStyle, 0);
			mInitialActivityCount = attributesArray.getInt([email protected]_initialActivityCount
				, android.widget.ActivityChooserView.ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_DEFAULT
				);
			android.graphics.drawable.Drawable expandActivityOverflowButtonDrawable = attributesArray
				.getDrawable([email protected]_expandActivityOverflowButtonDrawable
				);
			attributesArray.recycle();
			android.view.LayoutInflater inflater = android.view.LayoutInflater.from(mContext);
			inflater.inflate([email protected]_chooser_view, this, true);
			mCallbacks = new android.widget.ActivityChooserView.Callbacks(this);
			mActivityChooserContent = (android.widget.LinearLayout)findViewById([email protected]
				.id.activity_chooser_view_content);
			mActivityChooserContentBackground = mActivityChooserContent.getBackground();
			mDefaultActivityButton = (android.widget.FrameLayout)findViewById([email protected]
				.id.default_activity_button);
			mDefaultActivityButton.setOnClickListener(mCallbacks);
			mDefaultActivityButton.setOnLongClickListener(mCallbacks);
			mDefaultActivityButtonImage = (android.widget.ImageView)mDefaultActivityButton.findViewById
				([email protected]);
			mExpandActivityOverflowButton = (android.widget.FrameLayout)findViewById([email protected]
				.id.expand_activities_button);
			mExpandActivityOverflowButton.setOnClickListener(mCallbacks);
			mExpandActivityOverflowButtonImage = (android.widget.ImageView)mExpandActivityOverflowButton
				.findViewById([email protected]);
			mExpandActivityOverflowButtonImage.setImageDrawable(expandActivityOverflowButtonDrawable
				);
			mAdapter = new android.widget.ActivityChooserView.ActivityChooserViewAdapter(this
				);
			mAdapter.registerDataSetObserver(new _DataSetObserver_239(this));
			android.content.res.Resources resources = context.getResources();
			mListPopupMaxWidth = System.Math.Max(resources.getDisplayMetrics().widthPixels / 
				2, resources.getDimensionPixelSize([email protected]_prefDialogWidth
				));
		}
Esempio n. 6
0
		/// <summary>Create a new instance.</summary>
		/// <remarks>Create a new instance.</remarks>
		/// <param name="context">The application environment.</param>
		/// <param name="attrs">A collection of attributes.</param>
		public ActivityChooserView(android.content.Context context, android.util.AttributeSet
			 attrs) : this(context, attrs, 0)
		{
			mModelDataSetOberver = new _DataSetObserver_118(this);
			mOnGlobalLayoutListener = new _OnGlobalLayoutListener_132(this);
		}
Esempio n. 7
0
		/// <summary>Create a new instance.</summary>
		/// <remarks>Create a new instance.</remarks>
		/// <param name="context">The application environment.</param>
		public ActivityChooserView(android.content.Context context) : this(context, null)
		{
			mModelDataSetOberver = new _DataSetObserver_118(this);
			mOnGlobalLayoutListener = new _OnGlobalLayoutListener_132(this);
		}
Esempio n. 8
0
 /// <summary>Create a new instance.</summary>
 /// <remarks>Create a new instance.</remarks>
 /// <param name="context">The application environment.</param>
 /// <param name="attrs">A collection of attributes.</param>
 public ActivityChooserView(android.content.Context context, android.util.AttributeSet
                            attrs) : this(context, attrs, 0)
 {
     mModelDataSetOberver    = new _DataSetObserver_118(this);
     mOnGlobalLayoutListener = new _OnGlobalLayoutListener_132(this);
 }
Esempio n. 9
0
 /// <summary>Create a new instance.</summary>
 /// <remarks>Create a new instance.</remarks>
 /// <param name="context">The application environment.</param>
 public ActivityChooserView(android.content.Context context) : this(context, null)
 {
     mModelDataSetOberver    = new _DataSetObserver_118(this);
     mOnGlobalLayoutListener = new _OnGlobalLayoutListener_132(this);
 }