Skip to content

Instantly share code, notes, and snippets.

@daeun1012
Last active December 1, 2017 03:29
Show Gist options
  • Save daeun1012/2c36a515949ff33271b3d8dcad719405 to your computer and use it in GitHub Desktop.
Save daeun1012/2c36a515949ff33271b3d8dcad719405 to your computer and use it in GitHub Desktop.
private ProductAdapter mProductAdapter;
private ListFragmentBinding mBinding;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
// 바인딩 생성
mBinding = DataBindingUtil.inflate(inflater, R.layout.list_fragment, container, false);
mProductAdapter = new ProductAdapter(mProductClickCallback);
mBinding.productsList.setAdapter(mProductAdapter);
// 생성된 바인딩 view 리턴
return mBinding.getRoot();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment