ショートカット「Find Action (⌘⇧A)」が使えない Android Studio "No manual entry for XXX\;type\=a"【macOS】

「Find Action (⌘⇧A)」が使えません。

Find Action (⌘⇧A)

「Search Everywhere (⇧⇧)」 からいくしかないのでしょうか。

Cmd+Shift+A hotkey opens Terminal with "apropos" search instead of the Find Action dialog – IDEs Support (IntelliJ Platform) | JetBrains

👉 Cmd+Shift+A hotkey opens Terminal with "apropos" search instead of the Find Action dialog – IDEs Support (IntelliJ Platform) | JetBrains 

Android Studio と macOS のショートカットの衝突のようです。


[システム環境設定]

    |

[キーボード]

    |

[ショートカット]

    |

[サービス]

    |

[ターミナルの...デックスで検索] を OFF

OSや各アプリやソフトウエアと異なったレイヤーでのショートカットの衝突。

最終的には、どちらを優先するか、ということだけになります。

👉 mac 特殊キーの記号 ⇧⌃⌥⌘などの入力方法 


【Google フォト対策】ffmpeg で動画軽量化

👉 Encode/AV1 – FFmpeg 

Android端末カメラで取得できる最高品質の動画を撮る。



パソコンのデスクトップ上に置いて、確認したあと、コーデック変換してサイズを下げる。


➜  ls -alh PXL_20201214_211006730.mp4
-rw-r--r--@ 1 nasu  staff   864M 12 15 13:14 PXL_20201214_211006730.mp4


➜  ffprobe -hide_banner PXL_20201214_211006730.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'PXL_20201214_211006730.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2020-12-14T21:12:41.000000Z
    com.android.capture.fps: 30.000000
  Duration: 00:02:30.34, start: 0.000000, bitrate: 48225 kb/s
    Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 191 kb/s (default)
    Metadata:
      rotate          : 90
      creation_time   : 2020-12-14T21:12:41.000000Z
      handler_name    : SoundHandle
    Stream #0:1(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt470bg/smpte170m), 3840x2160, 48030 kb/s, SAR 1:1 DAR 16:9, 29.98 fps, 30 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      rotate          : 90
      creation_time   : 2020-12-14T21:12:41.000000Z
      handler_name    : VideoHandle
    Side data:
      displaymatrix: rotation of -90.00 degrees


➜ ffmpeg -i PXL_20201214_211006730.mp4 -c:a copy -c:v libx265 -tag:v hvc1 PXL_20201214_211006730_hevc.mp4
...
frame= 4511 fps=5.4 q=31.0 size=  318720kB time=00:02:30.28 bitrate=17373.5kbitsframe= 4512 fps=5.3 q=34.2 Lsize=  323369kB time=00:02:30.30 bitrate=17625.0kbits/s dup=10 drop=5 speed=0.178x
video:319682kB audio:3517kB subtitle:0kB other streams:0kB global headers:2kB muxing overhead: 0.052518%
x265 [info]: frame I:     42, Avg QP:29.28  kb/s: 78656.18
x265 [info]: frame P:   1219, Avg QP:30.59  kb/s: 32333.41
x265 [info]: frame B:   3251, Avg QP:33.83  kb/s: 11025.11
x265 [info]: Weighted P-Frames: Y:10.1% UV:9.8%
x265 [info]: consecutive B-frames: 14.4% 7.1% 8.9% 45.5% 24.1%

encoded 4512 frames in 844.19s (5.34 fps), 17411.49 kb/s, Avg QP:32.91





サイズは1/2以下になるはず。


➜ ls -alh PXL_20201214_211006730*
-rw-r--r--@ 1 nasu  staff   864M 12 15 13:14 PXL_20201214_211006730.mp4
-rw-r--r--  1 nasu  staff   316M 12 15 13:33 PXL_20201214_211006730_hevc.mp4


➜  ffprobe -hide_banner PXL_20201214_211006730_hevc.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'PXL_20201214_211006730_hevc.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf58.45.100
  Duration: 00:02:30.40, start: 0.000000, bitrate: 17613 kb/s
    Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, progressive), 2160x3840 [SAR 1:1 DAR 9:16], 17412 kb/s, 30 fps, 30 tbr, 15360 tbn, 30 tbc (default)
    Metadata:
      handler_name    : VideoHandle
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 191 kb/s (default)
    Metadata:
      rotate          : 90
      handler_name    : SoundHandle

スマホで閲覧がメインな今、無駄な高画質動画など本当にいるか?

AV1はとろすぎ。

👉 【Googleフォト】一括で「高画質」へ変換して使用量を無制限にする方法 
👉 Google「バックアップと同期」が謎だったので整理する 
👉 Google フォト から写真や動画を一括で取得する – Google データエクスポート 
👉 「無料」は永遠ではない? 「Google フォト」が容量無制限の保存を終了する意味 | WIRED.jp 
👉 Googleフォトの[高画質]無制限バックアップが'21年6月終了。整理ツールも - Impress Watch 


アダプティブ バナー(Adaptive Banner) の width | SDK v20 の準備

スマートバナーてなくなるんですね!

全幅表示のバナーを引き続き使用したい場合は、以下のコード スニペットに示されるようにアダプティブ バナーを使用してください。

👉 SDK v20 の準備  |  Android  |  Google Developers 

サンプルコードのここら。


 // Determine the screen width (less decorations) to use for the ad width.
 // If the ad hasn't been laid out, default to the full screen width.
 private val adSize: AdSize
   get() {
     val display = windowManager.defaultDisplay
     val outMetrics = DisplayMetrics()
     display.getMetrics(outMetrics)

     val density = outMetrics.density

     var adWidthPixels = ad_view_container.width.toFloat()
     if (adWidthPixels == 0f) {
       adWidthPixels = outMetrics.widthPixels.toFloat()
     }

     val adWidth = (adWidthPixels / density).toInt()
     return AdSize.getCurrentOrientationAnchoredAdaptiveBannerAdSize(this, adWidth)
   }

👉 アダプティブ バナー |  Google Developers 

コメントにも書かれてるけど、ほぼ無意味な


var adWidthPixels = ad_view_container.width.toFloat()
if (adWidthPixels == 0f) {
      adWidthPixels = outMetrics.widthPixels.toFloat()
    }

通常の利用するタイミングを考えるとほぼ常に「0f」 でしょうか。

他の公式サンプルを見てみます。


   // Since we're loading the banner based on the adContainerView size, we need to wait until this
   // view is laid out before we can get the width.
   ad_view_container.viewTreeObserver.addOnGlobalLayoutListener {
     if (!initialLayoutComplete) {
       initialLayoutComplete = true
       loadBanner()
     }
   }

👉 googleads-mobile-android-examples/MyActivity.kt  

ad_view_container のレイアウトが完了するまで待ってから、loadBanner() → ad_view_container.width と処理が進んで前述分岐の意味が発生。

、、、

うん、

やっぱ、最近の公式サンプルコードやべーわ!

View サイズの取得のタイミングについては以下で🙆

👉 java - View's getWidth() and getHeight() returns 0 - Stack Overflow