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
| Text(modifier = Modifier.tag("TxtColor"),text = "Color") |
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
| val txtColor = tag("TxtColor").apply { | |
| top constrainTo parent.top | |
| left constrainTo parent.left | |
| right constrainTo parent.right | |
| bottom constrainTo parent.bottom | |
| } |
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
| ConstraintLayout( | |
| constraintSet = ConstraintSet { | |
| // We will add the constraints here. | |
| }) { | |
| // We will declare our composable components here. | |
| // And they will be constrained by the constraints created in the ConstraintSet. | |
| } |
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
| arguments?.let { | |
| mPalestrante = SpeakersFragmentArgs.fromBundle(it).palestrante | |
| room_et_nome.setText(mPalestrante?.palestrante) | |
| room_et_tecnologia.setText(mPalestrante?.tecnologia) | |
| room_et_topico.setText(mPalestrante?.topico) | |
| } |
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
| @Dao | |
| interface DAO { | |
| @Insert | |
| suspend fun salvar(user: Utilizador) | |
| @Query("SELECT * FROM db.user") | |
| suspend fun buscarTodos(): List<Utilizador> | |
| @Update | |
| suspend fun actualizar(user: Utilizador) |
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
| @Entity(tableName = "db.palestrante") | |
| data class Palestrante( | |
| @PrimaryKey(autoGenerate = true) | |
| var id: Int, | |
| @ColumnInfo(name = "nome_palestrante") | |
| val nome: String | |
| ) |
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
| @Database(entities = [Palestrante::class], version = 1) | |
| abstract class PalestranteDB: RoomDatabase() { | |
| abstract fun dao(): PalestranteDA | |
| } |
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
| apply plugin: "androidx.navigation.safeargs" |
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
| buildscript { | |
| ext.kotlin_version = "1.4.0" | |
| repositories { | |
| google() | |
| jcenter() | |
| } | |
| dependencies { | |
| ... | |
| classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.0" | |
| } |
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
| if (mPalestrante != null) { | |
| room_btn_apagar.visibility = View.VISIBLE | |
| room_btn_apagar.setOnClickListener { | |
| apagarPalestrante() | |
| } | |
| } |
NewerOlder