LibProject使用theme无效。

正常情况:

// mTxtView.setTextAppearance(context,

// R.attr.textapper);

------在lib工程中使用如上无效,解决如下-----------

// Resources.Theme theme = getContext().getTheme();

// TypedValue styleID = new TypedValue();

// if (theme.resolveAttribute(R.attr.textapper, styleID, true)) {

// mTxtView.setTextAppearance(getContext(), styleID.data);

// }

posted @ 2015-04-07 16:58  pandans  阅读(184)  评论(0)    收藏  举报