hello all i have problem with my app i update targetSdkVersion from 29 to targetSdkVersion 30 or 31
and i got problem
app work in all android version 10,9,8,7,etc
in android 11 I have button stop work to change from activity 1 to activity 2
this java from first java activity
case 503:
if (this.mMainGalleryLayout.getVisibility() == View.VISIBLE) {
this.mMainGalleryLayout.setVisibility(View.GONE);
}
if (this.mPatternGalleryLayout.getVisibility() == View.VISIBLE) {
this.mPatternGalleryLayout.setVisibility(View.GONE);
}
if (this.mSeekbarLayout.getVisibility() == View.VISIBLE) {
this.mSeekbarLayout.setVisibility(View.GONE);
}
if (this.mGridLayout.getVisibility() == View.VISIBLE) {
this.mGridLayout.setVisibility(View.GONE);
}
if (this.mFrameRatiosGalleryLayout.getVisibility() == View.VISIBLE) {
this.mFrameRatiosGalleryLayout.setVisibility(View.GONE);
}
if (this.mCount < this.mFrameNumber) {
Toast.makeText(getApplicationContext(), "Please fill all the images.", Toast.LENGTH_SHORT).show();
return;
} else if (!this.nextButtonClick) {
this.nextButtonClick = true;
hideAllAdjustor();
disableAllGalleryLayouts();
this.mMainFrameLayout.setDrawingCacheEnabled(false);
this.mFinalBitmap = this.mMainFrameLayout.getDrawingCache(true);
String saveBitmap = saveBitmap("imageforaddingstickerandtext", 100, this.mFinalBitmap);
this.mMainFrameLayout.destroyDrawingCache();
File file = new File(saveBitmap);
if (file.exists()) {
OpenShareActivity();
Intent Intent = new Intent(this, ShareActivity.class);
startActivity(Intent);
}
return;
} else {
return;
}
What's the problem?
You just said that "in android 11 I have button stop work to change from activity 1 to activity 2"
Does it mean that this code doesn't work? Did you add some debugged log to check the problem point?
else if (!this.nextButtonClick) {
this.nextButtonClick = true;
hideAllAdjustor();
disableAllGalleryLayouts();
this.mMainFrameLayout.setDrawingCacheEnabled(false);
this.mFinalBitmap = this.mMainFrameLayout.getDrawingCache(true);
String saveBitmap = saveBitmap("imageforaddingstickerandtext", 100, this.mFinalBitmap);
this.mMainFrameLayout.destroyDrawingCache();
File file = new File(saveBitmap);
if (file.exists()) {
OpenShareActivity();
Intent Intent = new Intent(this, ShareActivity.class);
startActivity(Intent);
}
return;
}