Skip to content

Instantly share code, notes, and snippets.

@yyaammaa
yyaammaa / cv2.md
Created October 30, 2017 07:19
cv2のインストール
@yyaammaa
yyaammaa / a.json
Created September 3, 2015 05:10
S3のバケットポリシーでよく使うやつ
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AddPerm",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::hogehoge.yyaammaa.com/*"
}

MergeAdapter便利

ふとFoursquareアプリのLicense表示を見たら便利そうなライブラリを発見して便利だったので紹介。

MergeAdapterとは

MergeAdapterは、google groupsとかstackoverflowでAndroidの問題を探しているとかなりの頻度で目にするMark Murphy(@commonsguy) さんが作成した便利なAdapterです。

MergeAdapter accepts a mix of Adapters and Views and presents them as one contiguous whole to whatever ListView it is poured into. This is good for cases where you have multiple data sources, or if you have a handful of ordinary Views to mix in with lists of data, or the like.

@yyaammaa
yyaammaa / header.md
Last active December 8, 2016 09:08
Butter Knifeを使ってListViewの複雑なHeaderをすっきり書く
@yyaammaa
yyaammaa / gist:7480613
Last active June 30, 2017 02:50
Butter Knifeの紹介

Butter Knifeの紹介

Android用のView Injectionライブラリである Butter Knife について解説します (といいますか、サイトに書いてあることをほとんどそのまま日本語にしただけです) 。

概要

Butter Knifeは ActionBarSherlock などでお馴染みの Square のJake WhartonさんによるAndroid用のView Injectionライブラリです。

使い方

このライブラリの目的が、

  • Activity, ViewのfindViewByIdを楽に書く
@yyaammaa
yyaammaa / gist:7314571
Last active December 27, 2015 10:49
Android 4.3 (API level 18) でAction Barの影が出ない

Android 4.3 (API level 18) でAction Barの影が出ない

問題

Issue 58280: ActionBar does not display windowContentOverlay drawable
android:windowContentOverlay がAndroid 4.3 (API level 18) で無視されるため、Action Barの影をカスタムで指定できない

styles.xml

<resources>
    <style name="AppTheme" parent="android:Theme.Light">