Adress requested changes and remove an unused return value in NewPipeTextViewHelper
This commit is contained in:
parent
648641341f
commit
35401c0103
3 changed files with 7 additions and 12 deletions
|
|
@ -7,10 +7,9 @@ import androidx.annotation.NonNull;
|
|||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.AppCompatEditText;
|
||||
|
||||
import org.schabi.newpipe.util.NewPipeTextViewHelper;
|
||||
import org.schabi.newpipe.util.external_communication.ShareUtils;
|
||||
|
||||
import static org.schabi.newpipe.util.NewPipeTextViewHelper.shareSelectedTextWithShareUtils;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
|
|
@ -38,7 +37,8 @@ public class NewPipeEditText extends AppCompatEditText {
|
|||
@Override
|
||||
public boolean onTextContextMenuItem(final int id) {
|
||||
if (id == android.R.id.shareText) {
|
||||
return shareSelectedTextWithShareUtils(this);
|
||||
NewPipeTextViewHelper.shareSelectedTextWithShareUtils(this);
|
||||
return true;
|
||||
}
|
||||
return super.onTextContextMenuItem(id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,10 +7,9 @@ import androidx.annotation.NonNull;
|
|||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
|
||||
import org.schabi.newpipe.util.NewPipeTextViewHelper;
|
||||
import org.schabi.newpipe.util.external_communication.ShareUtils;
|
||||
|
||||
import static org.schabi.newpipe.util.NewPipeTextViewHelper.shareSelectedTextWithShareUtils;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
|
|
@ -38,7 +37,8 @@ public class NewPipeTextView extends AppCompatTextView {
|
|||
@Override
|
||||
public boolean onTextContextMenuItem(final int id) {
|
||||
if (id == android.R.id.shareText) {
|
||||
return shareSelectedTextWithShareUtils(this);
|
||||
NewPipeTextViewHelper.shareSelectedTextWithShareUtils(this);
|
||||
return true;
|
||||
}
|
||||
return super.onTextContextMenuItem(id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue