本文整理匯總了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);
}