private void InitToolbar() { try { var toolbar = FindViewById <Toolbar>(Resource.Id.toolbar); if (toolbar != null) { toolbar.Title = ""; toolbar.SetTitleTextColor(Color.White); SetSupportActionBar(toolbar); SupportActionBar.SetDisplayShowCustomEnabled(true); SupportActionBar.SetDisplayHomeAsUpEnabled(true); SupportActionBar.SetHomeButtonEnabled(true); SupportActionBar.SetDisplayShowHomeEnabled(true); } SearchView = FindViewById <AutoCompleteTextView>(Resource.Id.searchBox); SearchView.SetOnEditorActionListener(this); //SearchView.ClearFocus(); //Change text colors SearchView.SetHintTextColor(Color.Gray); SearchView.SetTextColor(AppSettings.SetTabDarkTheme ? Color.White : Color.Black); } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }
private void InitToolbar() { try { Toolbar = FindViewById <Toolbar>(Resource.Id.toolbar); if (Toolbar != null) { Toolbar.Title = " "; Toolbar.SetTitleTextColor(Color.White); SetSupportActionBar(Toolbar); SupportActionBar.SetDisplayShowCustomEnabled(true); SupportActionBar.SetDisplayHomeAsUpEnabled(true); SupportActionBar.SetHomeButtonEnabled(true); SupportActionBar.SetDisplayShowHomeEnabled(true); } SearchView = FindViewById <AutoCompleteTextView>(Resource.Id.searchBox); SearchView.SetOnEditorActionListener(this); //SearchView.ClearFocus(); //Change text colors SearchView.SetHintTextColor(Color.ParseColor("#efefef")); SearchView.SetTextColor(Color.White); } catch (Exception e) { Console.WriteLine(e); } }
private void InitToolbar() { try { var toolBar = FindViewById <Toolbar>(Resource.Id.toolbar); if (toolBar != null) { toolBar.Title = ""; toolBar.SetTitleTextColor(Color.ParseColor(AppSettings.MainColor)); SetSupportActionBar(toolBar); SupportActionBar.SetDisplayShowCustomEnabled(true); SupportActionBar.SetDisplayHomeAsUpEnabled(true); SupportActionBar.SetHomeButtonEnabled(true); SupportActionBar.SetDisplayShowHomeEnabled(true); SupportActionBar.SetHomeAsUpIndicator(AppCompatResources.GetDrawable(this, AppSettings.FlowDirectionRightToLeft ? Resource.Drawable.ic_action_right_arrow_color : Resource.Drawable.ic_action_left_arrow_color)); } SearchView = FindViewById <AutoCompleteTextView>(Resource.Id.searchBox); SearchView.SetOnEditorActionListener(this); //SearchView.ClearFocus(); //Change text colors SearchView.SetHintTextColor(Color.Gray); SearchView.SetTextColor(AppSettings.SetTabDarkTheme ? Color.White : Color.Black); } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }
private void Setup() { autoCompleteTextView = FindViewById <AutoCompleteTextView>(Resource.Id.autocompletetextview_auth); autoCompleteTextView.SetOnEditorActionListener(this); textChangeListener = new TextChangeListener(this, autoCompleteTextView); autoCompleteTextView.AddTextChangedListener(textChangeListener); var buttonAuth = FindViewById <Button>(Resource.Id.button_auth); buttonAuth.Click += ButtonAuth_Click; var skipAuthTextView = FindViewById <TextView>(Resource.Id.textview_auth_skip); skipAuthTextView.Click += SkipAuthTextView_Click; scheduleSettings = AndroidDependencyContainer.Instance.ScheduleSettings; isTeacher = Intent.Extras.GetBoolean(UserTypeSelectActivity.IsTeacherIntentExtraName); var titleTextView = FindViewById <TextView>(Resource.Id.textview_auth_edittext_title); if (isTeacher) { skipAuthTextView.Text = Resources.GetString(Resource.String.auth_teacher_later); titleTextView.Text = Resources.GetString(Resource.String.auth_teacher_title); autoCompleteTextView.Hint = Resources.GetString(Resource.String.auth_teacher_hint); } else { skipAuthTextView.Text = Resources.GetString(Resource.String.group_later); titleTextView.Text = Resources.GetString(Resource.String.edittext_title); autoCompleteTextView.Hint = Resources.GetString(Resource.String.edittext_auth); } }
private void InitToolbar() { try { ToolBar = FindViewById <Toolbar>(Resource.Id.toolbar); if (ToolBar != null) { ToolBar.Title = ""; ToolBar.SetTitleTextColor(Color.White); SetSupportActionBar(ToolBar); SupportActionBar.SetDisplayShowCustomEnabled(true); SupportActionBar.SetDisplayHomeAsUpEnabled(true); SupportActionBar.SetHomeButtonEnabled(true); SupportActionBar.SetDisplayShowHomeEnabled(true); } SearchView = FindViewById <AutoCompleteTextView>(Resource.Id.searchBox); SearchView.SetOnEditorActionListener(this); //SearchView.SetQuery("", false); //SearchView.SetIconifiedByDefault(false); //SearchView.OnActionViewExpanded(); //SearchView.Iconified = false; //SearchView.QueryTextChange += SearchViewOnQueryTextChange; //SearchView.QueryTextSubmit += SearchViewOnQueryTextSubmit; SearchView.ClearFocus(); //Change text colors var editText = (EditText)SearchView.FindViewById(Resource.Id.search_src_text); editText.SetHintTextColor(Color.White); editText.SetTextColor(Color.White); //Remove Icon Search ImageView searchViewIcon = (ImageView)SearchView.FindViewById(Resource.Id.search_mag_icon); ViewGroup linearLayoutSearchView = (ViewGroup)searchViewIcon.Parent; linearLayoutSearchView.RemoveView(searchViewIcon); } catch (Exception e) { Console.WriteLine(e); } }
protected override void OnCreate(Bundle savedInstanceState) { MainApp.ChangeLanguage(this); SetTheme(Resource.Style.MyAppTheme); base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_authorization); networkChecker = new NetworkChecker(this); autoCompleteTextViewAuth = FindViewById <AutoCompleteTextView>(Resource.Id.autocompletetextview_auth); autoCompleteTextViewAuth.SetOnEditorActionListener(this); autoCompleteTextViewAuth.AddTextChangedListener(this); progressBar = FindViewById <ProgressBar>(Resource.Id.progressbar_auth); progressBar.Visibility = ViewStates.Visible; Task.Run(async() => { groupsDictionary = await MainApp.Instance.GroupsDictionary; array = groupsDictionary.Select(x => x.Key).ToArray(); RunOnUiThread(() => { suggestAdapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleDropDownItem1Line, array); autoCompleteTextViewAuth.Adapter = suggestAdapter; progressBar.Visibility = ViewStates.Invisible; }); }); var buttonAuth = FindViewById <Button>(Resource.Id.button_auth); var textViewLater = FindViewById <TextView>(Resource.Id.textview_later_auth); var textViewUpdate = FindViewById <TextView>(Resource.Id.textview_groupsupdate_auth); buttonAuth.Click += ButtonAuth_Click; textViewLater.Click += TextViewLater_Click; textViewUpdate.Click += TextViewUpdate_Click; prefEditor = MainApp.Instance.SharedPreferences.Edit(); }