Skip to content

Commit

Permalink
Merge pull request #163 from fejd/fix-morse-copy-paste
Browse files Browse the repository at this point in the history
Enable copy paste for morse code
  • Loading branch information
CrazyMarvin committed Oct 3, 2023
2 parents 073f1a4 + d917d99 commit d48c680
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

@SuppressLint("AppCompatCustomView")
public class EditTextTouch extends EditText {
public final OnTouchListener mOnTouchListener = (v, rawEvent) -> false;

public EditTextTouch(Context context) {
super(context);
Expand Down
10 changes: 0 additions & 10 deletions app/src/main/java/rocks/poopjournal/morse/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@ public void onGlobalLayout() {
}
}
};
private View.OnTouchListener otl = (v, event) -> {
return true; // the listener has consumed the event
};

public static void setMargins(View v, int l, int t, int r, int b) {
if (v.getLayoutParams() instanceof ViewGroup.MarginLayoutParams) {
Expand Down Expand Up @@ -766,7 +763,6 @@ public void onCompletion(MediaPlayer mp) {
input.setText("");
output.setText("");
textToMorse.set(false);
input.setOnTouchListener(otl);

bottomNavigation.setVisibility(View.VISIBLE);
morseInputContainer.setVisibility(View.VISIBLE);
Expand Down Expand Up @@ -801,14 +797,8 @@ public void onCompletion(MediaPlayer mp) {
buttonOne.setText("TEXT");
buttonTwo.setText("MORSE");
textToMorse.set(true);
input.setOnTouchListener((v16, event) -> {
v16.setOnTouchListener(input.mOnTouchListener);
return false;
});
bottomNavigation.setVisibility(View.GONE);
morseInputContainer.setVisibility(View.GONE);


}
});

Expand Down

0 comments on commit d48c680

Please sign in to comment.