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
/** | |
* Created by pedromassango on 1/8/18. | |
*/ | |
public class UserJava implements Parcelable { | |
private String username; | |
private int age; | |
protected UserJava(Parcel in, String username, int age) { |
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
@SuppressLint("ParcelCreator") | |
@Parcelize | |
class User(var username: String, var age: Int): Parcelable |
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
// ADD this to use Parcelize, etc. | |
apply plugin: 'kotlin-android-extensions' | |
android { | |
... | |
defaultConfig { ... } | |
buildTypes { .... } | |
// ADD this to use Parcelize, etc. |
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
#Fri May 11 01:18:34 WAT 2018 | |
distributionBase=GRADLE_USER_HOME | |
distributionPath=wrapper/dists | |
zipStoreBase=GRADLE_USER_HOME | |
zipStorePath=wrapper/dists | |
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip |
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
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
ext.kotlin_version = '1.2.30' | |
repositories { | |
google() | |
jcenter() | |
} | |
dependencies { | |
//classpath 'com.android.tools.build:gradle:3.1.2' |
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: 'com.android.application' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
android { | |
compileSdkVersion 'android-P' | |
defaultConfig { | |
applicationId "com.pedromassango.materialdesigncomponents" |
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
<resources> | |
<!-- Base application theme. --> | |
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar"> | |
<!-- Customize your theme here. --> | |
<item name="colorPrimary">@color/colorPrimary</item> | |
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> | |
<item name="colorAccent">@color/colorAccent</item> | |
</style> |
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
val alarmMgr = getSystemService(Context.ALARM_SERVICE) as AlarmManager |
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
// Intent to start the Broadcast Receiver | |
val broadcastIntent = Intent(this, AlarmBroadcastReceiver::class.java) | |
// The Pending Intent to pass in AlarmManager | |
val pIntent = PendingIntent.getBroadcast(this,0,broadcastIntent,0) |
OlderNewer