Esempio n. 1
0
        static Style()
        {
            Light        = Typeface.CreateFromAsset(Application.Context.Assets, "OpenSans-Light.ttf");
            Regular      = Typeface.CreateFromAsset(Application.Context.Assets, "OpenSans-Regular.ttf");
            Semibold     = Typeface.CreateFromAsset(Application.Context.Assets, "OpenSans-Semibold.ttf");
            R15G24B30    = BitmapUtils.GetColorFromInteger(ContextCompat.GetColor(Application.Context, Resource.Color.rgb15_24_30));
            R151G155B158 = BitmapUtils.GetColorFromInteger(ContextCompat.GetColor(Application.Context, Resource.Color.rgb151_155_158));
            R244G244B246 = BitmapUtils.GetColorFromInteger(ContextCompat.GetColor(Application.Context, Resource.Color.rgb244_244_246));
            R231G72B00   = BitmapUtils.GetColorFromInteger(ContextCompat.GetColor(Application.Context, Resource.Color.rgb231_72_0));
            R255G121B4   = BitmapUtils.GetColorFromInteger(ContextCompat.GetColor(Application.Context, Resource.Color.rgb255_121_4));
            R255G22B5    = BitmapUtils.GetColorFromInteger(ContextCompat.GetColor(Application.Context, Resource.Color.rgb255_22_5));
            R255G34B5    = BitmapUtils.GetColorFromInteger(ContextCompat.GetColor(Application.Context, Resource.Color.rgb255_34_5));
            R209G213B216 = BitmapUtils.GetColorFromInteger(ContextCompat.GetColor(Application.Context, Resource.Color.rgb209_213_216));
            R255G81B4    = BitmapUtils.GetColorFromInteger(ContextCompat.GetColor(Application.Context, Resource.Color.rgb255_81_4));
            R245G245B245 = BitmapUtils.GetColorFromInteger(ContextCompat.GetColor(Application.Context, Resource.Color.rgb245_245_245));

            Density                  = Application.Context.Resources.DisplayMetrics.Density;
            TopPanelHeightInDp       = Application.Context.Resources.GetDimension(Resource.Dimension.dp_top_panel_height) / Density;
            TabBarHeightInDp         = Application.Context.Resources.GetDimension(Resource.Dimension.dp_tab_bar_height) / Density;
            FeedItemHeaderHeightInDp = Application.Context.Resources.GetDimension(Resource.Dimension.dp_feed_item_header_height) / Density;
            ScreenHeightInDp         = Application.Context.Resources.DisplayMetrics.HeightPixels / Density;
            ScreenWidthInDp          = Application.Context.Resources.DisplayMetrics.WidthPixels / Density;
            MaxPostHeight            = ScreenHeightInDp - TopPanelHeightInDp - FeedItemHeaderHeightInDp - TabBarHeightInDp - 54;
        }