Kotlinはジャバである
- null許容型の正体
- 関数型の正体
- ラムダ式の正体
- 拡張関数の正体
| override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { | |
| val binding = parent.inflateBinding<ListItemCommentBinding>() | |
| return ViewHolder(binding) | |
| } |
PR: konifar/droidkaigi2016#108
アプリを起動(MainActivity)して任意のセッション詳細(SessionDetailActivity)を開いてSessionの状態を変更して戻る。このときMainActivityが破棄-再生成されていた場合にクラッシュする
MainActivity-SessionsFragment-ViewPager-SessionsTabFragmentの構造のなかで、それぞれのコンポーネント間で直接onActivityResult()を呼び出して伝搬する方法を取っていた。
| /** | |
| * 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: |
| 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 { |