This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dependencies: | |
| implementation ("com.github.fornewid:neumorphism:0.3.2") | |
| maven { url = uri("https://www.jitpack.io" ) } | |
| activity_main.xml: | |
| <?xml version="1.0" encoding="utf-8"?> | |
| <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MainActivity.kt: | |
| package com.iliyadev.gridview | |
| import androidx.appcompat.app.AppCompatActivity | |
| import android.os.Bundle | |
| import android.widget.AdapterView | |
| import android.widget.GridView | |
| import android.widget.Toast | |
| import com.iliyadev.gridview.adapters.PlayerAdapter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mainactivity.kt: | |
| package com.iliyadev.myapplication | |
| import android.content.Intent | |
| import androidx.appcompat.app.AppCompatActivity | |
| import android.os.Bundle | |
| import android.widget.ArrayAdapter | |
| import android.widget.Button | |
| import android.widget.ListView |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| file Main.kt: | |
| var productList = mutableListOf<Product>() | |
| fun main(args: Array<String>) { | |
| val handler = ProductHandler() | |
| val reader = ReadFileCoroutine() | |
| val writer = WriteFileCoroutine() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| main activity: | |
| fun main(){ | |
| var employees = mutableListOf<Employee>() | |
| while (true){ | |
| when(getMenu()){ | |
| 1->{ | |
| println("نام را وارد کنید") | |
| var firstName = readLine()!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| onClick = { | |
| Intent( | |
| applicationContext, | |
| text::class.java | |
| ).also { startActivity(it) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var password by rememberSaveable { mutableStateOf("") } | |
| var passwordVisibility by remember { mutableStateOf(false) } | |
| val icon = if (passwordVisibility) | |
| painterResource(id = R.drawable.baseline_visibility_24) | |
| else | |
| painterResource(id = R.drawable.baseline_visibility_off_24) | |
| OutlinedTextField( | |
| value = password, onValueChange = { | |
| password = it |