Esempio 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);
        }
Esempio 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);
        }