当前位置: 首页>>代码示例>>Java>>正文


Java DataBindingUtil.bind方法代码示例

本文整理汇总了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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:21,代码来源:MainActivity.java

示例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;
}
 
开发者ID:fengdongfei,项目名称:CXJPadProject,代码行数:13,代码来源:ServiceDetailFragment.java

示例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();
}
 
开发者ID:fengdongfei,项目名称:CXJPadProject,代码行数:10,代码来源:CommodityAddFragment.java

示例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();
}
 
开发者ID:ittianyu,项目名称:POCenter,代码行数:15,代码来源:HomeFragment.java

示例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();
}
 
开发者ID:wutongke,项目名称:AndroidSkinAnimator,代码行数:8,代码来源:MainActivity.java

示例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;
}
 
开发者ID:fengdongfei,项目名称:CXJPadProject,代码行数:14,代码来源:ReserveOrderDetailFragment.java

示例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;
}
 
开发者ID:ragdroid,项目名称:Dahaka,代码行数:9,代码来源:MovesFragment.java

示例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()));
}
 
开发者ID:MFlisar,项目名称:RecyclerViewPreferences,代码行数:6,代码来源:SettingsHeaderItem.java

示例9: HubViewHolder

import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
HubViewHolder(View itemView) {
    super(itemView);

    mBinding = DataBindingUtil.bind(itemView);
}
 
开发者ID:nekocode,项目名称:Hubs,代码行数:6,代码来源:ConfigPropertyListAdapter.java

示例10: bindUI

import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
public void bindUI(View rootView) {
    binding = DataBindingUtil.bind(rootView);
}
 
开发者ID:fodroid,项目名称:XDroid-Databinding,代码行数:4,代码来源:XFragment.java

示例11: bindViews

import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
@Override
public void bindViews(View view) {
    binding = DataBindingUtil.bind(view);
}
 
开发者ID:fengdongfei,项目名称:CXJPadProject,代码行数:5,代码来源:CommodityAddFragment.java

示例12: VH

import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
public VH(View itemView) {
	super(itemView);
	binding = DataBindingUtil.bind(itemView);
}
 
开发者ID:chetdeva,项目名称:draggablerecyclerview,代码行数:5,代码来源:RVAdapter.java

示例13: BaseDataBindingViewHolder

import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
public BaseDataBindingViewHolder(ViewGroup itemView) {
    super(itemView);
    this.viewDataBinding = DataBindingUtil.bind(this.itemView);
}
 
开发者ID:wheat7,项目名称:Cashew,代码行数:5,代码来源:BaseDataBindingViewHolder.java

示例14: ViewHolder

import android.databinding.DataBindingUtil; //导入方法依赖的package包/类
public ViewHolder(View view) {
    super(view);
    binding = DataBindingUtil.bind(view);
}
 
开发者ID:MFlisar,项目名称:RecyclerViewPreferences,代码行数:5,代码来源:SettingsAlternativeHeaderItem.java


注:本文中的android.databinding.DataBindingUtil.bind方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。