ترفند های اندروید استودیو(بخش دوم)
چهارشنبه, ۲۰ ارديبهشت ۱۳۹۶، ۱۱:۰۱ ق.ظ
در ادامه مطلب ترفند های اندروید استودیو. در این قسمت هم میخوام چند ترفند رو بهتون بگم:
مقایسه تکه ای از کد با کد موجود در کلیپ بورد:
- Mouse: right-click the selection and select Compare With Clipboard
 - Find action: compare with clipboard
 
نوشتن شرط به صورت کامل:
ترفند زیر شرط شما رو از طرق زیر کامل میکنه:
- Add a semicolon at the end of the line, even if you are not at the end of the line
 - Add the parentheses and curly braces after an if, while or for
 - Add the curly braces after a method declaration
 
Shortcut:
- Mac: Cmd+Shift+Enter
 - Windows/Linux: Ctrl-Shift-Enter
 
حذف یک خط:
Shortcut: cmd+backspace(mac) or ctrl+y(windows/linux)
تکرار یک خط:
اگه چیزی انتخاب نکرده باشید .خطی که نشانگر روی اون هست کپی میشه. اگه چیزی انتخاب کرده باشید همون بخش انتخاب شده کپی میشه.
Shortcut: cmd+d(mac) or ctrl+d(windows/linux)