Update 'Code Standards'
parent
0b096fd7de
commit
9ba8cb89e0
|
@ -31,8 +31,8 @@ import android.view.LayoutInflater;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Template Author M M Arif
|
* @author M M Arif
|
||||||
* Author 6543
|
* @author 6543
|
||||||
*/
|
*/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ Every layout must have components with defined ID's. Example,
|
||||||
|
|
||||||
```
|
```
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/branchName"
|
android:id="@+id/branch_name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
|
@ -133,7 +133,7 @@ Every layout must have components with defined ID's. Example,
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/branchCommitAuthor"
|
android:id="@+id/branch_commit_author"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -142,7 +142,7 @@ Every layout must have components with defined ID's. Example,
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/branchCommitHash"
|
android:id="@+id/branch_commit_hash"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -165,6 +165,8 @@ e.g: Right click on drawable directory in the project and choose New -> Vector A
|
||||||
1) **No gif/png etc are allowed**.
|
1) **No gif/png etc are allowed**.
|
||||||
2) **All drawables must be SVG**.
|
2) **All drawables must be SVG**.
|
||||||
|
|
||||||
|
Also check [Tabler Icons](https://tabler-icons.io/) for a comprehensive list.
|
||||||
|
|
||||||
#### Standard Variable Names
|
#### Standard Variable Names
|
||||||
App Context should be stored at the beggining once in `appCtx`.
|
App Context should be stored at the beggining once in `appCtx`.
|
||||||
Current Context should be stored at the beggining once in `ctx`.
|
Current Context should be stored at the beggining once in `ctx`.
|
||||||
|
@ -185,4 +187,4 @@ final Context ctx = LoginActivity.this;
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Static Variables
|
#### Static Variables
|
||||||
Static and standard reusable variables should be stored in [StaticGlobalVariables.java](https://codeberg.org/gitnex/GitNex/src/branch/master/app/src/main/java/org/mian/gitnex/helpers/StaticGlobalVariables.java).
|
Static and standard reusable variables should be stored in [Constants.java](https://codeberg.org/gitnex/GitNex/src/branch/main/app/src/main/java/org/mian/gitnex/helpers/Constants.java).
|
Loading…
Reference in New Issue