This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# このスクリプトは他のスクリプトから使われます | |
# | |
# 接続するデバイスのシリアル番号を取得するスクリプト | |
# このスクリプトの標準出力の最後に、選択したデバイスのシリアル番号が出力されます | |
# 使う側は、最後の出力を使ってください | |
BUFIFS=$IFS | |
IFS= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.content.SharedPreferences; | |
import android.preference.PreferenceManager; | |
public class Settings { | |
// TODO: ここに各設定のGetter/Setterを追加 | |
/** | |
* ヘルパーメソッド | |
**/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.android.volley.AuthFailureError; | |
import com.android.volley.NetworkResponse; | |
import com.android.volley.ParseError; | |
import com.android.volley.Request; | |
import com.android.volley.Response; | |
import com.android.volley.toolbox.HttpHeaderParser; | |
import com.google.gson.Gson; | |
import com.google.gson.JsonSyntaxException; | |
import java.io.UnsupportedEncodingException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import com.android.volley.Request; | |
import com.android.volley.RequestQueue; | |
import com.android.volley.toolbox.Volley; | |
public class RequestManager { | |
// Singleton | |
private static RequestManager mInstance = new RequestManager(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<!-- From https://www.google.com/design/spec/style/color.html# --> | |
<color name="Red_50">#ffebee</color> | |
<color name="Red_100">#ffcdd2</color> | |
<color name="Red_200">#ef9a9a</color> | |
<color name="Red_300">#e57373</color> | |
<color name="Red_400">#ef5350</color> | |
<color name="Red_500">#f44336</color> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// アニメーション | |
<?xml version="1.0" encoding="utf-8"?> | |
<set xmlns:android="http://schemas.android.com/apk/res/android" | |
android:interpolator="@android:anim/accelerate_interpolator"> | |
<alpha | |
android:duration="500" | |
android:repeatCount="-1" | |
android:repeatMode="restart" | |
android:fromAlpha="0.8" | |
android:toAlpha="0.0" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gradlew app:lint | |
→app の部分に、モジュール名を入れる |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import CoreBluetooth; | |
+ (NSString *)centralManagerStateToString:(CBCentralManagerState)state { | |
NSString *stateStr; | |
switch (state) { | |
case CBCentralManagerStateResetting: | |
stateStr = @"CBCentralManagerStateResetting"; | |
break; | |
case CBCentralManagerStateUnsupported: | |
stateStr = @"CBCentralManagerStateUnsupported"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) build.gradleに以下の用に記載 | |
android { | |
... | |
signingConfigs { | |
debug { | |
storeFile file("debug.keystore") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.ActionBar; | |
import android.app.Activity; | |
import android.app.Fragment; | |
import android.app.FragmentTransaction; | |
public class TabManager { | |
public static <T extends Fragment> ActionBar.Tab createTab( | |
Activity activity, ActionBar actionBar, int fragmentContainerId, | |
int text_resid, String tag, Class<T> clazz, boolean select) { |
NewerOlder