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);

// }

原文地址:https://www.cnblogs.com/pandans/p/4398777.html