From c8802fe5d0d6be3d3297066a66fedcc9eb3219ab Mon Sep 17 00:00:00 2001 From: TiA4f8R <74829229+TiA4f8R@users.noreply.github.com> Date: Tue, 14 Sep 2021 20:19:17 +0200 Subject: [PATCH] Add JavaDocs on created views --- .../java/org/schabi/newpipe/views/NewPipeEditText.java | 9 +++++++++ .../java/org/schabi/newpipe/views/NewPipeTextView.java | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/views/NewPipeEditText.java b/app/src/main/java/org/schabi/newpipe/views/NewPipeEditText.java index 15a70f360..c7a397fbe 100644 --- a/app/src/main/java/org/schabi/newpipe/views/NewPipeEditText.java +++ b/app/src/main/java/org/schabi/newpipe/views/NewPipeEditText.java @@ -11,7 +11,16 @@ import androidx.appcompat.widget.AppCompatEditText; import org.schabi.newpipe.util.external_communication.ShareUtils; +/** + * An {@link AppCompatEditText} which uses {@link ShareUtils#shareText(Context, String, String)} + * when sharing selected text by using the {@code Share} command of the floating actions. + *

+ * This allows NewPipe to show Android share sheet instead of EMUI share sheet when sharing text + * from {@link AppCompatEditText} on EMUI devices. + *

+ */ public class NewPipeEditText extends AppCompatEditText { + public NewPipeEditText(@NonNull final Context context) { super(context); } diff --git a/app/src/main/java/org/schabi/newpipe/views/NewPipeTextView.java b/app/src/main/java/org/schabi/newpipe/views/NewPipeTextView.java index f69dfb33b..321f1e34d 100644 --- a/app/src/main/java/org/schabi/newpipe/views/NewPipeTextView.java +++ b/app/src/main/java/org/schabi/newpipe/views/NewPipeTextView.java @@ -11,6 +11,14 @@ import androidx.appcompat.widget.AppCompatTextView; import org.schabi.newpipe.util.external_communication.ShareUtils; +/** + * An {@link AppCompatTextView} which uses {@link ShareUtils#shareText(Context, String, String)} + * when sharing selected text by using the {@code Share} command of the floating actions. + *

+ * This allows NewPipe to show Android share sheet instead of EMUI share sheet when sharing text + * from {@link AppCompatTextView} on EMUI devices. + *

+ */ public class NewPipeTextView extends AppCompatTextView { public NewPipeTextView(@NonNull final Context context) {