Exemplo n.º 1
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // to return adapter view for this Fragment

            View view = inflater.Inflate(Resource.Layout.home_fragment, container, false);

            /**
             * refer the parent tag
             */
            //  homeLayout = view.FindViewById<LinearLayout>(Resource.Id.home_layout);

            LinearLayout ll_iv_1 = view.FindViewById <LinearLayout>(Resource.Id.ll_iv_1);
            LinearLayout ll_iv_2 = view.FindViewById <LinearLayout>(Resource.Id.ll_iv_2);
            LinearLayout ll_iv_3 = view.FindViewById <LinearLayout>(Resource.Id.ll_iv_3);
            LinearLayout ll_iv_4 = view.FindViewById <LinearLayout>(Resource.Id.ll_iv_4);

            listView = (ListView)view.FindViewById(Resource.Id.childList);

            Android.Graphics.Color backgroundColor = new Android.Graphics.Color(ThemeUtill.OnActivityCreateSetTheme((Activity)mContext));

            /**
             * set back ground color dynamicly here
             */
            ll_iv_1.SetBackgroundColor(backgroundColor);
            ll_iv_2.SetBackgroundColor(backgroundColor);
            ll_iv_3.SetBackgroundColor(backgroundColor);
            ll_iv_4.SetBackgroundColor(backgroundColor);
            listView.SetBackgroundColor(backgroundColor);

            return(view);
        }
Exemplo n.º 2
0
        /*   private string getDate()
         * {
         *   //datePicker = new DatePickerDialog(mContext);
         *     StringBuilder strCurrentDate = new StringBuilder();
         *     int month = datePicker.Month+1;
         *     strCurrentDate.Append("date: " + month + "/" + datePicker.DayOfMonth + "/" + datePicker.Year);
         *
         *     return strCurrentDate.ToString();
         * }*/

        public void initView()
        {
            mDialogManager = new DialogManager(mContext);
            firstLayout    = (LinearLayout)view.FindViewById(Resource.Id.first_layout);
            secondLayout   = (LinearLayout)view.FindViewById(Resource.Id.second_layout);
            imageView      = (ImageView)view.FindViewById(Resource.Id.childImage1);

            dateOfBirth = (TextView)view.FindViewById(Resource.Id.birth_date);
            // dateOfBirth.SetText("5");
            dateOfBirth.Text = "";


            firstName          = (EditText)view.FindViewById(Resource.Id.edt_first_name);
            bloodType          = (EditText)view.FindViewById(Resource.Id.edt_blood_type);
            race               = (EditText)view.FindViewById(Resource.Id.edt_race);
            hairColor          = (EditText)view.FindViewById(Resource.Id.edt_hair_color);
            eyeColor           = (EditText)view.FindViewById(Resource.Id.edt_eye_color);
            height             = (EditText)view.FindViewById(Resource.Id.edt_height);
            weight             = (EditText)view.FindViewById(Resource.Id.edt_weight);
            glasses            = (EditText)view.FindViewById(Resource.Id.edt_glasses);
            distinguishingMark = (EditText)view.FindViewById(Resource.Id.edt_distinguishing_mark);
            contact            = (EditText)view.FindViewById(Resource.Id.edt_contact);
            comments           = (EditText)view.FindViewById(Resource.Id.edt_comments);
            gender             = (EditText)view.FindViewById(Resource.Id.edt_gender);


            next   = view.FindViewById <ImageView> (Resource.Id.iv_next);
            cencle = view.FindViewById <Button>(Resource.Id.btn_cencle);
            save   = view.FindViewById <Button>(Resource.Id.btn_save);

            _milkDigitalIdService = DependencyService.Get <ImilkDigitalIDService>();

            Android.Widget.ScrollView sv_lay          = (Android.Widget.ScrollView)view.FindViewById(Resource.Id.sv_lay);
            Android.Graphics.Color    backgroundColor = new Android.Graphics.Color(ThemeUtill.OnActivityCreateSetTheme((Activity)mContext));

            /**
             * set back ground color dynamicly here
             */
            sv_lay.SetBackgroundColor(backgroundColor);
        }
Exemplo n.º 3
0
        public override void OnActivityCreated(Bundle savedInstanceState)
        {
            base.OnActivityCreated(savedInstanceState);

            shakeSwitch.CheckedChange += delegate(object sender, CompoundButton.CheckedChangeEventArgs e)
            {
                AppController.SetHandShakingSetting(e.IsChecked);
                Toast.MakeText(Application.Context, "Hand Shaking option is " +
                               (e.IsChecked ? " Trun ON" : " Trun OFF"), ToastLength.Short).Show();
            };

            rdgTheme.CheckedChange += delegate
            {
                /**
                 * get radio button's value
                 */
                String radioButton = viewFragmentLayout.FindViewById <RadioButton>(rdgTheme.CheckedRadioButtonId).Text;

                switch (radioButton)
                {
                case AppController.BLUE_THEME:
                    //                        AppController.ThemeSetting(AppController.BLUE_THEME);
                    //                        toolbar.SetBackgroundColor(Color.Blue);
                    ThemeUtill.changeToTheme(mActivity, ThemeUtill.BLUE);
                    break;

                case AppController.RED_THEME:
                    AppController.ThemeSetting(AppController.RED_THEME);
                    toolbar.SetBackgroundColor(Color.Red);
                    break;

                case "Default Theme":
                    AppController.ThemeSetting("Blue");
                    toolbar.SetBackgroundColor(new Color(21, 96, 243));
                    break;
                }
            };
        }