TitleBar.java 文件源码

java
阅读 33 收藏 0 点赞 0 评论 0

项目:iOffice 作者:
public TitleBar(Context context)
{
    super(context);

    BitmapFactory.Options opts = new BitmapFactory.Options();
    opts.inJustDecodeBounds = true;
    BitmapFactory.decodeResource(getResources(),  R.drawable.sys_title_bg_vertical, opts); 
    height = opts.outHeight;        

    setBackgroundResource(R.drawable.sys_title_bg_vertical);

    paint = new Paint();
    paint.setAntiAlias(true);
    paint.setColor(Color.WHITE);
    paint.setTextSize(24);
    FontMetrics fm = paint.getFontMetrics();

    yPostion = (height - fm.descent + fm.ascent) / 2  -  fm.ascent;

    mBusyIndicator = new ProgressBar(getContext());
    mBusyIndicator.setIndeterminate(true);
    //mBusyIndicator.setBackgroundResource(R.drawable.busy);
    addView(mBusyIndicator);
    mBusyIndicator.setVisibility(GONE);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号