M M Arif 2019-12-03 13:06:35 +00:00
parent 3502a4be7c
commit 5a0205b64b
1 changed files with 35 additions and 1 deletions

@ -66,4 +66,38 @@ else {
``` ```
#### Tab or spaces? #### Tab or spaces?
GitNex app has used tabs(4 spaces) and it is recommended to use tab for indentation. GitNex app has used tabs(4 spaces) and it is recommended to use tab for indentation.
#### Multiple statements
All statements should have proper indentation. Example,
```
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
switch (item.getItemId()) {
case R.id.repoStargazers:
Intent intent = new Intent(context, RepoStargazersActivity.class);
intent.putExtra("repoFullNameForStars", fullName.getText());
context.startActivity(intent);
break;
case R.id.repoWatchers:
Intent intentW = new Intent(context, RepoWatchersActivity.class);
intentW.putExtra("repoFullNameForWatchers", fullName.getText());
context.startActivity(intentW);
break;
case R.id.repoOpenInBrowser:
Intent intentOpenInBrowser = new Intent(context, OpenRepoInBrowserActivity.class);
intentOpenInBrowser.putExtra("repoFullNameBrowser", fullName.getText());
context.startActivity(intentOpenInBrowser);
break;
}
return false;
}
});
```