コード例 #1
0
		public override void onPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent
			 @event)
		{
			base.onPopulateAccessibilityEvent(@event);
			java.lang.CharSequence cdesc = getContentDescription();
			if (!android.text.TextUtils.isEmpty(cdesc))
			{
				@event.getText().add(cdesc);
			}
		}
コード例 #2
0
ファイル: CheckedTextView.cs プロジェクト: hakeemsm/XobotOS
		public override void onPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent
			 @event)
		{
			base.onPopulateAccessibilityEvent(@event);
			if (isChecked())
			{
				@event.getText().add(java.lang.CharSequenceProxy.Wrap(mContext.getString([email protected]
					[email protected]_selected)));
			}
			else
			{
				@event.getText().add(java.lang.CharSequenceProxy.Wrap(mContext.getString([email protected]
					[email protected]_not_selected)));
			}
		}
コード例 #3
0
ファイル: ComponentInfo.cs プロジェクト: hakeemsm/XobotOS
		public override java.lang.CharSequence loadLabel(android.content.pm.PackageManager
			 pm)
		{
			if (nonLocalizedLabel != null)
			{
				return nonLocalizedLabel;
			}
			android.content.pm.ApplicationInfo ai = applicationInfo;
			java.lang.CharSequence label;
			if (labelRes != 0)
			{
				label = pm.getText(packageName, labelRes, ai);
				if (label != null)
				{
					return label;
				}
			}
			if (ai.nonLocalizedLabel != null)
			{
				return ai.nonLocalizedLabel;
			}
			if (ai.labelRes != 0)
			{
				label = pm.getText(packageName, ai.labelRes, ai);
				if (label != null)
				{
					return label;
				}
			}
			return java.lang.CharSequenceProxy.Wrap(name);
		}
コード例 #4
0
ファイル: Activity.cs プロジェクト: hakeemsm/XobotOS
		public virtual bool dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent
			 @event)
		{
			@event.setClassName(java.lang.CharSequenceProxy.Wrap(GetType().FullName));
			@event.setPackageName(java.lang.CharSequenceProxy.Wrap(getPackageName()));
			android.view.ViewGroup.LayoutParams @params = getWindow().getAttributes();
			bool isFullScreen = (@params.width == android.view.ViewGroup.LayoutParams.MATCH_PARENT
				) && (@params.height == android.view.ViewGroup.LayoutParams.MATCH_PARENT);
			@event.setFullScreen(isFullScreen);
			java.lang.CharSequence title = getTitle();
			if (!android.text.TextUtils.isEmpty(title))
			{
				@event.getText().add(title);
			}
			return true;
		}
コード例 #5
0
		/// <summary>Allows enter key resources to be overridden</summary>
		/// <param name="res">resources to grab given items from</param>
		/// <param name="previewId">preview drawable shown on enter key</param>
		/// <param name="iconId">normal drawable shown on enter key</param>
		/// <param name="labelId">string shown on enter key</param>
		internal virtual void setEnterKeyResources(android.content.res.Resources res, int
			 previewId, int iconId, int labelId)
		{
			if (mEnterKey != null)
			{
				// Reset some of the rarely used attributes.
				mEnterKey.popupCharacters = null;
				mEnterKey.popupResId = 0;
				mEnterKey.text = null;
				mEnterKey.iconPreview = res.getDrawable(previewId);
				mEnterKey.icon = res.getDrawable(iconId);
				mEnterKey.label = res.getText(labelId);
				// Set the initial size of the preview icon
				if (mEnterKey.iconPreview != null)
				{
					mEnterKey.iconPreview.setBounds(0, 0, mEnterKey.iconPreview.getIntrinsicWidth(), 
						mEnterKey.iconPreview.getIntrinsicHeight());
				}
			}
		}