Skip to content

Instantly share code, notes, and snippets.

Avatar
🍃

Takao Chiba chibatching

🍃
View GitHub Profile
@sys1yagi
sys1yagi / Usage.kt
Created May 12, 2017
Magic Data Binding inflate
View Usage.kt
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val binding = parent.inflateBinding<ListItemCommentBinding>()
return ViewHolder(binding)
}
View anatomy_kotlin.md

解剖 Kotlin ほんとはJavaなんだろ

Kotlinはジャバである

目次

  • null許容型の正体
  • 関数型の正体
  • ラムダ式の正体
  • 拡張関数の正体
View fix_issue_of_dont_keep_activities.md

PR: konifar/droidkaigi2016#108

もとの問題

アプリを起動(MainActivity)して任意のセッション詳細(SessionDetailActivity)を開いてSessionの状態を変更して戻る。このときMainActivityが破棄-再生成されていた場合にクラッシュする

構造的な問題

MainActivity-SessionsFragment-ViewPager-SessionsTabFragmentの構造のなかで、それぞれのコンポーネント間で直接onActivityResult()を呼び出して伝搬する方法を取っていた。

@devunwired
devunwired / GifDecoder.java
Last active Mar 7, 2022
An optimized implementation of GifDecoder for Android devices.
View GifDecoder.java
/**
* Copyright (c) 2013 Xcellent Creations, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
@wobbals
wobbals / AvcEncoder.java
Created Oct 31, 2012
MediaCodec encoder sample
View AvcEncoder.java
package com.opentok.media.avc;
import java.io.IOException;
import java.nio.ByteBuffer;
import android.media.MediaCodec;
import android.media.MediaCodecInfo;
import android.media.MediaFormat;
public class AvcEncoder {