package com.example.booklibery
import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Toast
import androidx.cardview.widget.CardView
import androidx.navigation.fragment.findNavController
import com.example.booklibery.allclass.ClassOne
class HomeFragment : Fragment() {
/**
* Toast On Fragment
*/
/*
niche private ctx , self die prothome . Context and View ke dhore rekheci .
*/
private var ctx: Context? = null
private var self: View? = null
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
/**
* er por eikhane CTX , self layout er moddhe die dieci ... man bosiesi ...
*/
// Inflate the layout for this fragment
ctx = container?.context
self = LayoutInflater.from(ctx).inflate(R.layout.fragment_home, container, false)
val b = self?.findViewById<CardView>(R.id.class1)
b?.setOnClickListener {
Toast.makeText(ctx,"s",Toast.LENGTH_SHORT).show()
}
return self
}
}
0 Comments