public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            view               = inflater.Inflate(Resource.Layout.StatsColumnsAllTable, container, false);
            mListView          = view.FindViewById <ListView>(Resource.Id.listViewStatsColumns);
            mSearch            = view.FindViewById <EditText>(Resource.Id.etSearch);
            mContainerListView = view.FindViewById <LinearLayout>(Resource.Id.containerStatsColumns);
            mDesign            = view.FindViewById <Design>(Resource.Id.HelpEr);

            mContext = container.Context;

            mDesign.Alpha     = 0;
            mDesign.Focusable = false;

            mSearch.Focusable = false;
            mSearch.AddTextChangedListener(this);

            mListStatsColumns = webService.GetAllDataStatsColumns();

            List <StatsColumns> searchedTable = (from table in mListStatsColumns
                                                 where table.LOW_OCCUPANCY.Contains("YES", StringComparison.OrdinalIgnoreCase)
                                                 select table).ToList <StatsColumns>();

            mTableAdapter     = new StatsColumnsAdapter(mContext, Resource.Layout.StatsColumnsRow, searchedTable);
            mListView.Adapter = mTableAdapter;

            return(view);
        }
예제 #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SupportActionBar.SetDisplayHomeAsUpEnabled(false); // remove the left caret
            SupportActionBar.SetHomeButtonEnabled(false);      // disable the button

            mInputUsername = FindViewById <AppCompatEditText>(Resource.Id.input_username);
            mInputPassword = FindViewById <AppCompatEditText>(Resource.Id.input_password);

            mInputUsername.TextChanged += OnInputUsernameTextChanged;
            mInputPassword.TextChanged += OnInputPasswordTextChanged;

            mInputLayoutUsername = FindViewById <Android.Support.Design.Widget.TextInputLayout>(Resource.Id.input_username_layout);
            mInputLayoutPassword = FindViewById <Android.Support.Design.Widget.TextInputLayout>(Resource.Id.input_password_layout);

            var btLogin = FindViewById <Button>(Resource.Id.btn_login);

            btLogin.Click += OnLoginClick;

            this.Title = "";


            im = (InputMethodManager)GetSystemService(Context.InputMethodService);

            serviceManager = ServiceManager.SharedInstance;

            string masterDBPath = new FileUtil().GetMasterDBPath();

            if (File.Exists(masterDBPath))
            {
                File.Delete(masterDBPath);
            }

            string auditDBPath = new FileUtil().GetAuditDBPath();

            if (File.Exists(auditDBPath))
            {
                File.Delete(auditDBPath);
            }
        }
예제 #3
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            view               = inflater.Inflate(Resource.Layout.StatsColumnsAllTable, container, false);
            mListView          = view.FindViewById <ListView>(Resource.Id.listViewStatsColumns);
            mSearch            = view.FindViewById <EditText>(Resource.Id.etSearch);
            mContainerListView = view.FindViewById <LinearLayout>(Resource.Id.containerStatsColumns);
            mDesign            = view.FindViewById <Design>(Resource.Id.HelpEr);

            mContext = container.Context;

            mDesign.Alpha     = 0;
            mDesign.Focusable = false;

            mSearch.Focusable = false;
            mSearch.AddTextChangedListener(this);

            mListStatsColumns = webService.GetAllDataStatsColumns();

            mTableAdapter     = new StatsColumnsAdapter(container.Context, Resource.Layout.StatsColumnsRow, mListStatsColumns);
            mListView.Adapter = mTableAdapter;

            return(view);
        }
 public void Include(Android.Support.Design.Widget.TextInputLayout text)
 {
     text.Hint = "" + text.Hint;
     text.EditText.AfterTextChanged += (sender, args) => text.EditText.Text = "" + text.EditText.Text;
     text.EditText.Hint              = "" + text.EditText.Hint;
 }