Skip to content

Commit

Permalink
0.0.6 update
Browse files Browse the repository at this point in the history
  • Loading branch information
kongzue committed Jun 7, 2022
1 parent 257ba85 commit b516148
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ android.useAndroidX=true
android.nonTransitiveRClass=true


BUILD_VERSION=0.0.5
BUILD_VERSION_INT=5
BUILD_VERSION=0.0.6
BUILD_VERSION_INT=6
15 changes: 15 additions & 0 deletions runner/src/main/java/com/kongzue/runner/RootViewInterface.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.kongzue.runner;

import android.view.View;

/**
* @author: Kongzue
* @github: https://github.com/kongzue/
* @homepage: http://kongzue.com/
* @mail: [email protected]
* @createTime: 2022/6/7 22:07
*/
public interface RootViewInterface {

View getRootView();
}
15 changes: 15 additions & 0 deletions runner/src/main/java/com/kongzue/runner/Runner.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import android.os.Looper;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListAdapter;
Expand Down Expand Up @@ -638,6 +639,20 @@ public static void changeDataByTag(String key, Object data) {
preSetValue(view, data);
}
}
for (WeakReference<Object> objectWeakReference : anyObjectList) {
if (objectWeakReference.get() != null) {
Object object = objectWeakReference.get();
if (object instanceof RootViewInterface) {
View rootView = ((RootViewInterface) object).getRootView();
if (rootView instanceof ViewGroup) {
View view =rootView.findViewWithTag(key);
if (view != null) {
preSetValue(view, data);
}
}
}
}
}
}

private static void preSetValue(View view, Object data) {
Expand Down

0 comments on commit b516148

Please sign in to comment.