Skip to content

Instantly share code, notes, and snippets.

View TylerMcCraw's full-sized avatar

Tyler McCraw TylerMcCraw

View GitHub Profile
@stevewadsworth
stevewadsworth / Gradle.properties
Last active October 13, 2020 18:43 — forked from neyguvj/build.gradle
Set default build variant witn variant filter (workaround)
#.
# Add to the end of existing file
#.
#.
# By default this is not a CI environment
# To configure for CI either pass to the gradle command -PisCI=true or
# set ORG_GRADLE_PROJECT_isCI=true in the environment
isCI=false
@mlykotom
mlykotom / Connecting_InjectingSavedStateViewModelFactory.kt
Last active May 4, 2020 14:06
Connecting The Dots :: InjectingViewModelFactory.kt
@Reusable
class InjectingSavedStateViewModelFactory @Inject constructor(
private val assistedFactories: Map<Class<out ViewModel>, @JvmSuppressWildcards AssistedSavedStateViewModelFactory<out ViewModel>>,
private val viewModelProviders: Map<Class<out ViewModel>, @JvmSuppressWildcards Provider<ViewModel>>
) {
/**
* Creates instance of ViewModel either annotated with @AssistedInject or @Inject and passes dependencies it needs.
*/
fun create(owner: SavedStateRegistryOwner, defaultArgs: Bundle? = null) =
object : AbstractSavedStateViewModelFactory(owner, defaultArgs) {
@adavis
adavis / AppComponent.java
Last active March 2, 2019 15:18
Background Jobs with Android Job and Dagger
@Singleton
@Component(
modules = {
AppModule.class, JobsModule.class
}
)
public interface AppComponent
{
Application getApplication ();
@josh-burton
josh-burton / androidmanifest.xml
Created May 3, 2017 02:07
Prevent TouchWiz from surrounding your app icon in a frame
<!-- Prevents TouchWiz from surrounding your app icon in a frame -->
<!-- Add to your manifest inside the application tag -->
<meta-data
android:name="com.samsung.android.icon_container.has_icon_container"
android:value="true"/>