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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> | |
<!-- | |
Checkstyle-Configuration: Android Checks (Android Studio) | |
Description: | |
Slightly modified version of Sun Checks that better matches the default code formatter setting of Eclipse. | |
--> | |
<module name="Checker"> | |
<property name="severity" value="warning"/> |
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
/** | |
* As we use app compat it seems Solo#setNavigationDrawer is not doing well (drawer does not open, but the button is clicked) | |
* Same result for clickOnView(getView(android.R.id.home)) | |
* | |
* This code opens the navigation drawer on the main thread | |
* Be aware : you need to provide your DrawerLayout id (you can do it in params) | |
*/ | |
public void openCompatNavigationDrawer() { | |
getInstrumentation().runOnMainSync(new Runnable() { | |
@Override |
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; | |
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" | |
} | |
} |
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 |
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") | |
}) | |
} |
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; |
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" |
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() |
OlderNewer