mirror of
https://codeberg.org/gitnex/GitNex.git
synced 2024-12-16 15:48:13 +08:00
parent
3502a4be7c
commit
5a0205b64b
@ -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;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user