예제 #1
0
 public virtual void initForMode(android.view.ActionMode mode)
 {
     if (mClose == null)
     {
         android.view.LayoutInflater inflater = android.view.LayoutInflater.from(mContext);
         mClose = inflater.inflate([email protected]_mode_close_item, this
                                   , false);
         addView(mClose);
     }
     else
     {
         if (mClose.getParent() == null)
         {
             addView(mClose);
         }
     }
     android.view.View closeButton = mClose.findViewById([email protected]_mode_close_button
                                                         );
     closeButton.setOnClickListener(new _OnClickListener_212(mode));
     [email protected] menu = ([email protected]
                                                     )mode.getMenu();
     mActionMenuPresenter = new [email protected](mContext
                                                                                );
     mActionMenuPresenter.setReserveOverflow(true);
     android.view.ViewGroup.LayoutParams layoutParams = new android.view.ViewGroup.LayoutParams
                                                            (android.view.ViewGroup.LayoutParams.WRAP_CONTENT, android.view.ViewGroup.LayoutParams
                                                            .MATCH_PARENT);
     if (!mSplitActionBar)
     {
         menu.addMenuPresenter(mActionMenuPresenter);
         mMenuView = ([email protected])mActionMenuPresenter.getMenuView
                         (this);
         mMenuView.setBackgroundDrawable(null);
         addView(mMenuView, layoutParams);
     }
     else
     {
         // Allow full screen width in split mode.
         mActionMenuPresenter.setWidthLimit(getContext().getResources().getDisplayMetrics(
                                                ).widthPixels, true);
         // No limit to the item count; use whatever will fit.
         mActionMenuPresenter.setItemLimit(int.MaxValue);
         // Span the whole width
         layoutParams.width  = android.view.ViewGroup.LayoutParams.MATCH_PARENT;
         layoutParams.height = mContentHeight;
         menu.addMenuPresenter(mActionMenuPresenter);
         mMenuView = ([email protected])mActionMenuPresenter.getMenuView
                         (this);
         mMenuView.setBackgroundDrawable(mSplitBackground);
         mSplitView.addView(mMenuView, layoutParams);
     }
     mAnimateInOnLayout = true;
 }
예제 #2
0
 public virtual void setPresenter([email protected]
                                  presenter)
 {
     mPresenter = presenter;
 }
예제 #3
0
		public virtual void setPresenter([email protected] 
			presenter)
		{
			mPresenter = presenter;
		}
예제 #4
0
		public virtual void initForMode(android.view.ActionMode mode)
		{
			if (mClose == null)
			{
				android.view.LayoutInflater inflater = android.view.LayoutInflater.from(mContext);
				mClose = inflater.inflate([email protected]_mode_close_item, this
					, false);
				addView(mClose);
			}
			else
			{
				if (mClose.getParent() == null)
				{
					addView(mClose);
				}
			}
			android.view.View closeButton = mClose.findViewById([email protected]_mode_close_button
				);
			closeButton.setOnClickListener(new _OnClickListener_212(mode));
			[email protected] menu = ([email protected]
				)mode.getMenu();
			mActionMenuPresenter = new [email protected](mContext
				);
			mActionMenuPresenter.setReserveOverflow(true);
			android.view.ViewGroup.LayoutParams layoutParams = new android.view.ViewGroup.LayoutParams
				(android.view.ViewGroup.LayoutParams.WRAP_CONTENT, android.view.ViewGroup.LayoutParams
				.MATCH_PARENT);
			if (!mSplitActionBar)
			{
				menu.addMenuPresenter(mActionMenuPresenter);
				mMenuView = ([email protected])mActionMenuPresenter.getMenuView
					(this);
				mMenuView.setBackgroundDrawable(null);
				addView(mMenuView, layoutParams);
			}
			else
			{
				// Allow full screen width in split mode.
				mActionMenuPresenter.setWidthLimit(getContext().getResources().getDisplayMetrics(
					).widthPixels, true);
				// No limit to the item count; use whatever will fit.
				mActionMenuPresenter.setItemLimit(int.MaxValue);
				// Span the whole width
				layoutParams.width = android.view.ViewGroup.LayoutParams.MATCH_PARENT;
				layoutParams.height = mContentHeight;
				menu.addMenuPresenter(mActionMenuPresenter);
				mMenuView = ([email protected])mActionMenuPresenter.getMenuView
					(this);
				mMenuView.setBackgroundDrawable(mSplitBackground);
				mSplitView.addView(mMenuView, layoutParams);
			}
			mAnimateInOnLayout = true;
		}