diff --git a/Code-Standards.md b/Code-Standards.md index 495ff02..2399fc4 100644 --- a/Code-Standards.md +++ b/Code-Standards.md @@ -66,4 +66,38 @@ else { ``` #### Tab or spaces? -GitNex app has used tabs(4 spaces) and it is recommended to use tab for indentation. \ No newline at end of file +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; + } +}); +``` \ No newline at end of file