Skip to content

Instantly share code, notes, and snippets.

Fabian Terhorst FabianTerhorst

Block or report user

Report or block FabianTerhorst

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View CollectionJsonAdapter.kt
package de.everhome.sdk.json
abstract class CollectionJsonAdapter<C : MutableCollection<T>, T>(private val elementAdapter: JsonAdapter<T>) : JsonAdapter<C>() {
override fun fromJson(reader: JsonReader): C? {
if (reader.peek() != Token.BEGIN_ARRAY) {
return null
val result = newCollection()
View NestedVerticalCellCollectionViewLayout.swift
open class NestedVerticalCellCollectionViewLayout<V: LayoutAdapterCollectionView, C: Collection>: BaseLayout<V>, ConfigurableLayout where C.Iterator.Element == Layout {
private let sectionLayouts: [Section<C>]
public init(sectionLayouts: [Section<C>], alignment: Alignment = .topFill, viewReuseId: String? = nil, config: ((V) -> Void)? = nil) {
self.sectionLayouts = sectionLayouts
super.init(alignment: alignment, flexibility: Flexibility(horizontal: nil, vertical: Flexibility.defaultFlex), viewReuseId: viewReuseId, config: config)
private var cachedSectionLayoutMeasurement: [Section<[LayoutMeasurement]>]?
public class FloatingActionButtonBehavior extends CoordinatorLayout.Behavior<FloatingActionButton> {
public FloatingActionButtonBehavior(Context context, AttributeSet attrs) {
super(context, attrs);
public boolean layoutDependsOn(CoordinatorLayout parent, FloatingActionButton child, View dependency) {
return dependency instanceof Snackbar.SnackbarLayout;// || dependency instanceof RecyclerView;
View Layout
<?xml version="1.0" encoding="utf-8"?>
< xmlns:android=""
You can’t perform that action at this time.