Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F ragment 里面的tooloar不会实时刷新 #56

Closed
DavidMGT opened this issue Jul 10, 2018 · 1 comment
Closed

F ragment 里面的tooloar不会实时刷新 #56

DavidMGT opened this issue Jul 10, 2018 · 1 comment

Comments

@DavidMGT
Copy link

No description provided.

@DavidMGT
Copy link
Author

ThemeUtils.refreshUI(getContext(), new ThemeUtils.ExtraRefreshable() {
@OverRide
public void refreshGlobal(Activity activity) {
//for global setting, just do once
if (Build.VERSION.SDK_INT >= 21) {
ActivityManager.TaskDescription taskDescription =
new ActivityManager.TaskDescription(null, null,
ThemeUtils.getThemeAttrColor(context, android.R.attr.colorPrimary));
setTaskDescription(taskDescription);
getWindow().setStatusBarColor(
ThemeUtils.getColorById(context, R.color.theme_color_primary_dark));
}
}

                @Override
                public void refreshSpecificView(View view) {
                    //TODO: will do this for each traversal
                } ThemeUtils.refreshUI(getContext(), new ThemeUtils.ExtraRefreshable() {
                @Override
                public void refreshGlobal(Activity activity) {
                    //for global setting, just do once
                    if (Build.VERSION.SDK_INT >= 21) {
                        ActivityManager.TaskDescription taskDescription =
                                new ActivityManager.TaskDescription(null, null,
                                        ThemeUtils.getThemeAttrColor(context, android.R.attr.colorPrimary));
                        setTaskDescription(taskDescription);
                        getWindow().setStatusBarColor(
                                ThemeUtils.getColorById(context, R.color.theme_color_primary_dark));
                    }
                }

                @Override
                public void refreshSpecificView(View view) {
                    //TODO: will do this for each traversal
                }
            }
    );
            }
    );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant