本文整理汇总了C#中EditText.addTextChangedListener方法的典型用法代码示例。如果您正苦于以下问题:C# EditText.addTextChangedListener方法的具体用法?C# EditText.addTextChangedListener怎么用?C# EditText.addTextChangedListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EditText
的用法示例。
在下文中一共展示了EditText.addTextChangedListener方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: onCreateView
public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View rootView = inflater.inflate(R.layout.textchat_fragment_layout, container, false);
mListView = (ListView) rootView.findViewById(R.id.msgs_list);
mSendButton = (Button) rootView.findViewById(R.id.send_button);
mMsgCharsView = (TextView) rootView.findViewById(R.id.characteres_msg);
mMsgCharsView.Text = maxTextLength.ToString();
mMsgNotificationView = (TextView) rootView.findViewById(R.id.new_msg_notification);
mMsgEditText = (EditText) rootView.findViewById(R.id.edit_msg);
mMsgDividerView = (View) rootView.findViewById(R.id.divider_notification);
mMsgEditText.addTextChangedListener(mTextEditorWatcher);
mSendButton.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this);
mMessageAdapter = new MessageAdapter(Activity, R.layout.sent_msg_row_layout, mMsgsList);
mListView.Adapter = mMessageAdapter;
mMsgNotificationView.OnTouchListener = new OnTouchListenerAnonymousInnerClassHelper(this);
return rootView;
}
示例2: showChannelInputDialog
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
//ORIGINAL LINE: private void showChannelInputDialog(final int interfaceType)
private void showChannelInputDialog(int interfaceType)
{
// Dialog to input the name of channel to join.
LinearLayout mlayout = new LinearLayout(this);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
mlayout.LayoutParams = lp;
mlayout.Orientation = LinearLayout.VERTICAL;
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final android.widget.EditText input = new android.widget.EditText(this);
EditText input = new EditText(this);
LinearLayout.LayoutParams lp2 = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
input.LayoutParams = lp2;
input.Hint = CHORD_SECURE_TEST_CHANNEL;
input.LongClickable = false;
input.MaxHeight = 500;
input.OnTouchListener = new OnTouchListenerAnonymousInnerClassHelper(this);
// Set checkBox to use secure channel
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final android.widget.CheckBox mCheck = new android.widget.CheckBox(this);
CheckBox mCheck = new CheckBox(this);
mCheck.Text = "Use Secure Channel";
mCheck.TextColor = Color.BLACK;
/// <summary>
///*******************************************************************
/// 5. If you want to use secured channel, add prefix to your channel
/// name SECURE_PREFIX : Prefix to secured channel name
/// ********************************************************************
/// </summary>
// Get keyboard inputs to add prefix to secured channel name
input.addTextChangedListener(new TextWatcherAnonymousInnerClassHelper(this, input, mCheck));
// Get Change of CheckBox to add prefix to secured channel name
mCheck.OnCheckedChangeListener = new OnCheckedChangeListenerAnonymousInnerClassHelper(this, input);
mlayout.addView(input);
mlayout.addView(mCheck);
AlertDialog alertDialog = (new AlertDialog.Builder(this, AlertDialog.THEME_HOLO_LIGHT)).setTitleuniquetempvar.setMessage([email protected]_channel_name).setView(mlayout).setPositiveButton([email protected], new OnClickListenerAnonymousInnerClassHelper(this, interfaceType, input, mCheck))
.setNegativeButton([email protected], new OnClickListenerAnonymousInnerClassHelper2(this, input))
.create();
alertDialog.show();
}