You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* We use a line margin of 150 rather than the default of 100 as the default causes excessive line breaks. The larger margin allows us to take advantage of modern widescreen monitors with more screen real-estate.
8
+
We've provided a coding style that can be imported into Android Studio.
9
+
The file can be found [here](ddg-settings.zip).
14
10
15
-
**IDE Setup:**
16
-
* Open android studio preferences
17
-
* Tap on code style
18
-
* Enter 150 into "Page margin"
11
+
* From Android Studio click on File -> Import Settings
* Import all components required (AndroidEditors and Code Style)
22
17
23
-
## Timber
18
+
## Code conventions
19
+
20
+
### Logging
24
21
When logging with Timber we use the new Kotlin styles strings
25
22
26
23
```Timber.w("Loading $url")```
@@ -31,7 +28,7 @@ Rather than C style strings
31
28
32
29
Mixing the two styles within a single statement can lead to crashes so we have standardized on the more readable Kotlin style. This is slightly less efficient - should efficiency become an issue we can use proguard to optimize away log statements for releases.
33
30
34
-
## Package Names
31
+
###Package Names
35
32
Case in package names is problematic as some file system and tools do not handle case sensitive file changes well. For this reason, we opt for lowercase packages in our project. Thus we have:
0 commit comments