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 ru.eastbanctech.daggertest.base | |
import android.os.Bundle | |
import android.support.v4.app.Fragment | |
import dagger.android.AndroidInjection | |
import dagger.android.AndroidInjector | |
import dagger.android.DispatchingAndroidInjector | |
import dagger.android.support.HasSupportFragmentInjector | |
import etr.android.reamp.mvp.ReampAppCompatActivity | |
import etr.android.reamp.mvp.ReampPresenter |
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 ru.eastbanctech.demo.data.providers.resource | |
import android.content.Context | |
class ContextResourceProvider(private var context: Context) : ResourceProvider { | |
override fun getString(resId: Int): String = | |
context.resources.getString(resId) | |
override fun getString(resId: Int, vararg args: Any): String = | |
context.resources.getString(resId, *args) |
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 java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
import android.text.InputFilter; | |
import android.text.Spanned; | |
public class RegexInputFilter implements InputFilter { | |
private Pattern mPattern; |
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 lateinit var player: ExoPlayer | |
private lateinit var mediaSourceFactory: ExtractorMediaSource.Factory | |
private fun initPlayer() { | |
val bandwidthMeter = DefaultBandwidthMeter() | |
val videoTrackSelectionFactory = AdaptiveTrackSelection.Factory(bandwidthMeter) | |
val trackSelector = DefaultTrackSelector(videoTrackSelectionFactory) | |
val dataSourceFactory = DefaultDataSourceFactory(context, Util.getUserAgent(context, "A")) | |
mediaSourceFactory = ExtractorMediaSource.Factory(dataSourceFactory).setExtractorsFactory(DefaultExtractorsFactory()) | |
player = ExoPlayerFactory.newSimpleInstance(this, trackSelector) |
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.example.mobxtest | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import kotlinx.android.synthetic.main.activity_counter.* | |
import magneton.observable.ReactionDisposer | |
import magneton.observable.computed | |
import magneton.observable.observable | |
import magneton.observable.reaction |
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 me.aartikov.packtest | |
import au.com.dius.pact.consumer.ConsumerPactTestMk2 | |
import au.com.dius.pact.consumer.MockServer | |
import au.com.dius.pact.consumer.dsl.PactDslJsonBody | |
import au.com.dius.pact.consumer.dsl.PactDslWithProvider | |
import au.com.dius.pact.model.RequestResponsePact | |
import com.google.gson.Gson | |
import okhttp3.OkHttpClient | |
import okhttp3.Request |
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 me.aartikov.storesample | |
import com.dropbox.android.external.store4.* | |
import kotlinx.coroutines.delay | |
import kotlinx.coroutines.flow.Flow | |
import kotlinx.coroutines.flow.MutableStateFlow | |
import kotlinx.coroutines.flow.toList | |
import kotlinx.coroutines.launch | |
import kotlinx.coroutines.runBlocking | |
import org.junit.Assert.assertEquals |
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
internal object DelegateAccess { | |
internal val delegate = ThreadLocal<Any?>() | |
internal val delegateRequested = ThreadLocal<Boolean>().apply { set(false) } | |
} | |
internal val <T> KProperty0<T>.delegate: Any? | |
get() { | |
try { | |
DelegateAccess.delegateRequested.set(true) | |
this.get() |
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
abstract class DownloadNotificationManager(context: Context) : DefaultFetchNotificationManager(context) { | |
// Copied from DefaultFetchNotificationManager to hide Pause button | |
override fun updateNotification(notificationBuilder: NotificationCompat.Builder, | |
downloadNotification: DownloadNotification, | |
context: Context) { | |
val smallIcon = if (downloadNotification.isDownloading) { | |
android.R.drawable.stat_sys_download | |
} else { | |
android.R.drawable.stat_sys_download_done |
OlderNewer