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
使用BindingRecyclerViewAdapter 当Item 的TextView 设置以下属性时,在API 19的系统中,会出现TextView文字不显示的问题(在比较新的API设备中显示正常)
android:ellipsize="marquee" android:singleLine="true"
首屏内容正常,滑动后部分Item不显示文字(如每屏展示3个Item,每间隔3个Item就会有1-2个Item不显示文字) 注释addOnRebindCallback后正常
public final ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int layoutId) { if (inflater == null) { inflater = LayoutInflater.from(viewGroup.getContext()); } ViewDataBinding binding = onCreateBinding(inflater, layoutId, viewGroup); final ViewHolder holder = onCreateViewHolder(binding); //注释后正常 /* binding.addOnRebindCallback(new OnRebindCallback() { @Override public boolean onPreBind(ViewDataBinding binding) { return recyclerView != null && recyclerView.isComputingLayout(); } @Override public void onCanceled(ViewDataBinding binding) { if (recyclerView == null || recyclerView.isComputingLayout()) { MyLog.i("onCanceled recyclerView is null or isComputingLayout"); return; } int position = holder.getAdapterPosition(); if (position != RecyclerView.NO_POSITION) { try { notifyItemChanged(position, DATA_INVALIDATION); } catch (IllegalStateException e) { // noop - this shouldn't be happening } } } });*/ return holder; }
是否有其他更好的处理方式呢?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
使用BindingRecyclerViewAdapter
当Item 的TextView 设置以下属性时,在API 19的系统中,会出现TextView文字不显示的问题(在比较新的API设备中显示正常)
首屏内容正常,滑动后部分Item不显示文字(如每屏展示3个Item,每间隔3个Item就会有1-2个Item不显示文字)
注释addOnRebindCallback后正常
是否有其他更好的处理方式呢?
The text was updated successfully, but these errors were encountered: