2 dream zxs dream_zxs 于 2014.04.17 11:06 提问

Android的browser源码中,怎么修改标签页的标题字体大小

在做Android系统开发的时候,由于系统要求,字体已经固定。但是发现系统自带的浏览器,标签页标题字体太小的。不知道怎么修改。

看了一下源码,Tag.java的源码中有可以找到标题的变量mTitle,但是不知道如何修改字体的大小,希望大牛指点。

// All the state needed for a page
protected static class PageState {
    String mUrl;
    String mOriginalUrl;
    String mTitle;
    SecurityState mSecurityState;
    // This is non-null only when mSecurityState is SECURITY_STATE_BAD_CERTIFICATE.
    SslError mSslCertificateError;
    Bitmap mFavicon;
    boolean mIsBookmarkedSite;
    boolean mIncognito;

    PageState(Context c, boolean incognito) {
        mIncognito = incognito;
        if (mIncognito) {
            mOriginalUrl = mUrl = "browser:incognito";
            mTitle = c.getString(R.string.new_incognito_tab);
        } else {
            mOriginalUrl = mUrl = "";
            mTitle = c.getString(R.string.new_tab);
        }
        mSecurityState = SecurityState.SECURITY_STATE_NOT_SECURE;
    }

    PageState(Context c, boolean incognito, String url, Bitmap favicon) {
        mIncognito = incognito;
        mOriginalUrl = mUrl = url;
        if (URLUtil.isHttpsUrl(url)) {
            mSecurityState = SecurityState.SECURITY_STATE_SECURE;
        } else {
            mSecurityState = SecurityState.SECURITY_STATE_NOT_SECURE;
        }
        mFavicon = favicon;
    }

}
Csdn user default icon
上传中...
上传图片
插入图片