protected virtual void InitializeDialogBinding()
        {
            var finder             = Mvx.Resolve <IMvxAppResourceTypeFinder>();
            var resourceType       = finder.Find();
            var nestedResourceType = resourceType.GetNestedTypes().FirstOrDefault(x => x.Name == "Layout");

            DroidResources.Initialize(nestedResourceType);
        }
예제 #2
0
        protected override void OnViewModelSet()
        {
            base.OnViewModelSet();

            DroidResources.Initialize(typeof(Resource.Layout));
            SetContentView(Resource.Layout.View_CreateAccount);
            ViewGroup registerContainer = (ViewGroup)FindViewById <LinearLayout>(Resource.Id.registerContainer);

            SetDialog(registerContainer, 0);
            TextView lblTermsAndConditions = (TextView)FindViewById <TextView>(Resource.Id.lblTermsAndConditions);

            var ResourceAcklowledge     = GetString(Resource.String.TermsAndConditionsAcknowledgment);
            var ResourceAcklowledgeBold = GetString(Resource.String.TermsAndConditionsLabel);
            var textWithBold            = Html.FromHtml(ResourceAcklowledge.Replace(ResourceAcklowledgeBold, "<b>" + ResourceAcklowledgeBold + "</b>"));

            lblTermsAndConditions.SetText(textWithBold, TextView.BufferType.Spannable);

            var colorTheme    = DrawHelper.GetTextColorForBackground(Resources.GetColor(Resource.Color.login_color));
            var checkedIcon   = Resources.GetDrawable(Resource.Drawable.@checked_custom);
            var uncheckedIcon = Resources.GetDrawable(Resource.Drawable.@unchecked_custom);

            var list = new StateListDrawable();

            list.AddState(new int[] { Android.Resource.Attribute.StateChecked }, checkedIcon);
            list.AddState(new int[] { -Android.Resource.Attribute.StateChecked }, uncheckedIcon);
            list.AddState(new int[] { Android.Resource.Attribute.StatePressed }, checkedIcon);
            list.SetColorFilter(colorTheme, PorterDuff.Mode.Multiply);

            var checkBox = (CheckBox)FindViewById <CheckBox>(Resource.Id.cbTermsAndConditions);

            checkBox.SetButtonDrawable(list);
            checkBox.Invalidate();

            DrawHelper.SupportLoginTextColor(lblTermsAndConditions);
            DrawHelper.SupportLoginTextColor(FindViewById <Button>(Resource.Id.btnCancel));
            DrawHelper.SupportLoginTextColor(FindViewById <Button>(Resource.Id.btnCreate));
            DrawHelper.SupportLoginTextColor(FindViewById <TextView>(Resource.Id.lblTitle));
        }
예제 #3
0
 protected virtual void InitializeDialogBinding(Type resourceLayoutType)
 {
     DroidResources.Initialize(resourceLayoutType /*typeof(Resource.Layout)*/);
 }