当前位置: 首页>>代码示例>>C#>>正文


C# EditText.SetRawInputType方法代码示例

本文整理汇总了C#中EditText.SetRawInputType方法的典型用法代码示例。如果您正苦于以下问题:C# EditText.SetRawInputType方法的具体用法?C# EditText.SetRawInputType怎么用?C# EditText.SetRawInputType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EditText的用法示例。


在下文中一共展示了EditText.SetRawInputType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnCreate

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate (savedInstanceState);
            SetContentView(Resource.Layout.StudyVocab);

            parentView = (LinearLayout)FindViewById (Resource.Id.abc);
            kanjiText = (TextView) FindViewById (Resource.Id.kanji);
            typeText = (TextView) FindViewById (Resource.Id.type);
            guessText = (EditText) FindViewById (Resource.Id.shark);

            guessText.SetRawInputType (InputTypes.TextFlagNoSuggestions);
            guessText.SetOnKeyListener(new MyKeyListener(this));
            guessText.AddTextChangedListener (new MyTextListener (this));

            var button = FindViewById<Button>(Resource.Id.submit);
            button.Click += (sender, e) => {
                SubmitGuess();
            };

            conversion();
            DisplayNewWord ();
        }
开发者ID:jkstrawn,项目名称:wanikani_android,代码行数:22,代码来源:StudyActivity.cs

示例2: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            // Get our button from the layout resource,
            // and attach an event to it
            _button = FindViewById<Button>(Resource.Id.MyButton);
            _yearGot = FindViewById<EditText>(Resource.Id.Year);
            _validationText = FindViewById<TextView>(Resource.Id.validationText);
            _kmGot = FindViewById<EditText>(Resource.Id.Km);

            _yearGot.SetRawInputType(InputTypes.ClassNumber);
            _kmGot.SetRawInputType(InputTypes.ClassNumber);

            _button.Click += delegate
            {
                _validationMsg = Validation();
                _validationText.Text = "";
                _validationText.Text = string.Format("Mileage is {0}.\n Reasonable range is {1} ~ {2}.", _validationMsg, _calKmMin, _calKmMax);
            };
        }
开发者ID:crazybee,项目名称:KMValidator,代码行数:24,代码来源:MainActivity.cs


注:本文中的EditText.SetRawInputType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。