Amaliy ish №2 Topshirdi: Ustaboyev Abbosbek Qabul qildi: Jabborova N. Toshkent 2022 Mavzu: Ishlab chiqilgan prototip kodini GitHubga joylashtirish Biz ishlab chiqqan loyiha, prototip kodi



Download 1,45 Mb.
bet1/2
Sana07.07.2022
Hajmi1,45 Mb.
#754052
  1   2

O‘ZBEKISTON RESPUBLIKASI AXBOROT TEXNOLOGIYALARI VA KOMMUNIKATSIYALARINI RIVOJLANTIRISH VAZIRLIGI
MUHAMMAD AL-XORAZMIY NOMIDAGI
TOSHKENT AXBOROT TEXNOLOGIYALARI UNIVERSITETI
Dasturiy injinering fakulteti

Axborot Texnologiyalarining Dasturiy Ta’minoti kafedrasi


Dasturiy injiniringga kirish




Amaliy ish №2
Topshirdi: Ustaboyev Abbosbek
Qabul qildi: Jabborova N.

Toshkent 2022


Mavzu: Ishlab chiqilgan prototip kodini GitHubga joylashtirish
Biz ishlab chiqqan loyiha, prototip kodi:

Dastlab Prototip uchun model yaratib olamiz:


package mobiler.abbosbek.androidtutorial.model

data class TutorialModel(


val image: Int?,
val title: String,
val id: Int
)
Keyin esa DataProvider nomli object yaratib olamiz :

object DataProvider {


val jetpackComposeData = listOf(
TutorialModel(R.drawable.widget,"Android Widgets",0),
TutorialModel(R.drawable.image,"Image Tutorial",1),
TutorialModel(R.drawable.alert,"Alert Dialog",2),
TutorialModel(R.drawable.list,"List Tutorial",3),
TutorialModel(R.drawable.calendar,"Date Tutorial",4),
TutorialModel(R.drawable.clock,"Time Tutorial",5),
TutorialModel(R.drawable.menu,"Menu Tutorial",6),
TutorialModel(R.drawable.intent,"Intent Tutorial",7),
TutorialModel(R.drawable.user,"Profile Page",8),
TutorialModel(R.drawable.login,"Register Page",9),
TutorialModel(R.drawable.smartphone,"UI Design",10)
)
}
Endi esa Asosiy prototip kodini yozamiz :

import android.content.Intent


import android.os.Bundle
import android.widget.Toast
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.shape.CornerSize
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.*
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.KeyboardArrowRight
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.geometry.CornerRadius
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import mobiler.abbosbek.androidtutorial.model.DataProvider
import mobiler.abbosbek.androidtutorial.model.TutorialModel
import mobiler.abbosbek.androidtutorial.ui.theme.AndroidTutorialTheme

class MainActivity : ComponentActivity() {


override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
AndroidTutorialTheme(darkTheme = false) {
Scaffold(topBar = {
TopAppBar(title={
Text(
text = "Jetpack Compose Tutorial",
fontWeight = FontWeight.Bold,
fontSize = 20.sp,
fontStyle = FontStyle.Normal,
textAlign = TextAlign.Center,
modifier = Modifier.fillMaxWidth()
)

Download 1,45 Mb.

Do'stlaringiz bilan baham:
  1   2




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