Example #1
0
        public CompassViewDrawer(IPoiCategoryBitmapProvider poiCategoryBitmapProvider)
        {
            Typeface normal = Typeface.Create("Arial", TypefaceStyle.Normal);

            this.poiCategoryBitmapProvider = poiCategoryBitmapProvider;

            paintRect = new Paint();
            paintRect.SetARGB(150, 0, 0, 0);
            paintRect.SetStyle(Paint.Style.FillAndStroke);
            paintRect.StrokeWidth = 4;

            paintTapArea = new Paint();
            paintTapArea.SetARGB(100, 0, 0, 0);
            paintTapArea.SetStyle(Paint.Style.Fill);

            paintTapFavourite = new Paint();
            paintTapFavourite.SetARGB(150, 255, 195, 0);
            paintTapFavourite.SetStyle(Paint.Style.Fill);

            paintRectSelectedItem = new Paint();
            paintRectSelectedItem.SetARGB(150, 255, 255, 255);
            paintRectSelectedItem.SetStyle(Paint.Style.FillAndStroke);
            paintRectSelectedItem.StrokeWidth = 4;

            textpaint = new Paint();
            textpaint.SetARGB(255, 200, 255, 0);
            textpaint.TextSize  = 36;
            textpaint.AntiAlias = true;
            textpaint.SetTypeface(normal);

            textpaintSelected = new Paint();
            textpaintSelected.SetARGB(255, 0, 0, 0);
            textpaintSelected.TextSize  = 36;
            textpaintSelected.AntiAlias = true;
            textpaintSelected.SetTypeface(normal);

            textPaintForEllipsize = new TextPaint();
            textPaintForEllipsize.SetARGB(255, 200, 255, 0);
            textPaintForEllipsize.SetStyle(Paint.Style.Fill);
            textPaintForEllipsize.TextSize   = 36;
            textPaintForEllipsize.AntiAlias  = true;
            textPaintForEllipsize.TextAlign  = Paint.Align.Left;
            textPaintForEllipsize.LinearText = true;

            paintWhite = new Paint();
            paintWhite.SetARGB(255, 255, 255, 255);
            paintWhite.SetStyle(Paint.Style.Fill);

            paintGray = new Paint();
            paintGray.SetARGB(255, 186, 186, 186);
            paintGray.SetStyle(Paint.Style.Fill);

            paintBlack = new Paint();
            paintBlack.SetARGB(255, 0, 0, 0);
            paintBlack.SetStyle(Paint.Style.Fill);

            multiplier = 1;
        }
Example #2
0
        public CompassView(Context context, IAttributeSet attrs) :
            base(context, attrs)
        {
            poiCategoryBitmapProvider = new PoiCategoryBitmapProvider();
            compassViewDrawer         = new CompassViewDrawerEachPoiSeparate(poiCategoryBitmapProvider);

            _textPaint = new Paint();
            _textPaint.SetARGB(255, 200, 255, 0);
            _textPaint.TextSize  = 42;
            _textPaint.AntiAlias = true;
            _textPaint.TextAlign = Paint.Align.Center;

            _backgroundPaint = new Paint();
            _backgroundPaint.SetARGB(150, 0, 0, 0);
            _backgroundPaint.SetStyle(Paint.Style.Fill);
            _backgroundPaint.StrokeWidth = 0;
        }
Example #3
0
 public CompassViewDrawerEachPoiSeparate(IPoiCategoryBitmapProvider poiCategoryBitmapProvider)
     : base(poiCategoryBitmapProvider)
 {
 }