HarshBarash

Untitled

Aug 4th, 2021
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 0.87 KB | None | 0 0
  1.    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
  2.         super.onViewCreated(view, savedInstanceState)
  3.  
  4.         val bundle = Bundle()
  5.  
  6.        
  7.  
  8.         nextbtntwo.setOnClickListener({
  9.             if (!TextUtils.isEmpty(etTitle.getText()) &&
  10.                 !TextUtils.isEmpty(etMaterials.getText()) &&
  11.                 !TextUtils.isEmpty(etTime.getText())) {
  12.                 bundle.putString(
  13.                     "Title", etTitle.toString())
  14.                 bundle.putString(
  15.                     "Materials", etMaterials.toString())
  16.                 bundle.putString(
  17.                     "Time", etTime.toString()
  18.                     )
  19.                 findNavController().navigate(R.id.action_shareInfoFragment_to_shareLinkFragment)
  20.             } else {
  21.                 requireActivity().showToast("Please enter data")
  22.             }
  23.         })
Advertisement
Add Comment
Please, Sign In to add comment