當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。