Skip to content

Instantly share code, notes, and snippets.

View TooLazyy's full-sized avatar

Artem TooLazyy

View GitHub Profile
@TooLazyy
TooLazyy / FeedFragment.kt
Created June 26, 2019 10:38
easy adapter
fun test() {
mAdapter.setItems(
ItemList.create()
.addAll(listOf<String>(), ForString())
.addAll(listOf<Int>(), ForInt())
)
}
class ForString : BindableItemController<String, ForString.Holder>() {
//хэдеры
public static final Map<String, String> OPTIONS_HEADERS = new HashMap<String, String> () {{
put("Access-Control-Request-Headers","authorization, content-type, accept, origin");
put("Origin", "http://demos.algorithmia.com");
put("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.7.7 (KHTML, like Gecko) Version/9.1.2 Safari/601.7.7");
put("Referer", "http://demos.algorithmia.com/colorize-photos/");
put("Access-Control-Request-Method", "POST");
}};
public static final Map<String, String> MAIN_HEADERS = new HashMap<String, String> () {{