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 be.tim.rijckaert.snaprecyclerview; | |
import android.graphics.PointF; | |
import android.support.annotation.NonNull; | |
import android.support.annotation.Nullable; | |
import android.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.LinearSnapHelper; | |
import android.support.v7.widget.OrientationHelper; | |
import android.support.v7.widget.RecyclerView; | |
import android.support.v7.widget.RecyclerView.LayoutManager; |
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
public class DiagonalView extends ImageView { | |
Context mContext; | |
/** | |
* @height is the height of view | |
*/ | |
int height = 0; | |
/** |
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"?> | |
<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> |
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
#!/bin/sh | |
# Only works on rooted devices and emulators | |
packageName="${1:-be.vrt.mobile.android.deredactie.debug}" | |
realmNameOnDevice="${2:-default.realm}" | |
outputLocation="${3:-.}" | |
adb start-server | |
adb shell mkdir /sdcard/tempdata |
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
APK_NAME = "test-butler-app-1.2.0.apk" | |
def install_test_butler(device_id): | |
is_emulator = device_id.startswith("emulator") | |
if is_emulator: | |
install_cmd = "adb -s %s install -r %s" % (device_id, APK_NAME) | |
subprocess.Popen(install_cmd, shell=True, stdout=subprocess.PIPE).stdout.read() | |
print "TestButler was installed on device with id: %s" % device_id |
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
private static class ImmediateSchedulersRule implements TestRule { | |
@Override | |
public Statement apply(final Statement base, Description description) { | |
return new Statement() { | |
@Override | |
public void evaluate() throws Throwable { | |
RxJavaPlugins.setIoSchedulerHandler(scheduler -> | |
Schedulers.trampoline()); | |
RxJavaPlugins.setComputationSchedulerHandler(scheduler -> | |
Schedulers.trampoline()); |
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
#!/usr/bin/python | |
import glob | |
import os | |
import sys | |
from subprocess import Popen, PIPE | |
# Script that will compare screenshots to a set of previous screenshots | |
# first arg: full path to base screenshots | |
# second arg: full path to spoon output dir |
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.arch.core":{ | |
"common":[ | |
"1.0.0-alpha4", | |
"1.0.0-alpha5", | |
"1.0.0-alpha6", | |
"1.0.0-alpha7", | |
"1.0.0-alpha8", |
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
private fun createNotification(channelId: String, text: String, title: String, id: String, url: String, bitmap: Bitmap): Notification { | |
return NotificationCompat.Builder(context, channelId) | |
.setContentTitle(title) | |
.setContentText(text) | |
.setSmallIcon(R.drawable.ic_notification) | |
.setContentIntent(createPendingIntent(id, url)) | |
.setAutoCancel(true) | |
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC) | |
.setSound(soundHelper.vrtNwsNotificationSound) | |
.setDefaults(NotificationCompat.DEFAULT_VIBRATE) |
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"?> | |
<shape xmlns:android="http://schemas.android.com/apk/res/android" | |
android:shape="rectangle"> | |
<gradient | |
android:angle="270" | |
android:startColor="#55000000" | |
android:centerColor="#33000000" | |
android:endColor="#AA000000" | |
android:type="linear"/> | |
</shape> |
OlderNewer