Material 3 media gallery refresh.

This commit is contained in:
Alex Hart
2022-07-18 10:08:07 -03:00
committed by Cody Henthorne
parent b78633f9a7
commit 359a39ddaf
56 changed files with 423 additions and 303 deletions

View File

@@ -17,10 +17,12 @@ import android.view.ViewGroup;
import android.widget.Toast;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.ColorInt;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.WorkerThread;
import androidx.appcompat.app.AlertDialog;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import com.bumptech.glide.load.DataSource;
@@ -249,16 +251,17 @@ public final class ImageEditorFragment extends Fragment implements ImageEditorHu
restoredModel = null;
}
@ColorInt int blackoutColor = ContextCompat.getColor(requireContext(), R.color.signal_colorBackground);
if (editorModel == null) {
switch (mode) {
case AVATAR_EDIT:
editorModel = EditorModel.createForAvatarEdit();
editorModel = EditorModel.createForAvatarEdit(blackoutColor);
break;
case AVATAR_CAPTURE:
editorModel = EditorModel.createForAvatarCapture();
editorModel = EditorModel.createForAvatarCapture(blackoutColor);
break;
default:
editorModel = EditorModel.create();
editorModel = EditorModel.create(blackoutColor);
break;
}