mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
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:
parent
9643d8d0b8
commit
3b7aa0376d
5 changed files with 189 additions and 118 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue