/** * 创建加载成功后显示界面 * * @return 显示界面 */ protected View createLoadedView(LayoutInflater inflater, ViewGroup container) { ViewDataBinding inflate = DataBindingUtil.inflate(inflater, getResLayout(), container, false); View view = inflate.getRoot(); initView(view, inflate); initData(); return view; }
@Override public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewDataBinding binding = DataBindingUtil.inflate(inflater, R.layout.fragment_play_song, container, false); binding.setVariable(BR.playingSong, song); controlButton = (FancyButton) binding.getRoot().findViewById(R.id.control); controlButton.setOnClickListener(this); return binding.getRoot(); }
@Override public BindingHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) { int layout = mv.getLayout(viewType); ViewDataBinding binding = DataBindingUtil.inflate( LayoutInflater.from(viewGroup.getContext()), layout, viewGroup, false); BindingHolder holder = new BindingHolder(binding.getRoot()); holder.setBinding(binding); return holder; }
public void setUser(com.e.legion.test.app.entities.User user) { this.mUser = user; synchronized (this) { mDirtyFlags |= 0b1L; } super.requestRebind(); }
public ViewHolder(ViewDataBinding binding) { super(binding.getRoot()); this.binding = (ItemUserBinding) binding; }