parent
3502a4be7c
commit
5a0205b64b
|
@ -67,3 +67,37 @@ 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;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
```
|
Loading…
Reference in New Issue