From 0dc593e34e9e8d2ab465e3e4b346bfbf29ded2f0 Mon Sep 17 00:00:00 2001 From: M M Arif Date: Tue, 28 Apr 2020 11:00:44 +0000 Subject: [PATCH] --- Code-Standards.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Code-Standards.md b/Code-Standards.md index c232489..91e3a5c 100644 --- a/Code-Standards.md +++ b/Code-Standards.md @@ -166,11 +166,18 @@ GitNex use all the default icons provided with Android Studio licensed under Apa App Context should be stored at the beggining once in `appCtx`. Current Context should be stored at the beggining once in `ctx`. -appCtx: +appCtx example in fragment(change to getApplicationContext in activity): ``` private Context appCtx; -appCtx = getApplicationContext(); +public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { + appCtx = getContext(); +} +``` + +ctx example: +``` +final Context ctx = LoginActivity.this; ``` #### Static Variables