protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.Searchs); myListTecnology = GetCustomersFromPreferences(); progress = new ProgressDialog(this); progress.Indeterminate = true; progress.SetProgressStyle(ProgressDialogStyle.Spinner); progress.SetMessage("Contacting server. Please wait..."); progress.SetCancelable(false); //Call control autocompleteTextView = FindViewById <AutoCompleteTextView>(Resource.Id.autoCompleteTextView); mRecyclerView = FindViewById <RecyclerView>(Resource.Id.recyclerBook); btnSearch = FindViewById <ImageView>(Resource.Id.btnSearch); mLayoutManager = new LinearLayoutManager(this); mRecyclerView.SetLayoutManager(mLayoutManager); mAdapter = new BookAdapter(this, listBooks); mRecyclerView.SetAdapter(mAdapter); controllerSearch = new ControllerSearch(this); fillTechnologiesSpinner(); setAdapterData(); }
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); } }
protected override void OnElementChanged(ElementChangedEventArgs <SearchBar> e) { base.OnElementChanged(e); if (e.OldElement == null) { LinearLayout linearLayout = Control.GetChildAt(0) as LinearLayout; linearLayout = linearLayout.GetChildAt(2) as LinearLayout; linearLayout = linearLayout.GetChildAt(1) as LinearLayout; linearLayout.Background = null; //removes underline /*lort til at skifte searchicon til farven * var searchView = Control; * searchView.Iconified = true; * searchView.SetIconifiedByDefault(false); * // (Resource.Id.search_mag_icon); is wrong / Xammie bug * int searchIconId = Context.Resources.GetIdentifier("android:id/search_mag_icon", null, null); * var icon = searchView.FindViewById(searchIconId); * * (icon as ImageView).SetImageResource(Resource.Drawable.youriconforsearch); * * int cancelIconId = Context.Resources.GetIdentifier("android:id/search_close_btn", null, null); * var eicon = searchView.FindViewById(cancelIconId); * (eicon as ImageView).SetImageResource(Resource.Drawable.youriconforcancel);*/ AutoCompleteTextView textView = linearLayout.GetChildAt(0) as AutoCompleteTextView; //modify for text appearance customization } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.CreateCase); _presenter = new CreateCasePresenter(this, ModelFactory.Instance.CreateCreateCaseModel()); var installationAdapter = new ArrayAdapter <string>(this, Resource.Layout.SideMenuItem, _presenter.GetInstallations()); _installation = FindViewById <AutoCompleteTextView>(Resource.Id.create_case_installation); _installation.Adapter = installationAdapter; _informerSpinner = FindViewById <Spinner>(Resource.Id.create_case_informer); _informerSpinner.ItemSelected += spinner_ItemSelected; var adapter = new ArrayAdapter <string>(this, Resource.Layout.SideMenuItem, _presenter.GetInformers()); adapter.SetDropDownViewResource(Resource.Layout.UserTypeDropDownItem); _informerSpinner.Adapter = adapter; _errorDescription = FindViewById <EditText>(Resource.Id.create_case_errorDescription); _createCaseBtn = FindViewById <Button>(Resource.Id.create_case_btn); _createCaseBtn.Click += OnCreateCaseClicked; _progressDialog = new ProgressDialog(this); _progressDialog.SetMessage("Opretter ny sag..."); ActionBar.SetDisplayHomeAsUpEnabled(true); ActionBar.SetHomeButtonEnabled(true); }
private void SearchButton_Click(object sender, EventArgs e) { // Execute the search using the provided search query AutoCompleteTextView SearchText = FindViewById <AutoCompleteTextView>(Resource.Id.autoCompleteSearchTextView); ExecListingsSearch(SearchText.Text); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); mEmailView = (AutoCompleteTextView)FindViewById(Resource.Id.email); PopulateAutoComplete(); mPasswordView = (EditText)FindViewById(Resource.Id.password); mPasswordView.EditorAction += (s, e) => { if (e.ActionId == ImeAction.Done || e.ActionId == ImeAction.ImeNull) { attemptLogin(); e.Handled = true; } e.Handled = false; }; Button mEmailSignInButton = (Button)FindViewById(Resource.Id.email_sign_in_button); mEmailSignInButton.Click += (s, e) => { attemptLogin(); }; mLoginFormView = FindViewById(Resource.Id.login_form); mProgressView = FindViewById(Resource.Id.login_progress); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.AutoCompleteTextView); AutoCompleteTextView act = FindViewById <AutoCompleteTextView>(Resource.Id.AutoCompleteInput); Stream seedDataStream = Assets.Open(@"WordList.txt"); List <string> lines = new List <string>(); using (StreamReader reader = new StreamReader(seedDataStream)) { string line; while ((line = reader.ReadLine()) != null) { lines.Add(line); } } string[] wordlist = lines.ToArray(); ArrayAdapter arr = new ArrayAdapter(this, Android.Resource.Layout.SimpleDropDownItem1Line, wordlist); act.Adapter = arr; }
private void InitComponent(View view) { try { EmptyStateLayout = (ViewStub)view.FindViewById(Resource.Id.viewStub); TopSongsViewStub = (ViewStub)view.FindViewById(Resource.Id.viewStubTopSongs); TopAlbumsViewStub = (ViewStub)view.FindViewById(Resource.Id.viewStubTopAlbums); SwipeRefreshLayout = (SwipeRefreshLayout)view.FindViewById(Resource.Id.swipeRefreshLayout); SwipeRefreshLayout.SetColorSchemeResources(Android.Resource.Color.HoloBlueLight, Android.Resource.Color.HoloGreenLight, Android.Resource.Color.HoloOrangeLight, Android.Resource.Color.HoloRedLight); SwipeRefreshLayout.Refreshing = true; SwipeRefreshLayout.Enabled = true; SwipeRefreshLayout.SetProgressBackgroundColorSchemeColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#424242") : Color.ParseColor("#f7f7f7")); SwipeRefreshLayout.Refresh += SwipeRefreshLayoutOnRefresh; SearchBox = view.FindViewById <AutoCompleteTextView>(Resource.Id.searchViewBox); SearchBox.SetHintTextColor(AppSettings.SetTabDarkTheme ? Color.White : Color.Gray); SearchBox.SetTextColor(AppSettings.SetTabDarkTheme ? Color.White : Color.Gray); SearchBox.Click += SearchBoxOnClick; } catch (Exception e) { Console.WriteLine(e); } }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Second); MilkVROptions = FindViewById <RadioGroup>(Resource.Id.MilkVROptions); LinkPreview = FindViewById <AutoCompleteTextView>(Resource.Id.LinkPreview); LinkPreview.Text = "MilkVRLauncher"; lblUrl = FindViewById <TextView>(Resource.Id.lblUrl); button1 = FindViewById <Button>(Resource.Id.button1); button1.Click += delegate { CreateMVRL(FilePath + LinkPreview.Text + ".mvrl", Url, LaunchExtensions[getSelectedElement(MilkVROptions), 1]); ExecUri(convertMilkVRSideloadURL(Url, LaunchExtensions[getSelectedElement(MilkVROptions), 1])); }; Url = CheckForEmby(Intent.DataString); button1.Text = Resources.GetText(Resource.String.ButtonStartCaption); lblUrl.Text = Url; InitRadioButtons(LaunchExtensions, Url); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.Add); RequestPermissions(_permissionsLocation, RequestCameraPermisionId); _closeActivity = FindViewById <ImageView>(Resource.Id.closeActivity); _cameraImage = FindViewById <ImageView>(Resource.Id.cameraImage); _autoCompleteTextView = FindViewById <AutoCompleteTextView>(Resource.Id.addresses); _player = MediaPlayer.Create(this, Resource.Raw.beep); _player.SetVolume(100, 100); _datePicker = FindViewById <EditText>(Resource.Id.datepicker); _scanList = FindViewById <ListView>(Resource.Id.scanList); _statusSpinner = FindViewById <Spinner>(Resource.Id.orderStatus); _addOrder = FindViewById <ImageView>(Resource.Id.addOrder); var today = DateTime.Today; var dateDialog = new DatePickerDialog(this, OnDateSet, today.Year, today.Month - 1, today.Day); dateDialog.DatePicker.MinDate = today.Millisecond; _datePicker.Touch += delegate { dateDialog.Show(); }; _closeActivity.Click += CloseActivity; _cameraImage.Click += LaunchScanner; _autoCompleteTextView.TextChanged += GetAddresses; _scanList.ItemClick += RemoveScannedItem; _statusSpinner.Adapter = FillStatusSpinner(); _addOrder.Click += HandleOrderSubmit; }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { base.OnCreateView(inflater, container, savedInstanceState); var view = inflater.Inflate(Resource.Layout.ProductFilterDialog, container, false); this.PriceMinEditText = view.FindViewById <EditText>(Resource.Id.PriceMinEditText); this.PriceMaxEditText = view.FindViewById <EditText>(Resource.Id.PriceMaxEditText); this.MemoryMinEditText = view.FindViewById <EditText>(Resource.Id.MemoryMinEditText); this.MemoryMaxEditText = view.FindViewById <EditText>(Resource.Id.MemoryMaxEditText); this.RAMMinEditText = view.FindViewById <EditText>(Resource.Id.RAMMinEditText); this.RAMMaxEditText = view.FindViewById <EditText>(Resource.Id.RAMMaxEditText); this.YearMinEditText = view.FindViewById <EditText>(Resource.Id.YearMinEditText); this.YearMaxEditText = view.FindViewById <EditText>(Resource.Id.YearMaxEditText); this.BatteryMinEditText = view.FindViewById <EditText>(Resource.Id.BatteryMinEditText); this.BatteryMaxEditText = view.FindViewById <EditText>(Resource.Id.BatteryMaxEditText); this.CameraMinEditText = view.FindViewById <EditText>(Resource.Id.CameraMinEditText); this.CameraMaxEditText = view.FindViewById <EditText>(Resource.Id.CameraMaxEditText); this.BrandAutoCompleteTextView = view.FindViewById <AutoCompleteTextView>(Resource.Id.BrandAutoCompleteTextView); var items = ProductAPIController.GetBrands(); var adapter = new ArrayAdapter(this.Context, Android.Resource.Layout.SimpleDropDownItem1Line, items); this.BrandAutoCompleteTextView.Adapter = adapter; this.DoneButton = view.FindViewById <Button>(Resource.Id.DoneButton); this.DoneButton.Click += DoneButton_Click; return(view); }
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); } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.search_layout); //searchLV = FindViewById<ListView>(Resource.Id.searchItemListView); //var adapter = new ArrayAdapter(this, Resource.Layout.game_row); //autoCompleteTextView.Adapter = new SearchAdapter(this, gameSearchData.Result); var autoCompleteOptions = new string[] { "hello", "Hey", "f**k off", "nein" }; var gameSearchData = DataService.GetDataFromSearch(Resources.GetString(Resource.String.api_key)); //ArrayAdapter autoCompleteAdapter = new ArrayAdapter // (this, Android.Resource.Layout.SimpleDropDownItem1Line, gameSearchData); autoCompleteTextView = FindViewById <AutoCompleteTextView>(Resource.Id.searchbar1); //autoCompleteTextView.Adapter(new SearchAdapter(this, Android.Resource.Layout.SimpleListItem1)); //autoCompleteTextView.Adapter = autoCompleteAdapter; //autoCompleteTextView.Adapter = adapter; //gameListView.ItemClick += (object sender, ItemClickEventArgs e) => //{ // var gameDetails = gameData.Result[e.Position]; // var intent = new Intent(this, typeof(GameDetailsActivity)); // intent.PutExtra("gameDetails", JsonConvert.SerializeObject(gameDetails)); // StartActivity(intent); //}; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.DepartmentNewRegistrationlayout); var toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.app_bar); SetSupportActionBar(toolbar); SupportActionBar.SetTitle(Resource.String.app_name); SupportActionBar.SetDisplayHomeAsUpEnabled(true); //SupportActionBar.SetDisplayShowHomeEnabled(true); SupportActionBar.SetHomeButtonEnabled(true); btnRegisterDepartment = FindViewById <Button>(Resource.Id.btnRegisterDepartment); btnRegisterDepartmentCancel = FindViewById <Button>(Resource.Id.btnCancelRegisterDepartment); txt_EmployeeTokenNo = FindViewById <EditText>(Resource.Id.txt_TokenNumber); txt_EmployeeName = FindViewById <EditText>(Resource.Id.txt_EmployeeName); txt_EmployeeAddress = FindViewById <EditText>(Resource.Id.txt_EmployeeAddress); txt_EmployeeContactNo = FindViewById <EditText>(Resource.Id.txt_ContactNo); txt_EmployeeEmailID = FindViewById <EditText>(Resource.Id.txt_EmailID); txt_EmployeeDesignationID = FindViewById <AutoCompleteTextView>(Resource.Id.txt_Designation); txt_EmployeeDepartmentID = FindViewById <AutoCompleteTextView>(Resource.Id.txt_Department); txt_EmployeePassword = FindViewById <EditText>(Resource.Id.txt_Password); btnRegisterDepartment.Click += BtnRegisterDepartment_Click; btnRegisterDepartmentCancel.Click += BtnRegisterDepartmentCancel_Click; txt_EmployeeDepartmentID.ItemClick += Txt_EmployeeDepartmentID_ItemClick; TokenNo(); }
protected override async void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.CreatePlaceLayout); #region visual component recovery placeName = FindViewById <EditText>(Resource.Id.PlaceName); placeComment = FindViewById <EditText>(Resource.Id.PlaceComment); validateButton = FindViewById <Button>(Resource.Id.AddPlaceButton); placeGrade = FindViewById <RatingBar>(Resource.Id.PlaceGrade); placeTypeSpinner = FindViewById <Spinner>(Resource.Id.placeTypeSpinner); autoCompleteAddress = FindViewById <AutoCompleteTextView>(Resource.Id.autoCompleteAddress); horizontalImageViewer = FindViewById <LinearLayout>(Resource.Id.horizontalImageViewer); gpsButton = FindViewById <Button>(Resource.Id.gpsButton); gpsProgressBar = FindViewById <ProgressBar>(Resource.Id.gpsProgressBar); #endregion visual component recovery await InitActivity(); //view events validateButton.Click += ValidateButton_Click; autoCompleteAddress.ItemClick += autoCompleteAddress_ItemClick; autoCompleteAddress.TextChanged += autoCompleteAddress_TextChanged; gpsButton.Click += gpsButton_Click; }
// Dialog zur Anzeige der Customer-Auswahl private void customerDialog(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View setCustomer = inflater.Inflate(Resource.Layout.SetCustomer, container); dialog = new Dialog(container.Context); dialog.SetContentView(setCustomer); dialog.SetTitle("Search & select customer"); tv_customer_search = (AutoCompleteTextView)dialog.FindViewById(Resource.Id.autocomplete); tv_customer_search.Threshold = 1; ThreadPool.QueueUserWorkItem(o => { getCustomers(tv_customer_search, null); }); dialog.Show(); //tv_customer_search.AfterTextChanged += delegate //{ // AfterTextChanged_Customer(this.tv_customer_search, null); //}; Button btnSelect = (Button)dialog.FindViewById(Resource.Id.btnSelect); Button btnCancel = (Button)dialog.FindViewById(Resource.Id.btnCancel); btnCancel.Click += delegate { btnCancelOnClick(this, null); }; btnSelect.Click += delegate { btnSelectOnClick(this, null); }; }
// Override the OnMapReady method to make use of Google map services public void OnMapReady(GoogleMap googleMap) { // Instantiate google map instance mMap = googleMap; GetDeviceLocation(); // Inbult UI features mMap.MyLocationEnabled = true; mMap.UiSettings.ZoomControlsEnabled = true; mMap.UiSettings.ZoomGesturesEnabled = true; // Initialize GPS icon mGps = FindViewById <ImageView>(Resource.Id.gps); mGps.Click += GetSelfLocation; // Pre-process shapes file for later ployline deployment BusShapeCollection(); // Initialize AutoCompleteAdapter and AutocompleteTextView autoCompleteOptions = CollectBusOptions(); autoCompleteAdapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleDropDownItem1Line, autoCompleteOptions); autoCompleteTextView = (AutoCompleteTextView)FindViewById(Resource.Id.input_search); autoCompleteTextView.Adapter = autoCompleteAdapter; autoCompleteTextView.EditorAction += AutoCompleteTextView_EditorAction; }
private void getItems(AutoCompleteTextView tv, String search) { try { service.getItems("*"); } catch (Exception e) { if (e.Message.Contains("400")) { getItems(tv, search); } else { Activity.RunOnUiThread(() => { Toast.MakeText(Activity, e.Message, ToastLength.Short).Show(); }); } } while (service.itemLock == true) { } Activity.RunOnUiThread(() => { var adapter = service.PopulateItems(Activity, Resource.Layout.autocomplete_item, Resource.Id.Desc1); tv.Adapter = adapter; }); }
public void Initialize() { // Create your application here getQuoteButton = FindViewById <Button>(Resource.Id.requestCourier_getQuoteButton); email = FindViewById <EditText>(Resource.Id.requestCourier_etemail); phone = FindViewById <EditText>(Resource.Id.requestCourier_etphone); name = FindViewById <EditText>(Resource.Id.requestCourier_etname); message = FindViewById <TextView>(Resource.Id.requestCourier_tvmessage); vehiclebodytype = FindViewById <Spinner>(Resource.Id.requestCourier_vehiclebodytype); appBar = FindViewById <AppBarLayout>(Resource.Id.appbar); requestCourierViewModel = new RequestCourierViewModel(); getQuoteButton.Click += GetQuoteButton_Click; //set vehicle body type drop down //List<string> mylist = new List<string>(); //var adapter = ArrayAdapter.CreateFromResource(this, Resource.Array.vehiclebodytypes_array, Android.Resource.Layout.SimpleSpinnerDropDownItem); //adapter.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem); //vehiclebodytype.Adapter = adapter; pickupLocation = FindViewById <AutoCompleteTextView>(Resource.Id.requestCourier_actvpickup_location); dropLocation = FindViewById <AutoCompleteTextView>(Resource.Id.requestCourier_actvdrop_location); pickupLocation.TextChanged += PickupLocationAutocomplete; dropLocation.TextChanged += DropLocationAutocomplete; }
public CustomTextView(AutoCompleteTextView textView, ArrayAdapter adapter) { this.textView = textView; this.textView.Adapter = adapter; this.textView.TextChanged += StartSpinner_TextChanged; this.textView.FocusChange += _FocusChange; }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); listView = FindViewById <ListView> (Resource.Id.listView); textSearch = FindViewById <AutoCompleteTextView> (Resource.Id.textSearch); googleApiClient = new GoogleApiClient.Builder(this) .EnableAutoManage(this, 0, this) .AddApi(PlacesClass.GEO_DATA_API) .Build(); adapter = new PlacesAutocompleteAdapter(this, googleApiClient, BOUNDS_GREATER_SYDNEY, null); textSearch.Adapter = adapter; textSearch.ItemClick += (sender, e) => { var item = adapter [e.Position]; // Go to details of place: var intent = new Intent(this, typeof(PlaceDetailsActivity)); intent.PutExtra("PLACE_ID", item.PlaceId); StartActivity(intent); }; }
public void Find_views() { btnSave = FindViewById <Button>(Resource.Id.btnSave); txtPunkty = FindViewById <TextView>(Resource.Id.textPunkty); txtNazwa = FindViewById <AutoCompleteTextView>(Resource.Id.ACtextViewNazwa); btnShow = FindViewById <Button>(Resource.Id.btnShow); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.CadastroOpcional); mBtnSubmit = FindViewById <Button>(Resource.Id.btnRegisterSubmit); mActvGenres = FindViewById <AutoCompleteTextView>(Resource.Id.actvGenres); mBtnRegisterOptionalBack = FindViewById <ImageView>(Resource.Id.ivRegisterOptionalBack); mBtnRegisterOptionalBack.Click += mBtnRegisterOptionalBack_Click; Stream seedDataStream = Assets.Open(@"WordList.txt"); List <string> lines = new List <string>(); using (StreamReader reader = new StreamReader(seedDataStream)) { string line; while ((line = reader.ReadLine()) != null) { lines.Add(line); } } string[] wordlist = lines.ToArray(); ArrayAdapter dictionaryAdapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleDropDownItem1Line, wordlist); mActvGenres.Adapter = dictionaryAdapter; mLinearLayout = FindViewById <LinearLayout>(Resource.Id.RegisterLinearLayout); mLinearLayout.Click += mLinearLayout_Click; mBtnSubmit.Click += mBtnSubmit_Click; }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); // Load the autocomplete text (static for now -- it could be from a web service)... AutoCompleteTextView autoCompleteSearch = FindViewById <AutoCompleteTextView> (Resource.Id.autoCompleteSearch); autoCompleteSearch.Adapter = new ArrayAdapter <String> (this, Resource.Layout.SearchResultListItem, businessLogic.GetAutoCompleteText()); Button searchButton = FindViewById <Button> (Resource.Id.searchButton); TextView resultsText = FindViewById <TextView> (Resource.Id.resultsText); TextView searchingText = FindViewById <TextView> (Resource.Id.searchingText); searchButton.Click += async(sender, e) => { Console.WriteLine("Search clicked: {0}", autoCompleteSearch.Text); searchButton.Enabled = false; searchingText.Visibility = ViewStates.Visible; resultsText.Text = await businessLogic.GetSearchResults(autoCompleteSearch.Text); searchingText.Visibility = ViewStates.Gone; resultsText.Visibility = ViewStates.Visible; searchButton.Enabled = true; }; }
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); } }
protected override void OnLayout(bool changed, int l, int t, int r, int b) { base.OnLayout(changed, l, t, r, b); if (Control != null) { var searchView = Control; searchView.Iconified = true; searchView.SetIconifiedByDefault(false); int searchIconId = Context.Resources.GetIdentifier("android:id/search_mag_icon", null, null); var icon = searchView.FindViewById(searchIconId); //TODO: image bindolása //(icon as ImageView).SetImageResource(Resource.Drawable.searchbaricon); } LinearLayout linearLayout = this.Control.GetChildAt(0) as LinearLayout; linearLayout = linearLayout.GetChildAt(2) as LinearLayout; linearLayout = linearLayout.GetChildAt(1) as LinearLayout; GradientDrawable gd = new GradientDrawable(); gd.SetStroke(BorderWidth, BorderColor); linearLayout.Background = gd; AutoCompleteTextView textView = linearLayout.GetChildAt(0) as AutoCompleteTextView; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.GirviSodvalayout); var toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.app_bar); SetSupportActionBar(toolbar); SupportActionBar.SetTitle(Resource.String.app_name); SupportActionBar.SetDisplayHomeAsUpEnabled(true); //SupportActionBar.SetDisplayShowHomeEnabled(true); SupportActionBar.SetHomeButtonEnabled(true); Search = FindViewById <AutoCompleteTextView>(Resource.Id.autoGSSearch); mListView = FindViewById <ListView>(Resource.Id.listViewKhatawaniList); CustomerNameSearch(); Search.ItemClick += Search_ItemClick; mListView.ItemClick += MListView_ItemClick; var pathToDatabase = Path.Combine(path, "JewelleryMortgageLocalDB.db"); var db = new SQLiteConnection(pathToDatabase); SettingMobileApp data = db.Query <SettingMobileApp>("Select * from SettingMobileApp where SrNo = '1'").FirstOrDefault(); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.addCarLayout); submit = FindViewById <Button>(Resource.Id.submitNewCar); lisence = FindViewById <AutoCompleteTextView>(Resource.Id.inputCarLP); manufacturer = FindViewById <Spinner>(Resource.Id.inputCarManufacturer); model = FindViewById <AutoCompleteTextView>(Resource.Id.inputCarModel); color = FindViewById <AutoCompleteTextView>(Resource.Id.inputCarColor); year = FindViewById <AutoCompleteTextView>(Resource.Id.inputCarProductionYear); mode = FindViewById <RadioGroup>(Resource.Id.radioMode); manufacturer.ItemSelected += setString; string[] models = Resources.GetStringArray(Resource.Array.carModels); var adapter = new ArrayAdapter <String>(this, Android.Resource.Layout.SimpleSpinnerItem, models); manufacturer.Adapter = adapter; submit.Click += submitAction; AutoCompleteTextView textCarColor = FindViewById <AutoCompleteTextView>(Resource.Id.inputCarColor); string[] colors = Resources.GetStringArray(Resource.Array.carColors); var adapter2 = new ArrayAdapter <String>(this, Resource.Layout.spinner_item, colors); textCarColor.Adapter = adapter2; }
private void FindElements() { try { cmbSandouq = FindViewById <Spinner>(Resource.Id.cmbPardakhtMainNaqd); cmbBank = FindViewById <Spinner>(Resource.Id.cmbPardakhtMainBank); lblPardakhtMainDateSh = FindViewById <TextView>(Resource.Id.lblPardakhtMainDateSh); PardakhtMainDateShText = FindViewById <TextView>(Resource.Id.PardakhtMainDateShText); txtPardakhtMainCustomerName = FindViewById <AutoCompleteTextView>(Resource.Id.txtPardakhtMainCustomerName); PardakhtMainNaqdText = FindViewById <TextView>(Resource.Id.PardakhtMainNaqdText); txtPardakhtMainNaqdPrice = FindViewById <EditText>(Resource.Id.txtPardakhtMainNaqdPrice); PardakhtMainBankText = FindViewById <TextView>(Resource.Id.PardakhtMainBankText); txtPardakhtMainBankPrice = FindViewById <EditText>(Resource.Id.txtPardakhtMainBankPrice); txtPardakhtMainBankFishNo = FindViewById <EditText>(Resource.Id.txtPardakhtMainBankFishNo); PardakhtMainCheckText = FindViewById <TextView>(Resource.Id.PardakhtMainCheckText); txtPardakhtMainCheckPrice = FindViewById <EditText>(Resource.Id.txtPardakhtMainCheckPrice); txtPardakhtMainBankName = FindViewById <AutoCompleteTextView>(Resource.Id.txtPardakhtMainBankName); txtPardakhtMainYear = FindViewById <EditText>(Resource.Id.txtPardakhtMainYear); txtPardakhtMainMounth = FindViewById <EditText>(Resource.Id.txtPardakhtMainMounth); txtPardakhtMainDay = FindViewById <EditText>(Resource.Id.txtPardakhtMainDay); PardakhtMainDateShText_ = FindViewById <TextView>(Resource.Id._PardakhtMainDateShText); txtPardakhtMainChechNo = FindViewById <EditText>(Resource.Id.txtPardakhtMainChechNo); } catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); } }
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); } }