Added option for sharing achievements and a back button in ProfileActivity (#4489)

* UI done

* Share added

* Minor modification

* tests added

* tests added

* tests added

* modified

* modifications

* modification

* Entered if

* Entered if

* 97% coverage

* Separate

* Minor modifications

* Minor modifications
This commit is contained in:
Ayan Sarkar 2021-07-18 05:40:32 +05:30 committed by GitHub
parent 9643d8d0b8
commit 3b7aa0376d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 189 additions and 118 deletions

View file

@ -178,9 +178,13 @@ public class Utils {
public static Bitmap getScreenShot(View view) {
View screenView = view.getRootView();
screenView.setDrawingCacheEnabled(true);
Bitmap bitmap = Bitmap.createBitmap(screenView.getDrawingCache());
screenView.setDrawingCacheEnabled(false);
return bitmap;
Bitmap drawingCache = screenView.getDrawingCache();
if (drawingCache != null) {
Bitmap bitmap = Bitmap.createBitmap(drawingCache);
screenView.setDrawingCacheEnabled(false);
return bitmap;
}
return null;
}
/*