Add section about static imports

Sebastian
2020-12-07 17:55:43 +00:00
parent 5c1c851e1f
commit 863ca810ee

@@ -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 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 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) personal tab width in your Gitlab [profile preferences](https://code.briarproject.org/profile/preferences)
(Scroll to `Behavior``Tab width`) (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`.