File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
autosize/src/main/java/me/jessyan/autosize Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 2020/**
2121 * ================================================
2222 * {@link AutoAdaptStrategy} 的包装者, 用于给 {@link AutoAdaptStrategy} 的实现类增加一些额外的职责
23- *
23+ * <p>
2424 * Created by JessYan on 2018/10/30 15:07
2525 * <a href="mailto:[email protected] ">Contact me</a> 2626 * <a href="https://github.com/JessYanCoding">Follow me</a>
@@ -35,8 +35,15 @@ public WrapperAutoAdaptStrategy(AutoAdaptStrategy autoAdaptStrategy) {
3535
3636 @ Override
3737 public void applyAdapt (Object target , Activity activity ) {
38+ onAdaptListener onAdaptListener = AutoSizeConfig .getInstance ().getOnAdaptListener ();
39+ if (onAdaptListener != null ){
40+ onAdaptListener .onAdaptBefore (target , activity );
41+ }
3842 if (mAutoAdaptStrategy != null ) {
3943 mAutoAdaptStrategy .applyAdapt (target , activity );
4044 }
45+ if (onAdaptListener != null ){
46+ onAdaptListener .onAdaptAfter (target , activity );
47+ }
4148 }
4249}
You can’t perform that action at this time.
0 commit comments