View app_build.gradle
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 28 | |
defaultConfig { | |
applicationId "your.app.id" | |
minSdkVersion 21 |
View MainActivity.kt
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.github.quentin7b.estimateit | |
import android.os.Bundle | |
import android.util.Log | |
import android.view.Menu | |
import androidx.appcompat.app.AppCompatActivity | |
import androidx.core.view.MenuItemCompat | |
import androidx.mediarouter.app.MediaRouteActionProvider | |
import androidx.mediarouter.media.MediaControlIntent | |
import androidx.mediarouter.media.MediaRouteSelector |
View AndroidManifest.xml
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
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.github.quentin7b.estimateit"> | |
<application | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name"> | |
<meta-data | |
android:name="com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME" | |
android:value="com.github.quentin7b.estimateit.CastOptionsProvider" /> |
View CastOptionsProvider.kt
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.github.quentin7b.estimateit | |
import android.content.Context | |
import com.google.android.gms.cast.framework.CastOptions | |
import com.google.android.gms.cast.framework.OptionsProvider | |
class CastOptionsProvider : OptionsProvider { | |
override fun getCastOptions(ctx: Context): CastOptions { | |
return CastOptions | |
.Builder() |
View build.gradle
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 28 | |
defaultConfig { | |
applicationId "com.github.quentin7b.estimateit" |
View index.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
<!doctype html> | |
<html> | |
<head> | |
<title>Estimate It</title> | |
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'> | |
<style> | |
body { | |
background: white; | |
color: black; |
View TheActivity.kt
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
class TheActivity : AppCompatActivity() { | |
private val theSharedViewModel by viewModel<TheSharedViewModel>() | |
override fun onCreate(savedInstanceState: Bundle?) { | |
// bla bla bla | |
theSharedViewModel.getEvent().observe(this, Observer { | |
Log.i("TheSharedEvent", "Event Triggered") | |
}) | |
} |
View Android_tests.gradle
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
// Root build.gradle | |
allprojects { | |
repositories { | |
google() | |
jcenter() | |
maven { url 'https://jitpack.io' } | |
} | |
} | |
// Module build.gradle |
View Test_module_build.gradle
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: 'jacoco' | |
android { | |
testOptions { | |
unitTests.returnDefaultValues = true | |
} | |
jacoco { | |
version "0.7.1.201405082137" | |
} | |
} |
View Test_TestMyObject.java
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
import org.junit.Rule; | |
import org.junit.Test; | |
import org.junit.rules.ErrorCollector; | |
import org.junit.runner.RunWith; | |
import org.robolectric.RobolectricGradleTestRunner; | |
import org.robolectric.annotation.Config; | |
import static org.hamcrest.CoreMatchers.equalTo; | |
import static org.hamcrest.CoreMatchers.not; | |
NewerOlder