From 5a0205b64b0d3788990a1efdf5d10d4e2400eac0 Mon Sep 17 00:00:00 2001 From: M M Arif Date: Tue, 3 Dec 2019 13:06:35 +0000 Subject: [PATCH] --- Code-Standards.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) 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