Skip to content

Instantly share code, notes, and snippets.

View johanneslagos's full-sized avatar

Johannes Dvorak Lagos johanneslagos

View GitHub Profile

Keybase proof

I hereby claim:

  • I am johanneslagos on github.
  • I am dvoraklagos (https://keybase.io/dvoraklagos) on keybase.
  • I have a public key ASBaRFSrwIZ3Du3R4vuJzqfEgWHj8ge_zRAyPga9BmG1Lwo

To claim this, I am signing this object:

@johanneslagos
johanneslagos / PowerOutageMapFragment.kt
Last active January 25, 2019 14:53
Old Fashioned toggle buttons.
override fun onCreateView(layoutInflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
val toggle1 = view.toggle_button_1
val toggle2 = view.toggle_button_2
toggle1.setOnClickListener { onToggle(it) }
toggle2.setOnClickListener { onToggle(it) }
toggleGroup = view.toggle_group
toggleGroup.setOnCheckedChangeListener { group, checkedId ->
for (i in 0 until group.childCount) {
package no.vinmonopolet.searc
import android.app.Activity
import android.content.Intent
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import kotlinx.android.synthetic.main.activity_search.*
const val SEARCH_QUERY_STRING= "SEARCH_QUERY_STRING"
class SearchActivity : AppCompatActivity() {
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.ViewGroup;
#parse("File Header.java")
class ${NAME}(context:Context, val items: List<${ITEM_CLASS}>?) : RecyclerView.Adapter<${VIEWHOLDER_CLASS}>() {
override fun onBindViewHolder(holder: ${VIEWHOLDER_CLASS}, position: Int) {
package com.aaplab.android.robird.utils;
import android.app.ActivityManager;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask;