皮肤设置修改

This commit is contained in:
wangcongtao
2020-08-27 14:00:49 +08:00
parent 9107933389
commit b7110045e6
8 changed files with 60 additions and 146 deletions

View File

@@ -128,18 +128,6 @@ public class MogoApplication extends AbsMogoApplication {
.addInflater(new SkinMaterialViewInflater()) // material design 控件换肤初始化[可选]
.addInflater(new SkinConstraintViewInflater()) // ConstraintLayout 控件换肤初始化[可选]
.addInflater(new SkinCardViewInflater()) // CardView v7 控件换肤初始化[可选]
.addInflater( ( context, name, attrs ) -> {
View view = null;
try {
Class clazz = Class.forName( name );
Constructor<View> constructor = clazz.getConstructor( Context.class, AttributeSet.class );
constructor.setAccessible( true );
view = constructor.newInstance( constructor, attrs );
} catch ( Exception e ) {
e.printStackTrace();
}
return view;
} )
.setSkinAllActivityEnable(true)
.setSkinStatusBarColorEnable(false) // 关闭状态栏换肤,默认打开[可选]
.setSkinWindowBackgroundEnable(false) // 关闭windowBackground换肤默认打开[可选]