Skip to content

Instantly share code, notes, and snippets.

View nomisRev's full-sized avatar
🏂

Simon Vergauwen nomisRev

🏂
View GitHub Profile
@MisterRager
MisterRager / Rx2ServiceBindingFactory.java
Last active July 17, 2019 18:46
Bind to an Android service using RxJava!
import android.app.Service;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Binder;
import android.os.IBinder;
import io.reactivex.Observable;
@timrijckaert
timrijckaert / AndroidManifest.xml
Last active May 2, 2020 19:32
Test rule that disables animations and softkeyboard before any test. Easy access function to control demo modus on API 23 and up devices
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="be.rijckaert.tim.disableanimations">
<!-- Place this permission in your debug folder -->
<uses-permission android:name="android.permission.SET_ANIMATION_SCALE"/>
</manifest>
@aahlenst
aahlenst / RxIdlingResource.java
Last active July 27, 2021 15:56
IdlingResource that makes Espresso 2 wait until all RxJava 2 tasks have finished
/*
* The MIT License
*
* Copyright (c) 2016 Andreas Ahlenstorf
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@EricKuck
EricKuck / ButterknifeConductor.kt
Last active May 9, 2019 20:30
Kotterknife(ish) view binding for Conductor controllers
// Largely borrowed from Jake Wharton's Kotterknife (https://github.com/JakeWharton/kotterknife)
// and paweljaneczek's PR for resetting cached views (https://github.com/JakeWharton/kotterknife/pull/37)
package com.bluelinelabs.conductor.butterknife
import android.view.View
import com.bluelinelabs.conductor.Controller
import java.util.Collections
import java.util.WeakHashMap
import kotlin.properties.ReadOnlyProperty
@billmote
billmote / AndroidManifest.xml
Last active October 15, 2023 10:48 — forked from JakeWharton/gist:f50f3b4d87e57d8e96e9
When pushing code from your IDE, wake the device and show the activity.
<?xml version="1.0" encoding="utf-8"?>
<!-- Add this as a debug manifest so the permissions won't be required by your production app -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
</manifest>