コード例 #1
0
 public GridSpacingItemDecoration(Context context, GridLayoutManager layoutManager, int spacingDp,
                                  bool hasEdgeSpacing)
 {
     _layoutManager  = layoutManager;
     _spacing        = (int)ViewUtils.DpToPx(context, spacingDp);
     _hasEdgeSpacing = hasEdgeSpacing;
 }
コード例 #2
0
        public ReorderableListTouchHelperCallback(Context context, IReorderableListAdapter adapter, GridLayoutManager layoutManager)
        {
            _layoutManager         = layoutManager;
            _adapter               = adapter;
            _movementStartPosition = -1;
            _movementEndPosition   = -1;

            _dragElevation = ViewUtils.DpToPx(context, DragElevationDp);
        }
コード例 #3
0
        public override void OnResume()
        {
            base.OnResume();

            if (Activity.Resources.Configuration.ScreenWidthDp > MaxWidth)
            {
                Dialog.Window.SetLayout((int)ViewUtils.DpToPx(Activity, MaxWidth), -1);
            }
        }
コード例 #4
0
 public AutoGridLayoutManager(Context context, int minColumnWidth) : base(context, 1)
 {
     _minColumnWidth = (int)ViewUtils.DpToPx(context, minColumnWidth);
     CalculateSpanCount();
 }