Example #1
0
    public void setFont(Font font)
    {
        style.font = font;

        DistanceMeasure fontSize = null;

        if (font == CrhcConstants.FONT_NORMAL)
        {
            fontSize = CrhcConstants.FONT_HEIGHT_NORMAL;
        }
        else if (font == CrhcConstants.FONT_TITLE)
        {
            fontSize = CrhcConstants.FONT_HEIGHT_TITLE;
        }
        else if (font == CrhcConstants.FONT_SUBTITLE)
        {
            fontSize = CrhcConstants.FONT_HEIGHT_SUBTITLE;
        }
        else if (font == CrhcConstants.FONT_SOURCE)
        {
            fontSize = CrhcConstants.FONT_HEIGHT_SOURCE;
        }

        if (fontSize != null)
        {
            style.fontSize = (int)fontSize.getAs(NumberType.PIXELS);
        }

        //invalidateHeight();
    }
Example #2
0
 protected override float calcPixelHeight(float w)
 {
     return(AUDIO_PLAYER_HEIGHT.getAs(NumberType.PIXELS));
 }