aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java4
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/GiphyGifInfoBottomSheetFragment.java42
2 files changed, 45 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java
index 67d5cf3a..260ff43c 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java
@@ -57,6 +57,7 @@ import ml.docilealligator.infinityforreddit.account.Account;
import ml.docilealligator.infinityforreddit.adapters.MarkdownBottomBarRecyclerViewAdapter;
import ml.docilealligator.infinityforreddit.bottomsheetfragments.AccountChooserBottomSheetFragment;
import ml.docilealligator.infinityforreddit.bottomsheetfragments.CopyTextBottomSheetFragment;
+import ml.docilealligator.infinityforreddit.bottomsheetfragments.GiphyGifInfoBottomSheetFragment;
import ml.docilealligator.infinityforreddit.bottomsheetfragments.UploadedImagesBottomSheetFragment;
import ml.docilealligator.infinityforreddit.comment.Comment;
import ml.docilealligator.infinityforreddit.comment.SendComment;
@@ -313,7 +314,8 @@ public class CommentActivity extends BaseActivity implements UploadImageEnabledA
@Override
public void onSelectGiphyGif() {
- GiphyDialogFragment.Companion.newInstance().show(getSupportFragmentManager(), "giphy_dialog");
+ GiphyGifInfoBottomSheetFragment fragment = new GiphyGifInfoBottomSheetFragment();
+ fragment.show(getSupportFragmentManager(), fragment.getTag());
}
});
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/GiphyGifInfoBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/GiphyGifInfoBottomSheetFragment.java
new file mode 100644
index 00000000..60d5c330
--- /dev/null
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/GiphyGifInfoBottomSheetFragment.java
@@ -0,0 +1,42 @@
+package ml.docilealligator.infinityforreddit.bottomsheetfragments;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import androidx.annotation.NonNull;
+
+import com.giphy.sdk.ui.views.GiphyDialogFragment;
+
+import ml.docilealligator.infinityforreddit.activities.BaseActivity;
+import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
+import ml.docilealligator.infinityforreddit.databinding.FragmentGiphyGifInfoBottomSheetBinding;
+
+public class GiphyGifInfoBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
+
+ private BaseActivity activity;
+
+ public GiphyGifInfoBottomSheetFragment() {
+ // Required empty public constructor
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ FragmentGiphyGifInfoBottomSheetBinding binding = FragmentGiphyGifInfoBottomSheetBinding.inflate(inflater, container, false);
+
+ binding.selectGiphyGifButtonUploadedImagesBottomSheetFragment.setOnClickListener(view -> {
+ GiphyDialogFragment.Companion.newInstance().show(activity.getSupportFragmentManager(), "giphy_dialog");
+ dismiss();
+ });
+
+ return binding.getRoot();
+ }
+
+ public void onAttach(@NonNull Context context) {
+ super.onAttach(context);
+ this.activity = (BaseActivity) context;
+ }
+} \ No newline at end of file