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

几个小的改进的建议,希望能采纳 。 #34

Open
RrtoyewxXu opened this issue Oct 20, 2016 · 0 comments
Open

几个小的改进的建议,希望能采纳 。 #34

RrtoyewxXu opened this issue Oct 20, 2016 · 0 comments

Comments

@RrtoyewxXu
Copy link

1 actionbar如何换肤
我看其中的代码,是从activity里面content中开始遍历,而不是rootview开始

 public static List<SkinView> getSkinViews(Activity activity)
    {
        List<SkinView> skinViews = new ArrayList<SkinView>();
        ViewGroup content = (ViewGroup) activity.findViewById(android.R.id.content);
        addSkinViews(content, skinViews);
        return skinViews;
    }

2 每次换肤都开始扫描整体所有activity,如果打开的activity过多,或者activity中有较多的元素需要更换,这里能不能自身去维护skinViews,因为后续还有便利和字符串裁剪工作要做,这里能不能换成先将处于resume的activity优先换掉。然后发消息给剩下的activity的,让其在onresume中再换掉,这里的性能会不会好点?

List<SkinView> skinViews = SkinAttrSupport.getSkinViews(activity);

3 如果我没理解错,原理是通过加载宿主的资源文件,然后通过regster的方式里面调用apply去刷新regster的activity的布局,如果打开的activity过多,或者activity中有较多的元素,这个操作是不是会让activity较慢显示在用户的视野,能不能将regster的时机推迟到onResume中?

@RrtoyewxXu RrtoyewxXu changed the title 有几个小的疑问。。。 几个小的改进的建议,希望能采纳 。 Oct 20, 2016
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