We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
public View getView(int position, View convertView, ViewGroup parent) { if (convertView == null) { convertView = LayoutInflater.from(MainActivity.this).inflate(R.layout.item, parent, false); } SkinManager.getInstance().injectSkin(convertView); TextView tv = (TextView) convertView.findViewById(R.id.id_tv_title); tv.setText(getItem(position)); return convertView; }
public static SkinView getSkinView(View view) { Object tag = view.getTag(R.id.skin_tag_id); if (tag == null) { tag = view.getTag(); } if (tag == null) return null; if (!(tag instanceof String)) return null; String tagStr = (String) tag;
List<SkinAttr> skinAttrs = parseTag(tagStr); if (!skinAttrs.isEmpty()) { changeViewTag(view); **return new SkinView(view, skinAttrs);** } return null; }
SkinManager.getInstance().injectSkin每次都会new一个SkinView出来,SkinView的总数量等于getView被调用的总次数,而不是getItemCount的值
The text was updated successfully, but these errors were encountered:
从原理上来说,listview里面不可见的item有可能并不在activity的view hierarchy里面,所以哪怕从view hierarchy进行遍历,也有一些item view没有换肤。你可以试一下看看
Xiaolong Wu
On 20 Oct 2016, at 14:54, Rrtoyewx [email protected] wrote: 你可以一上来使用, SkinManager.getInstance().register(this); 由里面的SkinAttrSupport的每次getSkinViews遍历当前activity中所有的view。 而不是使用 SkinManager.getInstance().injectSkin(convertView); 那是自己设置,所以个数会是getview的次数, — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub #19 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AEY4bRSPeo3eEplQIYY_ztJveUlV3ju-ks5q1xAkgaJpZM4II0nl.
On 20 Oct 2016, at 14:54, Rrtoyewx [email protected] wrote:
你可以一上来使用,
SkinManager.getInstance().register(this); 由里面的SkinAttrSupport的每次getSkinViews遍历当前activity中所有的view。 而不是使用
SkinManager.getInstance().injectSkin(convertView); 那是自己设置,所以个数会是getview的次数,
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub #19 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AEY4bRSPeo3eEplQIYY_ztJveUlV3ju-ks5q1xAkgaJpZM4II0nl.
Sorry, something went wrong.
On 20 Oct 2016, at 14:54, Rrtoyewx <[email protected] mailto:[email protected]> wrote: 你可以一上来使用, SkinManager.getInstance().register(this); 由里面的SkinAttrSupport的每次getSkinViews遍历当前activity中所有的view。 而不是使用 SkinManager.getInstance().injectSkin(convertView); 那是自己设置,所以个数会是getview的次数, — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub #19 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AEY4bRSPeo3eEplQIYY_ztJveUlV3ju-ks5q1xAkgaJpZM4II0nl.
On 20 Oct 2016, at 14:54, Rrtoyewx <[email protected] mailto:[email protected]> wrote:
No branches or pull requests
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = LayoutInflater.from(MainActivity.this).inflate(R.layout.item, parent, false);
}
SkinManager.getInstance().injectSkin(convertView);
TextView tv = (TextView) convertView.findViewById(R.id.id_tv_title);
tv.setText(getItem(position));
return convertView;
}
public static SkinView getSkinView(View view) {
Object tag = view.getTag(R.id.skin_tag_id);
if (tag == null)
{
tag = view.getTag();
}
if (tag == null) return null;
if (!(tag instanceof String)) return null;
String tagStr = (String) tag;
SkinManager.getInstance().injectSkin每次都会new一个SkinView出来,SkinView的总数量等于getView被调用的总次数,而不是getItemCount的值
The text was updated successfully, but these errors were encountered: