Android Studio のショーットカットが覚えられないので「CheatSheet」

こんな便利なショートカットあるのかと.

最近一番使っている道具であるAndroid Studioを見直してみました。
その結果、新たな便利機能を知ったり、改めて便利さを認識できたりしたので、メモがてら少しまとめてみました。

AndroidStudio - 普段使っている道具を見直す〜Android Studio編〜 - Qiita

眺めていると, 便利なのが多すぎて嫌になってきたのですが,

せっかくなので2,3個くらい覚えようと.

Override メソッドの一覧選択表示
ctrl + o

メソッド引数の種類表示
command + p

classの階層を表示
ctrl + h

...

多い. 多すぎる.

ショートカットが覚えられない

記事の最後に, こんな.

CheatSheet が便利です。
commandを長押ししているだけで、使用しているソフトウェアのCheatSheetが表示されます。

これを入れておくことにします.

CheatSheet

CheatSheet

インストールして, アクセサビリティまわりの許可をすると,

cheat

Screenshot_8_10_15__06_16

表示されます.

45438522-e948-9874-6714-5052a5563ca8

これって, Mac上どのアプリでもいけるのですね.便利だわ.

Android Studio の 設定検索のショートカット

Ctl + Shift + A

SlidingTabStrip

と合わせて使えば便利です.


C2DM 終了 GCMへの移行は10月までに

こんなの表示されてます. デベロッパーコンソール.

c2dm_gcm

C2DM のサポートがまもなく終了 Android Cloud to Device Messaging(C2DM)のサポートが完全に終了し、以降のサポートが提供されなくなることを 4 月に発表いたしました。C2DM は、次世代の C2DM である Google クラウド メッセージング(GCM)に代わります。C2DM を使用しているアプリの GCM への移行に十分な時間をかけられるよう、移行期限は 10 月まで延長されています。

ClientLogin for Google Cloud Messaging (GCM) has been shut down - Google グループ

該当するかどうかは, 「gcm.jar」 を利用しているかをみればよい.と.

C2DM をまだ使用しているアプリがある場合は、できる限り速やかに GCM に移行してください。2015 年 10 月までにアプリを最新の GCM ライブラリに移行しないと、C2DM プッシュ メッセージングが正常に機能しなくなります。C2DM を使用しているかどうかは、実装で gcm.jar ライブラリまたは GCM ヘルパー ライブラリを使用しているかで判断できます。

取得したトークンの文字列自体ははそのまま使えるのだろうと思います.

Cloud Messaging   |   Google Developers

変更の詳細手順は以下から.

Try Cloud Messaging for Android   |   Cloud Messaging   |   Google Developers


JSON の処理速度を4倍以上にアップできる「LoganSquare」

The fastest JSON parsing and serializing library available for Android. Based on Jackson's streaming API, LoganSquare is able to consistently outperform GSON and Jackson's Databind library by 400% or more1. By relying on compile-time annotation processing to generate code, you know that your JSON will parse and serialize faster than any other method available.

benchmarks

For the curious, the buildscript and apply plugin lines add the apt plugin, which is what allows us to do compile-time annotation processing. The first dependency is what tells Gradle to process your JSON annotations, and the second dependency is our tiny 19kb runtime library that interfaces with the generated code for you.

hvisser / android-apt — Bitbucket

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
    }
}
apply plugin: 'com.neenbedankt.android-apt'

dependencies {
    apt 'com.bluelinelabs:logansquare-compiler:1.1.0'
    compile 'com.bluelinelabs:logansquare:1.1.0'
}

bluelinelabs/LoganSquare


JSON を 整形して見やすく コマンドラインで

インデントを入れて整形する場合. コマンドラインにて.

$ cat admob.json | python -m json.tool
{
   "client" : [
      {
         "services" : {
            "ads_service" : {
               "test_banner_ad_unit_id" : "ca-app-pub-39402609994544/630097811",
               "status" : 2,
               "test_interstitial_ad_unit_id" : "ca-app-pub-39402609994544/630097811"
            }
         },
         "client_info" : {
            "client_id" : "android:com.google.samples.quickstart.admobexample",
            "android_client_info" : {
               "package_name" : "com.google.samples.quickstart.admobexample"
            },
            "client_type" : 1
         },
         "oauth_client" : []
      }
   ],
   "project_info" : {
      "project_number" : "",
      "project_id" : "",
      "name" : ""
   }
}

unix - How can I pretty-print JSON? - Stack Overflow

jq というのはカラーリングされる.

$ brew install jq

jq

jq Manual


Related Categories :  AndroidDevelopmemtNewbieTools


W/Resources﹕ Converting to string: TypedValue が連発

端末によって連発されることがある.

converting_to_string

W/Resources﹕ Converting to string: TypedValue

ログのフィルタを設定しなければいけないのか,

なにか記述が何か正しくないのか厳格に?

実際のアプリの挙動はおかしくないように見えているが.

Try going into developer options on the phone and uncheck the box for "Enable view attribute inspection"

Ah, good deal. This is expected behavior for view attribute inspection. You'll want to keep it off unless you're actually using the feature in hierarchyviewer as it degrades layout inflation performance.

Issue 78322 - android - Resources﹕ Converting to string: TypedValue - Android Open Source Project - Issue Tracker - Google Project Hosting

「開発者向けオプション」-「表示属性検査を有効にする」をOFFにすると消える.

20150719-011716

開発者オプションのなかに「表示属性検査を有効にする」という不思議な項目があります。これは英語表記のほうがわかりやすいかもしれません。英語では「Enable view attribute inspection」、Viewクラスの属性情報を監査するという意味だと思いますが、直訳したのでしょう。
利用には、チェックボックスを有効にしてから、Android Studio(またはEclipse)のAndroid Device Monitorから「Dump View Hierarchy for UI Automator」を選択します。

View Hierarchyでは、Viewの階層構造をダンプして構造やViewのもつ属性値を視覚化します。Viewの入れ子を減らすことはパフォーマンスに貢献するほか、現在のViewに何が設定されているか、その場でチェックできます。

Android 5.0 Lollipopの開発者オプション詳細解説 | TechBooster | Tech Booster

とりあえず今は, 「Dump View Hierarchy for UI Automator」を使う時だけONにする, と.