Skip to content

Instantly share code, notes, and snippets.

View kojiokb's full-sized avatar

kojiokb

  • Japan
View GitHub Profile
@kojiokb
kojiokb / color_grid.md
Created November 10, 2016 14:41
BlenderのColor Gridを画像ファイルとして保存するスクリプト
@kojiokb
kojiokb / PronamaChanCalendarActivity.java
Created October 12, 2014 16:30
「プロ生ちゃん #カレンダープログラミング プチコンテスト 2014」
package com.example.calendar;
import android.app.Activity;
import android.os.Bundle;
import android.view.ViewGroup;
import android.widget.CalendarView;
import android.widget.RelativeLayout;
public class PronamaChanCalendarActivity extends Activity {
@kojiokb
kojiokb / res_values-v14_styles.xml
Created October 12, 2012 13:50
いまどきの透明なActivityのつくり方
<resources>
<style name="AppTheme" parent="android:Theme.Holo.Light.NoActionBar">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
</style>
</resources>
@kojiokb
kojiokb / DebugLog.java
Created September 5, 2012 14:36
ダブルクリックでジャンプできるようにログを出す方法
import android.util.Log;
public class DebugLog {
private static final String TAG = "MyApp";
private static final int MAX_TAB_COUNT = 8;
private static final int TAB_SIZE = 4;
private static final int INDEX = 3;
/*
@kojiokb
kojiokb / DebugLog.java
Created September 2, 2012 05:38
デバッグビルド時のみログを出力する
import android.util.Log;
public class DebugLog {
public static void v(String tag, String message) {
if (BuildConfig.DEBUG) {
Log.v(tag, message);
}
}
@kojiokb
kojiokb / gist:3563231
Created September 1, 2012 03:19
ロックスクリーンを考慮して処理の再開を行う方法
import android.app.Activity;
import android.app.KeyguardManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.util.Log;
public class MainActivity extends Activity {
@kojiokb
kojiokb / gist:3548765
Created August 31, 2012 03:36
MessageDigest メモ
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
public class MainActivity extends Activity {
private final String TAG = getClass().getSimpleName();
@kojiokb
kojiokb / gist:3499202
Created August 28, 2012 15:37
Activity#isFinishing()調査
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
public class MainActivity extends Activity {
private final String TAG = getClass().getSimpleName();
@Override
public void onCreate(Bundle savedInstanceState) {
@kojiokb
kojiokb / MainActivity.java
Created August 27, 2012 04:46
SoundPoolの使い方
import android.app.Activity;
import android.content.Context;
import android.media.AudioManager;
import android.media.SoundPool;
import android.os.Bundle;
import android.view.View;
public class MainActivity extends Activity implements View.OnClickListener {
private SoundPool mSoundPool;
@kojiokb
kojiokb / FbDialog.java
Created August 26, 2012 06:19
Facebook SDK for Android ログインダイアログ Backキー対応
/*
* Copyright 2010 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software