Package com example computergraphics import android os. Bundle



Download 200,3 Kb.
bet9/20
Sana08.01.2022
Hajmi200,3 Kb.
#331779
1   ...   5   6   7   8   9   10   11   12   ...   20
Bog'liq
Kompyuter Grafikasi

}
}
}

override fun onMyClick(position: Int, lectures: Lectures) {


if (position == 0) {
findNavController().navigate(R.id.infoFragment)
} else if (position == 1) {
findNavController().navigate(R.id.lcturesFragment)
} else if (position == 2) {
findNavController().navigate(R.id.laboratoriesFragment)
} else if (position == 3) {
findNavController().navigate(R.id.manualFragment)
} else {
findNavController().navigate(R.id.testFragment)
}
}

override fun onClick(position: Int, lectures: Lectures) {


if (position == 0) {
val info = MySharedPreferences.loadData2("ali1")
if (info.name == null) {
findNavController().navigate(R.id.infoFragment)
} else {
val bundle = bundleOf("info" to info)
findNavController().navigate(R.id.dataFragment, bundle)
}

} else if (position == 1) {


val info = MySharedPreferences.loadData2("ali2")
if (info.name == null) {
findNavController().navigate(R.id.lcturesFragment)
} else {
val bundle = bundleOf("info" to info)
findNavController().navigate(R.id.dataFragment, bundle)
}

} else if (position == 2) {

val info = MySharedPreferences.loadData2("ali")
if (info.name == null) {
findNavController().navigate(R.id.laboratoriesFragment)
} else {
val bundle = bundleOf("info" to info)
findNavController().navigate(R.id.dataFragment, bundle)
}
} else if (position == 3) {
findNavController().navigate(R.id.manualFragment)
} else {
findNavController().navigate(R.id.testFragment)
}
}
}

package com.example.computergraphics

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.example.computergraphics.adapters.InfoAdapter
import com.example.computergraphics.databinding.FragmentInfoBinding
import com.example.computergraphics.utils.Info
import android.widget.ImageView
import android.widget.Toast
import androidx.core.os.bundleOf
import androidx.navigation.fragment.findNavController
import com.example.computergraphics.adapters.OnMyClickListener1
import com.example.computergraphics.db.MyDbHelper
import com.example.computergraphics.utils.MySharedPreferences

// TODO: Rename parameter arguments, choose names that match


// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private const val ARG_PARAM1 = "param1"
private const val ARG_PARAM2 = "param2"

/**
* A simple [Fragment] subclass.
* Use the [InfoFragment.newInstance] factory method to
* create an instance of this fragment.
*/
class InfoFragment : Fragment(), OnMyClickListener1 {
// TODO: Rename and change types of parameters
private var param1: String? = null
private var param2: String? = null

override fun onCreate(savedInstanceState: Bundle?) {


super.onCreate(savedInstanceState)
arguments?.let {
param1 = it.getString(ARG_PARAM1)
param2 = it.getString(ARG_PARAM2)

Download 200,3 Kb.

Do'stlaringiz bilan baham:
1   ...   5   6   7   8   9   10   11   12   ...   20




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish