AS快速開発

7124 ワード

本文はCSDNから移転して元の住所に来ます
概要:
現在、開発はますます効率とリズムを追求し、時間を節約してより多くのことをするようになり、開発技術上のパッケージなどのほか、開発ツールの使用技術も重要になっています.今日は主にAndroid Studioの急速な開発を紹介します.
Postfix completion
1.紹介: 2.よく使う接尾辞の紹介
  • .cast強制切替
  • .if
  • .elseif文に対する取反
  • .fieldメンバー変数生成-------(ctrl + alt + F類似)
  • .fori単純forサイクル
  • .for強化forサイクル使用
  • .forr逆forループ
  • .null快速判空
  • .nn/.notnullクイック判定非空
  • .switch
  • .inst/.instanceof
  • .var局所変数を生成する------(多くは言わないが、直接alt + enter)
  • .par式に括弧を付ける
  • 注意:次の2つはpluginを追加する必要があります:android Postfix completion
  • .logクイックプリントロゴ
  • .toast快速弾toast
  • 3.その他の表示
    ​ Settings-->Editor-->General-->Postfix Completion
    Live Templates
    1.紹介
    アクティブテンプレート.頻繁に使用するコード構造またはカスタムコード構造を挿入し、ソースファイルに迅速かつ効率的かつ正確に構築できます.
    2.システムテンプレート
    ​ Settings-->Editor-->Live Templates
    3.カスタムテンプレート
        
    

    4.テクニック
  • live templatesにコードを素早く追加し、コードを選択-->Tools->Save as Live Templates
  • テンプレートの略を覚えていない場合、Windows:ctrl + j------MAc:cmd + j. !!

  • ショートカットキー
    1.一般的なショートカットの紹介
  • Windows/Mac
  • ctrl + shift + A/cmd + shift + AASのすべての動作機能を検索(超強力)
  • shift/ shift工事中のすべてのファイルを検索(超強力)
  • F3/cmd + G次を探して協力ctrl + F使用------ps:リターンキーを押しても良い
  • shift + F3/cmd + shift + G前を検索して協力ctrl + F使用
  • ctrl + alt + B/cmd + alt + Bインタフェース/クラスの実装クラスまたは実装方法を見つけ、mvpモードでよく使う
  • F2/F2クイック位置決めエラー
  • ctrl + shift + backspace/cmd + shift + backspace前回編集した位置に戻る
  • ctrl + shift + V/cmd + shift + v貼付帳から選択貼付
  • ctrl + H/cmd + Hclassの継承構造を見る
  • ctrl + alt + H/cmd + alt + Hメソッドの階層呼び出し関係の表示
  • ctrl + P/cmd + P表示方法のパラメータタイプ
  • ctrl + Q/cmd + Q簡易文書をすばやく見る

  • 2.システムのデフォルトのショートカットキー
    1)一般タイプ
    description
    説明する
    Windows/Linux
    Mac
    Open settings dialogue
    クイックオープン設定
    Ctrl + Alt + S
    Cmd + , (comma)
    Open project structure dialog
    プロジェクト構造を開く
    Ctrl + Alt + Shift + S
    Cmd + ; (semicolon)
    2)追跡と検索
    description
    説明する
    Windows/Linux
    Mac
    Find
    検索
    Ctrl + Alt + S
    Cmd + , (comma)
    Search everything (including code and menus)
    すべて検索
    shiftを2回クリックすると検索できます
    shiftを2回クリックすると検索できます
    Find next
    順を下に検索
    F3
    Cmd + G
    Find action
    検索機能、超強力、asのすべての機能はこの機能を通じて検索することができます
    Ctrl + Shift + A
    Cmd + Shift + A
    Find class
    クラスをすばやく見つけてファイルを開く
    Ctrl + N
    Cmd + O
    Find file (instead of class)
    ファイルをすばやく検索
    Ctrl + Shift + N
    Cmd + Shift + O
    Find in path
    プロジェクトの下にあるすべてのパスの検索
    Ctrl + Shift + F
    Cmd + Shift + F
    Recently opened files pop-up
    最近開いたファイルを一覧表示
    Ctrl + E
    Cmd + E
    Recently edited files pop-up
    最近編集したファイルを一覧表示
    Ctrl + Shift + E
    Cmd + Shift + E
    Go to last edit location
    最後に編集した場所に戻る
    Ctrl + Shift + Backspace
    Cmd + Shift + Backspace
    Close active editor tab
    現在編集中のファイルを閉じる
    Ctrl + F4
    Cmd + W
    Open type hierarchy
    タイプ階層関係を開く
    Ctrl + H
    Cmd + H
    Open method hierarchy
    メソッド階層関係を開く
    Ctrl + Shift + H
    Cmd + Shift + H
    Open call hierarchy
    呼び出し階層関係を開く
    Ctrl + Alt + H
    Cmd + Option + H
    3)書き込みコード共通ショートカットキー
    description
    説明する
    Windows/Linux
    Mac
    Generate code (getters, setters, constructors, hashCode/equals, toString, new file, new class)
    さまざまな方法を迅速に生成
    Alt + Insert
    Cmd + N
    Override methods
    書き換え可能なすべてのメソッドを表示
    Ctrl + O
    Cmd + O
    Implement methods
    実装可能なすべてのメソッドを表示
    Ctrl + I
    Cmd + I
    Surround with (if…else/try…catch/etc.)
    文のif else,try catch forループなどをすばやく生成
    Ctrl + Alt + T
    Cmd + Option + T
    Delete line at caret
    カーソルの行を削除
    Ctrl + Y
    Cmd + Backspace
    Duplicate current line or selection
    新しい現在のロー、または新しいマルチラインコードをすばやく生成
    Ctrl + D
    Cmd + D
    Quick documentation lookup
    簡単なドキュメントをすばやく表示
    Ctrl + P
    Cmd + P
    Go to declaration (directly)
    変数またはメソッド宣言の検索
    Ctrl + B or Ctrl + Click
    Cmd + B or Cmd + Click
    Go to implementations
    インタフェースの実装クラスを見つけて、インタフェースの方法は実装所です
    Ctrl + Alt + B
    Cmd + Alt + B
    Go to super-method/super-class
    親メソッドまたは親メソッドの検索
    Ctrl + U
    Cmd + U
    Toggle project tool window visibility
    as左側のプロジェクトウィンドウを表示または非表示にする
    Alt + 1
    Cmd + 1
    Comment/uncomment with line comment
    クイック1行コメントまたはコメントの削除
    Ctrl +/
    Cmd +/
    Comment/uncomment with block comment
    複数行の注視または複数行の注釈の除去
    Cmd + Shift +/
    Cmd + Shift +/
    Project quick fix (show intention actions and quick fixes)
    現在の問題の解決策をいくつか示します(この方法は非常によく使われています).
    Alt + Enter
    Option + Enter
    Reformat code
    書式コード
    Ctrl + Alt + L
    Cmd + Option + L
    Next/previous highlighted error
    次/前のエラーが見つかりました
    F2/Shift + F2
    F2/Shift + F2
    4)コンパイル運転
    description
    説明する
    Windows/Linux
    Mac
    Build
    コンパイル
    Ctrl + F9
    Cmd + F9
    Build and run
    コンパイルして実行
    Shift + F10
    Cmd + R
    5)デバッグ
    description
    説明する
    Windows/Linux
    Mac
    Debug
    debugモード運転
    Shift + F9
    Shift + F9
    Step over
    次のステップ
    F8
    F8
    Step into
    F7
    F7
    Smart step into
    Shift + F7
    Shift + F7
    Resume program
    リカバリプログラム
    F9
    Cmd + Option + R
    6)修正
    description
    説明する
    Windows/Linux
    Mac
    Safe delete
    安全な削除
    Alt + Delete
    Cmd + Delete
    Extract method
    抽出方法
    Ctrl + Alt + M
    Cmd + Option + M
    Extract variable
    変数の抽出
    Ctrl + Alt + V
    Cmd + Option + V
    Extract field
    グローバル変数の抽出
    Ctrl + Alt + F
    Cmd + Option + F
    Extract constant
    抽出定数
    Ctrl + Alt + C
    Cmd + Option + C
    Extract parameter
    パラメータの抽出
    Ctrl + Alt + P
    Cmd + Option + P
    7)バージョン管理/ローカル履歴
    description
    説明する
    Windows/Linux
    Mac
    Commit project to VCS
    送信
    Ctrl + K
    Cmd + K
    Update project from VCS
    VCSからアイテムを更新
    Ctrl + T
    Cmd + T
    View recent changes
    最近の変更の表示
    Alt + Shift + C
    Option + Shift + C
    Open VCS popup
    バージョン管理設定ウィンドウを開く
    Alt + ` (backquote)
    Cmd + V
    拡張
    ショートカットのカスタマイズ
             。。。
    

    プラグイン
           。    butterknife、gsonformat 。            。
    

    これだけ言って、仲間が不足点を指摘することを歓迎します.