Commit 58c2c330 by sikang

test

parent 3beeec0a
...@@ -134,7 +134,6 @@ public abstract class BaseActivity extends AppCompatActivity implements IView { ...@@ -134,7 +134,6 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
@Override @Override
protected void onResume() { protected void onResume() {
StringDecrypt.uncode(rootLayout);
super.onResume(); super.onResume();
lifecycleSubject.onNext(ActivityEvent.RESUME); lifecycleSubject.onNext(ActivityEvent.RESUME);
if (getTrustee() != null) { if (getTrustee() != null) {
......
...@@ -173,7 +173,6 @@ public abstract class BaseFragment extends Fragment implements IView { ...@@ -173,7 +173,6 @@ public abstract class BaseFragment extends Fragment implements IView {
@Override @Override
public void onResume() { public void onResume() {
StringDecrypt.uncode(getContentView());
super.onResume(); super.onResume();
lifecycleSubject.onNext(ActivityEvent.RESUME); lifecycleSubject.onNext(ActivityEvent.RESUME);
} }
......
...@@ -7,6 +7,8 @@ import android.widget.EdgeEffect; ...@@ -7,6 +7,8 @@ import android.widget.EdgeEffect;
import android.widget.EditText; import android.widget.EditText;
import android.widget.TextView; import android.widget.TextView;
import java.util.Stack;
/** /**
* Created by SiKang on 2019/5/23. * Created by SiKang on 2019/5/23.
*/ */
...@@ -27,6 +29,7 @@ public class StringDecrypt { ...@@ -27,6 +29,7 @@ public class StringDecrypt {
} }
public static void uncode(ViewGroup viewGroup) { public static void uncode(ViewGroup viewGroup) {
Stack stack = new Stack();
for (int i = 0; i < viewGroup.getChildCount(); i++) { for (int i = 0; i < viewGroup.getChildCount(); i++) {
View view = viewGroup.getChildAt(i); View view = viewGroup.getChildAt(i);
if (view instanceof TextView) { if (view instanceof TextView) {
...@@ -34,9 +37,10 @@ public class StringDecrypt { ...@@ -34,9 +37,10 @@ public class StringDecrypt {
} else if (view instanceof EditText) { } else if (view instanceof EditText) {
uncode((EditText) view); uncode((EditText) view);
} else if (view instanceof ViewGroup) { } else if (view instanceof ViewGroup) {
uncode(viewGroup); stack.push(viewGroup);
} }
} }
} }
public static void uncode(TextView textView) { public static void uncode(TextView textView) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment