예제 #1
0
        void CreateNewFacebookUser(string[] DateUtilizatorNou)
        {
            ParolaText.ClearFocus();

            Login_SignUpUsingFacebook_DialogFragment diag = new Login_SignUpUsingFacebook_DialogFragment(DateUtilizatorNou);

            diag.Show(SupportFragmentManager, "frag1");
        }
예제 #2
0
        public bool OnEditorAction(TextView v, ImeAction actionId, KeyEvent e)
        {
            if (actionId == ImeAction.Search)
            {
                try
                {
                    SearchText = v.Text;

                    SearchView.ClearFocus();
                    v.ClearFocus();

                    MAdapter.UserList.Clear();
                    MAdapter.NotifyDataSetChanged();

                    OffsetUser = "******";

                    if (Methods.CheckConnectivity())
                    {
                        if (MAdapter.UserList.Count > 0)
                        {
                            MAdapter.UserList.Clear();
                            MAdapter.NotifyDataSetChanged();
                        }

                        ProgressBarLoader.Visibility = ViewStates.Visible;
                        EmptyStateLayout.Visibility  = ViewStates.Gone;
                        StartApiService();
                    }
                    else
                    {
                        if (Inflated == null)
                        {
                            Inflated = EmptyStateLayout.Inflate();
                        }

                        EmptyStateInflater x = new EmptyStateInflater();
                        x.InflateLayout(Inflated, EmptyStateInflater.Type.NoConnection);
                        if (!x.EmptyStateButton.HasOnClickListeners)
                        {
                            x.EmptyStateButton.Click -= EmptyStateButtonOnClick;
                            x.EmptyStateButton.Click -= TryAgainButton_Click;
                        }

                        x.EmptyStateButton.Click    += TryAgainButton_Click;
                        ProgressBarLoader.Visibility = ViewStates.Gone;
                        EmptyStateLayout.Visibility  = ViewStates.Visible;
                    }
                }
                catch (Exception exception)
                {
                    Console.WriteLine(exception);
                }

                return(true);
            }

            return(false);
        }
        public bool OnEditorAction(TextView v, [GeneratedEnum] ImeAction actionId, KeyEvent e)
        {
            if (actionId == ImeAction.Search)
            {
                SearchText = v.Text;

                SearchView.ClearFocus();
                v.ClearFocus();

                SearchViewOnQueryTextSubmit(SearchText);

                SearchView.ClearFocus();
                v.ClearFocus();

                return(true);
            }

            return(false);
        }
예제 #4
0
 public static void ClearFocus(this TextView textView, Context context, string name)
 {
     if (textView == null)
     {
         return;
     }
     textView.Focusable            = true;
     textView.FocusableInTouchMode = true;
     textView.ClearFocus();
 }
        public bool OnEditorAction(TextView v, [GeneratedEnum] ImeAction actionId, KeyEvent e)
        {
            switch (actionId)
            {
            case ImeAction.Search:
                SearchText = v.Text;

                SearchView.ClearFocus();
                v.ClearFocus();

                SearchViewOnQueryTextSubmit(SearchText);

                SearchView.ClearFocus();
                v.ClearFocus();

                return(true);

            default:
                return(false);
            }
        }
예제 #6
0
        public bool OnEditorAction(TextView v, [GeneratedEnum] ImeAction actionId, KeyEvent e)
        {
            if (actionId == ImeAction.Search)
            {
                SearchText = v.Text;

                SearchView.ClearFocus();
                v.ClearFocus();

                SearchViewOnQueryTextSubmit(SearchText);

                SearchView.ClearFocus();
                v.ClearFocus();

                //var input = (InputMethodManager)Activity.GetSystemService(Android.Content.Context.InputMethodService);


                return(true);
            }

            return(false);
        }
예제 #7
0
            public override void ResignFirstResponder( )
            {
                // only allow this text edit to hide the keyboard if it's the text field with focus.
                Activity activity = ( Activity )Rock.Mobile.PlatformSpecific.Android.Core.Context;

                if (activity.CurrentFocus != null && (activity.CurrentFocus as EditText) == TextView)
                {
                    InputMethodManager imm = ( InputMethodManager )Rock.Mobile.PlatformSpecific.Android.Core.Context.GetSystemService(Android.Content.Context.InputMethodService);

                    imm.HideSoftInputFromWindow(TextView.WindowToken, 0);

                    // yeild focus to the dummy view so the text field clears it's caret and the selected outline
                    TextView.ClearFocus( );
                    //DummyView.RequestFocus( );
                }
            }
예제 #8
0
        public void actionGo(View v)          //(object sender, EventArgs e)
        {
            TextView txtInput  = FindViewById <TextView>(Resource.Id.txtInput);
            TextView txtOutput = FindViewById <TextView>(Resource.Id.txtOutput);

            txtInput.ClearFocus();
            txtOutput.Text = (CSharpTransform.transform(txtInput.Text.ToString()));
            //TEST:
            for (var j = 0; j < 100; j++)
            {
                var start = DateTime.Now;
                for (var i = 0; i < 10000; i++)
                {
                    String output = CSharpTransform.transform("sirap");
                }
                var stop          = DateTime.Now;
                var executionTime = stop - start;
                Console.WriteLine(executionTime.TotalMilliseconds);
            }
        }
예제 #9
0
        private void GetCustomers_Click(object sender, System.EventArgs e)
        {
            var client  = new RestClient(ctAPIURI + "financial/accountsReceivable/customer/query");
            var request = new RestRequest(Method.POST);

            request.RequestFormat = DataFormat.Json;
            request.AddHeader("Content-Type", "application/json");

            TextView searchEntry = FindViewById <TextView>(Resource.Id.entry);

            var requestObject = new List <Classes.NameValuePairs>
            {
                new Classes.NameValuePairs {
                    name = "CustID", value = searchEntry.Text.Trim() + "%"
                }
            };

            string requestBody = Newtonsoft.Json.JsonConvert.SerializeObject(requestObject,
                                                                             Newtonsoft.Json.Formatting.Indented,
                                                                             new Newtonsoft.Json.JsonSerializerSettings
            {
                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore
            });

            request.AddParameter("application/json", requestBody, ParameterType.RequestBody);
            request.AddParameter("Authorization", Authorization, ParameterType.HttpHeader);

            IRestResponse response = client.Execute(request);

            mCustomerList = Newtonsoft.Json.JsonConvert.DeserializeObject <List <Classes.Customer> >(response.Content);

            ListView customerList = FindViewById <ListView>(Resource.Id.customerList);

            customerList.Adapter    = new Classes.CustomListAdapter(this, mCustomerList);
            customerList.ItemClick += CustomerList_ItemClick;

            searchEntry.ClearFocus();
        }