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
class HexogenImageView @JvmOverloads constructor(context: Context, | |
attrs: AttributeSet? = null, | |
defStyleAttr: Int = 0 | |
) : ImageView(context, attrs, defStyleAttr) { | |
private var path: Path | |
private var paint: Paint | |
init { |
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
<animated-vector | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:aapt="http://schemas.android.com/aapt"> | |
<aapt:attr name="android:drawable"> | |
<vector | |
android:name="vector" | |
android:width="22dp" | |
android:height="22dp" | |
android:viewportWidth="22" | |
android:viewportHeight="22"> |
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
interface PaymentProvider { | |
fun pay() | |
fun isEnabled() | |
} |
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
@Binds | |
@IntoMap | |
@StringKey(CREDIT_CARD_KEY) | |
fun provideCardProvider(paymentProvider: CreditCardPaymentProvider): PaymentProvider |
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
interface Shape | |
class Triangle: Shape | |
class Rectangle: Shape | |
class Circle: Shape |
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
@Inject | |
lateinit var paymentProviders: Map<String, PaymentProvider> |
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
myViewModel = ViewModelProviders.of(this, viewModelFactory).get(MyViewModel::class.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 interface Factory { | |
@NonNull | |
<T extends ViewModel> T create(@NonNull Class<T> modelClass); | |
} |
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
class MyViewModel @Inject constructor(private val myRepository: MyRepository): ViewModel() { | |
} |
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
@Binds | |
@IntoMap | |
@ViewModelKey(MyViewModel::class) | |
abstract fun bindMyViewModel(myViewModel: MyViewModel): ViewModel |
OlderNewer