本文整理汇总了Java中android.databinding.DataBindingUtil.bind方法的典型用法代码示例。如果您正苦于以下问题:Java DataBindingUtil.bind方法的具体用法?Java DataBindingUtil.bind怎么用?Java DataBindingUtil.bind使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.databinding.DataBindingUtil
的用法示例。
在下文中一共展示了DataBindingUtil.bind方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initDrawerLayout
import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
/**
* inflateHeaderView 进来的布局要宽一些
*/
private void initDrawerLayout() {
navView.inflateHeaderView(R.layout.nav_header_main);
View headerView = navView.getHeaderView(0);
bind = DataBindingUtil.bind(headerView);
bind.setListener(this);
bind.dayNightSwitch.setChecked(SPUtils.getNightMode());
ImgLoadUtil.displayCircle(bind.ivAvatar, ConstantsImageUrl.IC_AVATAR);
bind.llNavExit.setOnClickListener(this);
bind.ivAvatar.setOnClickListener(this);
bind.llNavHomepage.setOnClickListener(listener);
bind.llNavScanDownload.setOnClickListener(listener);
bind.llNavDeedback.setOnClickListener(listener);
bind.llNavAbout.setOnClickListener(listener);
bind.llNavLogin.setOnClickListener(listener);
}
示例2: initRootView
import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
@Override
protected View initRootView(LayoutInflater inflater) {
if (view == null) {
view = View.inflate(getActivity(), R.layout.fragment_service_detail, null);
}
binding = DataBindingUtil.bind(view);
ViewGroup myparent = (ViewGroup) view.getParent();
if (myparent != null) {
myparent.removeView(view);
}
return view;
}
示例3: initView
import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
@Override
public void initView() {
setTitle(R.string.add_new_FMCG);
setFragmentResult();
binding = DataBindingUtil.bind(view);
orderId = getArguments().getString("orderId");
loadFirst();
}
示例4: initView
import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
@Override
protected void initView(View view) {
bind = DataBindingUtil.bind(view);
// init recycler view
homeAdapter = new HomeAdapter(new ArrayList<ProjectBean>(0));
bind.rv.setAdapter(homeAdapter);
bind.rv.setLayoutManager(new LinearLayoutManager(getContext()));
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL);
dividerItemDecoration.setDrawable(getResources().getDrawable(R.drawable.shape_drive_line));
bind.rv.addItemDecoration(dividerItemDecoration);
initEvent();
}
示例5: initNavigationView
import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
private void initNavigationView(NavigationView navigationView) {
View headerView = getLayoutInflater().inflate(R.layout.main_header_layout, null, false);
navigationView.addHeaderView(headerView);
mMainHeaderBinding = DataBindingUtil.bind(headerView);
mMainHeaderBinding.setListener(this);
initSkinName();
}
示例6: initRootView
import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
@Override
protected View initRootView(LayoutInflater inflater) {
if (view == null) {
view = View.inflate(getActivity(), R.layout.fragment_reserve_order_detail, null);
}
ButterKnife.bind(this, view);
binding = DataBindingUtil.bind(view);
ViewGroup myparent = (ViewGroup) view.getParent();
if (myparent != null) {
myparent.removeView(view);
}
return view;
}
示例7: onCreateView
import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
View view = inflater.inflate(R.layout.fragment_moves, container, false);
dataBinding = DataBindingUtil.bind(view);
return view;
}
示例8: ViewHolder
import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
public ViewHolder(View view) {
super(view);
binding = DataBindingUtil.bind(view);
binding.ivIcon.setImageDrawable(new IconicsDrawable(view.getContext()).icon(GoogleMaterial.Icon.gmd_keyboard_arrow_up).sizeDp(16).color(binding.tvTitle.getTextColors()));
}
示例9: HubViewHolder
import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
HubViewHolder(View itemView) {
super(itemView);
mBinding = DataBindingUtil.bind(itemView);
}
示例10: bindUI
import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
public void bindUI(View rootView) {
binding = DataBindingUtil.bind(rootView);
}
示例11: bindViews
import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
@Override
public void bindViews(View view) {
binding = DataBindingUtil.bind(view);
}
示例12: VH
import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
public VH(View itemView) {
super(itemView);
binding = DataBindingUtil.bind(itemView);
}
示例13: BaseDataBindingViewHolder
import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
public BaseDataBindingViewHolder(ViewGroup itemView) {
super(itemView);
this.viewDataBinding = DataBindingUtil.bind(this.itemView);
}
示例14: ViewHolder
import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
public ViewHolder(View view) {
super(view);
binding = DataBindingUtil.bind(view);
}