优化显示逻辑
This commit is contained in:
@@ -19,13 +19,13 @@ public
|
||||
*/
|
||||
abstract class MogoSkinCompatHelperDelegate implements IMogoSkinCompatSupportable {
|
||||
|
||||
protected volatile static Class< ? > mTargetClazz;
|
||||
protected Class< ? > mTargetClazz;
|
||||
protected Object mDelegate;
|
||||
protected volatile static Method sMethodApplySkin;
|
||||
protected volatile static Method sMethodLoadFromAttributes;
|
||||
private static Constructor sConstructor;
|
||||
protected Method sMethodApplySkin;
|
||||
protected Method sMethodLoadFromAttributes;
|
||||
private Constructor sConstructor;
|
||||
|
||||
private static boolean sIsSupport = false;
|
||||
private boolean sIsSupport = false;
|
||||
|
||||
public MogoSkinCompatHelperDelegate( View view ) {
|
||||
loadClazz();
|
||||
@@ -68,7 +68,7 @@ abstract class MogoSkinCompatHelperDelegate implements IMogoSkinCompatSupportabl
|
||||
protected abstract String getDelegateClazzName();
|
||||
|
||||
@Keep
|
||||
protected static Method getLoadFromAttributesMethod() throws Exception {
|
||||
protected Method getLoadFromAttributesMethod() throws Exception {
|
||||
if ( mTargetClazz != null ) {
|
||||
sMethodLoadFromAttributes = mTargetClazz.getDeclaredMethod( "loadFromAttributes", AttributeSet.class, int.class );
|
||||
sMethodLoadFromAttributes.setAccessible( true );
|
||||
@@ -77,7 +77,7 @@ abstract class MogoSkinCompatHelperDelegate implements IMogoSkinCompatSupportabl
|
||||
}
|
||||
|
||||
@Keep
|
||||
private static Method getApplySkinMethod() throws Exception {
|
||||
private Method getApplySkinMethod() throws Exception {
|
||||
if ( mTargetClazz != null ) {
|
||||
sMethodApplySkin = mTargetClazz.getDeclaredMethod( "applySkin" );
|
||||
sMethodApplySkin.setAccessible( true );
|
||||
@@ -112,7 +112,7 @@ abstract class MogoSkinCompatHelperDelegate implements IMogoSkinCompatSupportabl
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isSupport() {
|
||||
public boolean isSupport() {
|
||||
return sIsSupport;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user