public OverflowSpinnerAdapter(Context context, IEnumerable <string> items) { ResourceIdManager.UpdateIdValues(); _context = context; _items = items; _inflater = LayoutInflater.From(_context); }
/// <summary> /// Initializes a new instance of the <see cref="CalendarPickerView"/> class. /// </summary> /// <param name="context">The context.</param> /// <param name="attrs">The attrs.</param> public CalendarPickerView(Context context, IAttributeSet attrs) : base(context, attrs) { ResourceIdManager.UpdateIdValues(); _context = context; _styleDescriptor = new StyleDescriptor(); MyAdapter = new MonthAdapter(context, this); base.Adapter = MyAdapter; //SetPadding(0, 0, 0, 0); var bgColor = base.Resources.GetColor(Resource.Color.calendar_bg); base.SetBackgroundColor(bgColor); MonthNameFormat = base.Resources.GetString(Resource.String.month_name_format); WeekdayNameFormat = base.Resources.GetString(Resource.String.day_name_format); FullDateFormat = CultureInfo.CurrentCulture.DateTimeFormat.LongDatePattern; ClickHandler += OnCellClicked; OnInvalidDateSelected += OnInvalidateDateClicked; SetOnPageChangeListener(new OnPageChangeListener(this)); if (base.IsInEditMode) { Init(DateTime.Now, DateTime.Now.AddYears(1), new DayOfWeek[] { }).WithSelectedDate(DateTime.Now); } }
public CalendarPickerView(Context context, IAttributeSet attrs) : base(context, attrs) { ResourceIdManager.UpdateIdValues(); _context = context; MyAdapter = new MonthAdapter(context, this); base.Adapter = MyAdapter; base.Divider = null; base.DividerHeight = 0; var bgColor = base.Resources.GetColor(Resource.Color.calendar_bg); base.SetBackgroundColor(bgColor); base.CacheColorHint = bgColor; MonthNameFormat = base.Resources.GetString(Resource.String.month_name_format); WeekdayNameFormat = base.Resources.GetString(Resource.String.day_name_format); FullDateFormat = CultureInfo.CurrentCulture.DateTimeFormat.LongDatePattern; ClickHandler += OnCellClicked; OnInvalidDateSelected += OnInvalidateDateClicked; if (base.IsInEditMode) { Init(DateTime.Now, DateTime.Now.AddYears(1)).WithSelectedDate(DateTime.Now); } }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); ResourceIdManager.UpdateIdValues(); global::Xamarin.Forms.Forms.Init(this, bundle); LoadApplication(LoadCustomApplication()); }
protected override void OnCreate(Bundle bundle) { ResourceIdManager.UpdateIdValues(); TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); Xamarin.Essentials.Platform.Init(this, bundle); global::Xamarin.Forms.Forms.Init(this, bundle); LoadApplication(new App(new AndroidInitializer(Tenant))); }
public CalendarPickerView(Context context, IAttributeSet attrs) : base(context, attrs) { ResourceIdManager.UpdateIdValues(); _context = context; _styleDescriptor = new StyleDescriptor(); MyAdapter = new MonthAdapter(context, this); base.Adapter = MyAdapter; //base.Divider = null; //base.DividerHeight = 0; this.PageMargin = 32; SetPadding(0, 0, 0, 0); //Sometimes dates could not be selected after the transform. I had to disable it. :( //SetPageTransformer(true, new CalendarMonthPageTransformer()); var bgColor = base.Resources.GetColor(Resource.Color.calendar_bg); base.SetBackgroundColor(bgColor); //base.CacheColorHint = bgColor; MonthNameFormat = base.Resources.GetString(Resource.String.month_name_format); WeekdayNameFormat = base.Resources.GetString(Resource.String.day_name_format); FullDateFormat = CultureInfo.CurrentCulture.DateTimeFormat.LongDatePattern; ClickHandler += OnCellClicked; OnInvalidDateSelected += OnInvalidateDateClicked; this.SetOnPageChangeListener(new OnPageChangeListener(this)); if (base.IsInEditMode) { Init(DateTime.Now, DateTime.Now.AddYears(1), new DayOfWeek[] { }).WithSelectedDate(DateTime.Now); } }
static Attribute() { ResourceIdManager.UpdateIdValues(); }
public SlidingActivityHelper(Activity activity) { ResourceIdManager.UpdateIdValues(); _activity = activity; }
static Dimension() { ResourceIdManager.UpdateIdValues(); }
public LegacyBar(Context context, IAttributeSet attrs) : base(context, attrs) { ResourceIdManager.UpdateIdValues(); _inflater = LayoutInflater.From(Context); //_inflater = (LayoutInflater)context.GetSystemService(Context.LayoutInflaterService); _barView = (RelativeLayout)_inflater.Inflate(Resource.Layout.actionbar, null); AddView(_barView); _logoView = _barView.FindViewById(Resource.Id.actionbar_home_logo) as ImageView; _homeLayout = _barView.FindViewById <RelativeLayout>(Resource.Id.actionbar_home_bg); _homeBtn = _barView.FindViewById <ImageButton>(Resource.Id.actionbar_home_btn); _backIndicator = _barView.FindViewById(Resource.Id.actionbar_home_is_back); _titleView = _barView.FindViewById <TextView>(Resource.Id.actionbar_title); _actionsView = _barView.FindViewById <LinearLayout>(Resource.Id.actionbar_actions); _progress = _barView.FindViewById <ProgressBar>(Resource.Id.actionbar_progress); _titleLayout = _barView.FindViewById <RelativeLayout>(Resource.Id.actionbar_title_layout); _titleDropdown = _barView.FindViewById <Spinner>(Resource.Id.actionbar_spinner); _overflowLegacyBarAction = new OverflowLegacyBarAction(Context); //Custom Attributes (defined in Attrs.xml) var a = Context.ObtainStyledAttributes(attrs, Resource.Styleable.actionbar); //grab theme attributes Theme = (LegacyBarTheme)a.GetInt(Resource.Styleable.actionbar_theme, 0); IsBottom = a.GetBoolean(Resource.Styleable.actionbar_is_bottom, false); LightIcons = a.GetBoolean(Resource.Styleable.actionbar_light_icons, false); //if we are not custom don't let them set it. if (Theme != LegacyBarTheme.Custom) { LightIcons = Theme == LegacyBarTheme.HoloLight; } _overflowLegacyBarAction.SetIconColor(LightIcons); var title = a.GetString(Resource.Styleable.actionbar_title); if (null != title) { Title = title; } var titleColor = a.GetColor(Resource.Styleable.actionbar_title_color, Resources.GetColor(Resource.Color.actionbar_title)); TitleColor = titleColor; var separatorColor = a.GetColor(Resource.Styleable.actionbar_separator, Resources.GetColor(Resource.Color.actionbar_separator)); _actionsView.SetBackgroundColor(separatorColor); _homeLayout.SetBackgroundColor(separatorColor); using (var background = a.GetDrawable(Resource.Styleable.actionbar_background)) //recycling the drawable immediately { if (null != background) { BackgroundDrawable = background; } } var backgroundItem = a.GetDrawable(Resource.Styleable.actionbar_background_item); if (null != backgroundItem) { ItemBackgroundDrawable = backgroundItem; } if (IsBottom) { LegacyBarUtils.SetBottomLegacyBarTheme(this, Theme); } else { LegacyBarUtils.SetLegacyBarTheme(this, Theme); } a.Recycle(); _titleView.Click += (s, e) => { if (null != TitleClick) { TitleClick(s, e); } }; _titleView.LongClick += (s, e) => { if (null != TitleLongClick) { TitleLongClick(s, e); } }; }
static Styleable() { ResourceIdManager.UpdateIdValues(); }
static String() { ResourceIdManager.UpdateIdValues(); }
static Integer() { ResourceIdManager.UpdateIdValues(); }
static Drawable() { ResourceIdManager.UpdateIdValues(); }
static Layout() { ResourceIdManager.UpdateIdValues(); }
static Resource() { ResourceIdManager.UpdateIdValues(); }
static Color() { ResourceIdManager.UpdateIdValues(); }