diff --git a/code-style.md b/code-style.md index 8749eb5..2836df8 100644 --- a/code-style.md +++ b/code-style.md @@ -37,4 +37,8 @@ By default Gitlab expands tabs to 8 characters in source code and diff views rather than 4 that we use in Android Studio. As a result the code looks very different in the browser than in the IDE. You can configure your personal tab width in your Gitlab [profile preferences](https://code.briarproject.org/profile/preferences) -(Scroll to `Behavior` → `Tab width`) \ No newline at end of file +(Scroll to `Behavior` → `Tab width`) + +# Static Imports + +Please use static imports of methods and fields such as `import static android.widget.Toast.LENGTH_LONG` wherever possible so that you can write `LENGTH_LONG` instead of `Toast.LENGTH_LONG`. Exceptions are cases where a static import reduces clarity such as writing `Builder` instead of `AlertDialog.Builder` or `MAX_VALUE` instead of `Integer.MAX_VALUE`. \ No newline at end of file