This file contains 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Ejemplo de código JavaScript en el propio documento</title> | |
<script type="text/javascript"> alert("Un mensaje de prueba"); | |
</script> | |
</head> | |
<body> | |
<p>Un párrafo de texto.</p> </body> | |
</html> |
This file contains 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
Android Manifest | |
<activity | |
android:name="SplashScreenActivity" | |
android:launchMode="singleTask" > | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.LAUNCHER" /> | |
</intent-filter> | |
</activity> |
This file contains 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
package com.example.hilttest.domain.agenda.model | |
/** | |
* Created by anahi.salgado on 27/07/2020 | |
*/ | |
data class Contact( | |
val name: String, | |
val phone: String | |
) |
This file contains 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
package com.example.hilttest.domain.agenda.model | |
/** | |
* Created by anahi.salgado on 27/07/2020 | |
*/ | |
class Agenda { | |
lateinit var type: String | |
lateinit var contacts: List<Contact> | |
This file contains 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
package com.example.hilttest.domain.agenda.model | |
/** | |
* Created by anahi.salgado on 27/07/2020 | |
*/ | |
class Agenda { | |
lateinit var type: String | |
lateinit var contacts: List<Contact> |
This file contains 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
fun main() { | |
val type = createType() | |
val contacts = createContacts() | |
val agenda = Agenda(type, contacts) | |
} | |
fun createType(): String = "Friends" | |
fun createContacts(): List<Contacts> = | |
listOf( |
This file contains 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: 'kotlin-kapt' | |
apply plugin: 'dagger.hilt.android.plugin' | |
dependencies { | |
def hilt_version = "2.28-alpha" | |
// Dagger Hilt | |
implementation "com.google.dagger:hilt-android:$hilt_version" | |
kapt "com.google.dagger:hilt-android-compiler:$hilt_version" |
This file contains 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 { | |
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version" | |
} |