Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Bubble Touch events & others #72

Merged
merged 2 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions XClipper.Android/modules/core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
<!-- For VibrateUtils -->
<uses-permission android:name="android.permission.VIBRATE" />

<!-- For Querying package list -->
<queries>
<intent>
<action android:name="android.intent.action.MAIN"/>
</intent>
</queries>

<application>
<activity
android:name="com.kpstv.xclipper.ui.dialogs.FeatureDialog$DialogActivity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ public void onUp(float x, float y) {
addSelectively(x, y);
Log.d(FloatingBubblePhysics.class.getSimpleName(), previous.toString());

if (previous[0] == null) {
moveToCorner();
} else {
moveLinearlyToCorner();
}
moveLinearlyToCorner();
// if (previous[0] == null) {
// moveToCorner();
// } else {
// }
}

private void moveLinearlyToCorner() {
Expand All @@ -70,13 +70,15 @@ private void moveLinearlyToCorner() {
int x2 = previous[1].x;
int y2 = previous[1].y;

if (x2 == x1) {
moveToCorner();
return;
}
// if (x2 == x1) {
// moveToCorner();
// return;
// }

int xf = x1 < x2 ? sizeX - bubbleView.getWidth() : 0;
int yf = y1 + (y2 - y1) * (xf - x1) / (x2 - x1);
int xf = x2 >= (sizeX / 2) ? sizeX - bubbleView.getWidth() : 0;
int yf = y2;
// int xf = x1 < x2 ? sizeX - bubbleView.getWidth() : 0;
// int yf = y1 + (y2 - y1) * (xf - x1) / (x2 - x1);
animator.animate(xf, yf);
}

Expand Down