View SchoolViewHolder.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
public class SchoolViewHolder extends RecyclerView.ViewHolder { | |
private ItemSchoolBinding binding; | |
// @VisibleForTesting | |
// protected EventBus eventBus = EventBus.getDefault(); | |
private EventBus eventBus; | |
public SchoolViewHolder(@NonNull View itemView) { |
View CoroutinesRule.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.abercrombie.testing.ui.rules | |
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.ExperimentalCoroutinesApi | |
import kotlinx.coroutines.test.TestCoroutineDispatcher | |
import kotlinx.coroutines.test.TestCoroutineScope | |
import kotlinx.coroutines.test.resetMain | |
import kotlinx.coroutines.test.runBlockingTest | |
import kotlinx.coroutines.test.setMain | |
import org.junit.rules.TestRule |
View spotless.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
subprojects { | |
apply plugin: "com.diffplug.gradle.spotless" | |
spotless { | |
format 'xml', { | |
target '**/layout*/*.xml' | |
indentWithSpaces(2) | |
eclipseWtp('xml').configFile rootProject.file('spotless.xml.prefs') | |
} | |
} |
View gist:460bd53b5c6096fc43866020a9bde4d9
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
ffmpeg -loglevel 99 -i "https://webcamstream.multivista.com/live/amlst:dal_59169_1.stream/chunklist_w95623917_b300000.m3u8" -ss 00:00:14.435 -vframes 1 -strftime 1 "%Y-%m-%d_%H-%M-%S_crew_stadium.png" |
View commit-msg
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 | |
commit_regex='^(PP-[0-9]+|fixup!)' | |
error_msg="Aborting commit. Your commit message is missing a JIRA ticket ('PP-1234')" | |
if ! grep -iqE "$commit_regex" "$1"; | |
then | |
echo "$error_msg" >&2 | |
exit 1 |
View PlainAndroidRunner.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 us.nineworlds.serenity.testrunner | |
import org.junit.runners.model.FrameworkMethod | |
import org.junit.runners.model.InitializationError | |
import org.robolectric.RobolectricTestRunner | |
import org.robolectric.annotation.Config | |
import org.robolectric.internal.SandboxTestRunner | |
import org.robolectric.internal.bytecode.Sandbox | |
import java.lang.reflect.Method |
View MediaCodecInfoUtil.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 us.nineworlds.serenity.common.android.mediacodec | |
import android.media.MediaCodecList | |
import android.util.Log | |
class MediaCodecInfoUtil { | |
val supportedContainers = hashMapOf<String, Boolean>("video/mkv" to true, "video/mp4" to true, "video/avi" to false, "video/webm" to true, "video/ogg" to true, "video/mv4" to true) | |
/** |
View BindingAdapter.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
// Apache 2.0 licensed. | |
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.BaseAdapter; | |
/** An implementation of {@link BaseAdapter} which uses the new/bind pattern for its views. */ | |
public abstract class BindableAdapter<T> extends BaseAdapter { |
View AnimatingDialogFragment.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
/** | |
* Dialog Fragment with hide animations | |
*/ | |
class AnimatingDialogFragment : DialogFragment() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setStyle(DialogFragment.STYLE_NO_FRAME, R.style.TvTheme_Dialog) | |
} |
View FocusableLinearLayoutManager.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
/** | |
* The MIT License (MIT) | |
* Copyright (c) 2018 David Carver | |
* 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 furnished to do so, subject to | |
* the following conditions: |
NewerOlder