本文整理汇总了C#中EditText.SetOnEditorActionListener方法的典型用法代码示例。如果您正苦于以下问题:C# EditText.SetOnEditorActionListener方法的具体用法?C# EditText.SetOnEditorActionListener怎么用?C# EditText.SetOnEditorActionListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EditText
的用法示例。
在下文中一共展示了EditText.SetOnEditorActionListener方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreateView
public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
Dialog.SetTitle (GetString (Resource.String.sign_in));
var v = inflater.Inflate (Resource.Layout.fingerprint_dialog_container, container, false);
mCancelButton = (Button)v.FindViewById (Resource.Id.cancel_button);
mCancelButton.Click += (object sender, EventArgs e) => Dismiss ();
mSecondDialogButton = (Button)v.FindViewById (Resource.Id.second_dialog_button);
mSecondDialogButton.Click += (object sender, EventArgs e) => {
if (mStage == Stage.Fingerprint) {
GoToBackup ();
} else {
VerifyPassword ();
}
};
mFingerprintContent = v.FindViewById (Resource.Id.fingerprint_container);
mBackupContent = v.FindViewById (Resource.Id.backup_container);
mPassword = v.FindViewById<EditText> (Resource.Id.password);
mPassword.SetOnEditorActionListener (this);
mPasswordDescriptionTextView = v.FindViewById<TextView> (Resource.Id.password_description);
mUseFingerprintFutureCheckBox = v.FindViewById<CheckBox> (Resource.Id.use_fingerprint_in_future_check);
mNewFingerprintEnrolledTextView = v.FindViewById<TextView> (Resource.Id.new_fingerprint_enrolled_description);
mFingerprintUiHelper = mFingerprintUiHelperBuilder.Build (
(ImageView)v.FindViewById (Resource.Id.fingerprint_icon),
(TextView)v.FindViewById (Resource.Id.fingerprint_status), this);
UpdateStage ();
// If fingerprint authentication is not available, switch immediately to the backup
// (password) screen.
if (!mFingerprintUiHelper.IsFingerprintAuthAvailable)
GoToBackup ();
return v;
}
示例2: OnCreate
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.Login);
RequestedOrientation = ScreenOrientation.SensorPortrait;
Button button = FindViewById<Button>(Resource.Id.btLogin);
button.Click += btloginClick;
Button buttonForgot = FindViewById<Button>(Resource.Id.btForgot);
buttonForgot.Click += btForgotClick;
username = FindViewById<EditText>(Resource.Id.tv_username);
username.SetOnEditorActionListener (this);
password = FindViewById<EditText>(Resource.Id.tv_password);
password.SetOnEditorActionListener (this);
cb_rememberMe = FindViewById<CheckBox>(Resource.Id.cb_rememberMe);
cb_rememberMe.SetOnEditorActionListener (this);
var RemmemberMe = Settings.RememberMe;
if (RemmemberMe) {
cb_rememberMe.Checked = true;
var temp = Settings.Username;
username.Text = temp;
password.Text = Settings.Password;
}
var metrics = Resources.DisplayMetrics;
var widthInDp = ConvertPixelsToDp(metrics.WidthPixels);
var heightInDp = ConvertPixelsToDp(metrics.HeightPixels);
if (heightInDp > 1024) {
linearLayout4 = FindViewById<LinearLayout>(Resource.Id.linearLayout4);
ViewGroup.MarginLayoutParams ll = (ViewGroup.MarginLayoutParams)linearLayout4.LayoutParameters;
ll.TopMargin = 55;
}
Context context = this.ApplicationContext;
Version = context.PackageManager.GetPackageInfo(context.PackageName, 0).VersionName;
}
示例3: OnCreate
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.Login);
// Get our controls from the layout resource,
// and attach an event to it
login = FindViewById<Button> (Resource.Id.logIn);
userName = FindViewById<EditText> (Resource.Id.userName);
password = FindViewById<EditText> (Resource.Id.password);
progressIndicator = FindViewById<ProgressBar> (Resource.Id.loginProgress);
var loginHelp = FindViewById<ImageButton> (Resource.Id.loginQuestion);
//Set edit action listener to allow the next & go buttons on the input keyboard to interact with login.
userName.SetOnEditorActionListener (this);
password.SetOnEditorActionListener (this);
userName.TextChanged += (sender, e) => {
loginViewModel.Username = userName.Text;
};
password.TextChanged += (sender, e) => {
loginViewModel.Password = password.Text;
};
loginHelp.Click += (sender, e) => {
var builder = new AlertDialog.Builder (this)
.SetTitle ("Need Help?")
.SetMessage ("Enter any username or password.")
.SetPositiveButton ("Ok", (innerSender, innere) => { });
var dialog = builder.Create ();
dialog.Show ();
};
//initially set username & login
loginViewModel.Username = userName.Text;
loginViewModel.Password = password.Text;
//LogIn button click event
login.Click += (sender, e) => Login ();
//request focus to the edit text to start on username.
userName.RequestFocus ();
}
示例4: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate (bundle);
var app = PropertyCrossApplication.GetApplication(this);
app.CurrentActivity = this;
var uiMarshal = new MarshalInvokeService(app);
var source = new PropertyDataSource(new JsonWebPropertySearch(uiMarshal));
geoLocationService = new GeoLocationService(
(Android.Locations.LocationManager)GetSystemService(Context.LocationService), uiMarshal);
var stateService = new StatePersistenceService(app);
PropertyCrossPersistentState state = stateService.LoadState();
SetContentView (Resource.Layout.PropertyCrossView);
searchText = FindViewById<EditText>(Resource.Id.search);
searchText.TextChanged += delegate(object sender, Android.Text.TextChangedEventArgs e) {
String searchTerm = searchText.Text;
if (searchTerm != null)
{
searchTerm = searchTerm.Trim();
SearchTextChanged(this, new SearchTextChangedEventArgs(searchTerm));
}
};
searchText.SetOnEditorActionListener(this);
myLocationButton = FindViewById<Button>(Resource.Id.use_location);
myLocationButton.Click += LocationButton_Clicked;
startSearchButton = (Button) FindViewById(Resource.Id.do_search);
startSearchButton.Click += StartSearchButton_Clicked;
messageText = (TextView) FindViewById(Resource.Id.mainview_message);
resultsHeader = (TextView) FindViewById(Resource.Id.results_header);
resultsList = (ListView) FindViewById(Resource.Id.results_list);
resultsList.ItemClick += ResultsListItem_Clicked;
resultsList.Adapter = new RecentSearchAdapter(this, new List<RecentSearch>());
loadingAnimation = AnimationUtils.LoadAnimation(this, Resource.Animation.loading_rotate);
loadingAnimation.RepeatMode = RepeatMode.Restart;
presenter =
new PropertyCrossPresenter(state,
source,
new NavigationService(app),
geoLocationService);
presenter.SetView(this);
app.Presenter = presenter;
}
示例5: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate (bundle);
var app = PropertyFinderApplication.GetApplication(this);
app.CurrentActivity = this;
var uiMarshal = new MarshalInvokeService(app);
var source = new PropertyDataSource(new JsonWebPropertySearch(uiMarshal));
geoLocationService = new GeoLocationService((Android.Locations.LocationManager)GetSystemService(Context.LocationService), uiMarshal);
var stateService = new StatePersistenceService(app);
PropertyFinderPersistentState state = stateService.LoadState();
SetContentView (Resource.Layout.PropertyFinderView);
searchText = (EditText) FindViewById(Resource.Id.search);
searchText.TextChanged += SearchText_Changed;
searchText.SetOnEditorActionListener(this);
myLocationButton = (Button) FindViewById(Resource.Id.use_location);
myLocationButton.Click += LocationButton_Clicked;
startSearchButton = (Button) FindViewById(Resource.Id.do_search);
startSearchButton.Click += StartSearchButton_Clicked;
messageText = (TextView) FindViewById(Resource.Id.mainview_message);
resultsHeader = (TextView) FindViewById(Resource.Id.results_header);
resultsList = (ListView) FindViewById(Resource.Id.results_list);
resultsList.ItemClick += ResultsListItem_Clicked;
resultsList.Adapter = new RecentSearchAdapter(this, new List<RecentSearch>());;
presenter =
new PropertyFinderPresenter(state,
source,
new NavigationService(app),
geoLocationService);
presenter.SetView(this);
app.Presenter = presenter;
}
示例6: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
SetTitle(Resource.String.app_name);
mGetActivePromos = (Button)FindViewById(Resource.Id.getActivePromos);
mGetActivePromos.SetOnClickListener(this);
mAchievementId = (EditText)FindViewById(Resource.Id.achievementId);
mAchievementId.SetOnEditorActionListener(this);
mAchievementId.ImeOptions = ImeAction.Done;
mLeaderboardId = (EditText)FindViewById(Resource.Id.leaderboardId);
mLeaderboardId.SetOnEditorActionListener(this);
mLeaderboardId.ImeOptions = ImeAction.Done;
mUnlockAchievement = (Button)FindViewById(Resource.Id.unlockAchievement);
mUnlockAchievement.SetOnClickListener(this);
mSaveLeaderboard = (Button)FindViewById(Resource.Id.saveLeaderboard);
mSaveLeaderboard.SetOnClickListener(this);
mShowNotification = (Button)FindViewById(Resource.Id.showNotification);
mShowNotification.SetOnClickListener(this);
mShowFullscreen = (Button)FindViewById(Resource.Id.showFullscreen);
mShowFullscreen.SetOnClickListener(this);
mRewardActionToggle = (ToggleButton)FindViewById(Resource.Id.rewardActionToggle);
mPositionToggle = (ToggleButton)FindViewById(Resource.Id.positionToggle);
mNewActivity = (Button)FindViewById(Resource.Id.newActivity);
mNewActivity.SetOnClickListener(this);
if (bundle != null)
{
// Restore EditText fields
mAchievementId.Text = bundle.GetString("achievement_id");
mLeaderboardId.Text = bundle.GetString("leaderboard_id");
}
else
{
mAchievementId.Text = "com.jmawebtechnologies.gemfindermt.beatgame";
mLeaderboardId.Text = "com.jmawebtechnologies.gemfindermt.leaderboard.onethousand";
}
mActivePromosListener = new ActivePromosRequestListener(this);
mRewardsListener = new RewardRequestListener(this);
}
示例7: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.server_layout);
lblServerStatus = FindViewById<TextView>(Resource.Id.lblServerStatus);
txtPort = FindViewById<EditText>(Resource.Id.txtPort);
btnStart = FindViewById<Button>(Resource.Id.btnStart);
txtMessages = FindViewById<TextView>(Resource.Id.txtMessages);
btnStart.Click += BtnStart_Click;
txtPort.SetOnEditorActionListener(this);
socketServer = new SocketServer();
socketServer.StateChanged += SocketServer_StateChanged;
socketServer.ReceivedMessage += SocketServer_ReceivedMessage;
socketServer.HostAcceptConnection += SocketServer_HostAcceptConnection;
socketServer.HostClosedConnection += SocketServer_HostClosedConnection;
socketBroadcastClient = new SocketBroadcastClient(BROADCAST_PORT);
serverInfo = new ServerInfo();
serverInfo.id = Guid.NewGuid();
serverInfo.name = "Test 3";
socketBroadcastServer = new SocketBroadcastServer();
socketBroadcastServer.ReceivedMessage += SocketBroadcastServer_ReceivedMessage;
}
开发者ID:FreezeProSoft,项目名称:real-time-device-to-device-networking-server-discovery,代码行数:40,代码来源:ServerActivity.cs
示例8: OnCreate
protected override void OnCreate(Bundle bundle)
{
SetTheme(Settings.ThemeSetting == 0 ? Resource.Style.MyTheme : Resource.Style.MyThemeDark);
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
m_OriginalTheme = Settings.ThemeSetting;
m_OriginalAccent = Settings.ThemeAccent;
Window.SetSoftInputMode(SoftInput.StateAlwaysHidden);
m_AllTasks = new JavaList<TaskModel>();
m_EditTaskPosition = 0;
m_AddButton = FindViewById<ImageButton>(Resource.Id.button_add_task);
m_MicrophoneButton = FindViewById<ImageButton>(Resource.Id.button_microphone);
m_TaskEditText = FindViewById<EditText>(Resource.Id.edit_text_new_task);
ActionBar = FindViewById<ActionBar.ActionBar>(Resource.Id.actionbar);
//ActionBar.BackgroundDrawable = Resources.GetDrawable(Resource.Drawable.actionbar_background_blue);
//ActionBar.ItemBackgroundDrawable = Resources.GetDrawable(Resource.Drawable.actionbar_btn_blue);
//ActionBar.SeparatorColor = Resources.GetColor(Resource.Color.actionbar_separatorcolor_blue);
ActionBar.Title = "Tasks";
ActionBar.CurrentActivity = this;
ActionBar.SetHomeLogo(Resource.Drawable.ic_launcher);
RegisterForContextMenu(ListView);
m_TaskEditText.SetOnEditorActionListener(this);
ListView.ChoiceMode = ChoiceMode.Multiple;
m_AddButton.Click += (sender, args) => AddNewTask();
m_AddButton.SetImageResource(Settings.ThemeSetting == 0 ? Resource.Drawable.ic_action_add : Resource.Drawable.ic_action_add_dark);
m_MicrophoneButton.SetImageResource(Settings.ThemeSetting == 0 ? Resource.Drawable.ic_action_microphone : Resource.Drawable.ic_action_microphone_dark);
m_AddButton.SetBackgroundResource(Settings.ImageButtonDrawable);
m_MicrophoneButton.SetBackgroundResource(Settings.ImageButtonDrawable);
// remove speech if it doesn't exist
var activities =PackageManager.QueryIntentActivities(new Intent(RecognizerIntent.ActionRecognizeSpeech), 0);
if (activities.Count == 0)
{
m_MicrophoneButton.Visibility = ViewStates.Gone;
}
else
{
m_MicrophoneButton.Click += (sender, args) => StartVoiceRecognitionActivity();
}
m_TextToSpeech = new TextToSpeech(this, this);
var saveState = LastNonConfigurationInstance as SaveState;
if (saveState != null)
{
m_AllTasks = new JavaList<TaskModel>(saveState.Tasks);
ListView.Visibility = ViewStates.Visible;
RunOnUiThread(() => ListAdapter = new TaskAdapter(this, m_AllTasks));
RunOnUiThread(() => ListView.SetSelection(saveState.LastPosition));
SetChecks();
m_TaskEditText.Text = saveState.NewTaskText;
m_Editing = saveState.Editing;
m_EditTaskPosition = saveState.EditIndex;
}
else
{
FlurryAgent.OnPageView();
FlurryAgent.LogEvent("MainActivity");
ReloadData(0);
}
SetActionBar();
try
{
if(Intent.GetBooleanExtra("CameFromWidget", false))
{
FocusMainText();
return;
}
if(Intent.Action == TaskWidgetProvider.UpdateIntent)
if (Intent.ActionSend != Intent.Action || Intent.Type == null)
return;
if ("text/plain" != Intent.Type)
return;
var sharedText = Intent.GetStringExtra(Intent.ExtraText);
if (!string.IsNullOrEmpty(sharedText))
{
m_TaskEditText.Text = sharedText;
m_Editing = false;
SetActionBar();
}
}
//.........这里部分代码省略.........