Skip to content

Commit

Permalink
Fix: Bubble Touch events & others (#72)
Browse files Browse the repository at this point in the history
* initial commit to fix

* fix: install package visibility for android R+
  • Loading branch information
KaustubhPatange authored Jun 15, 2023
1 parent 0936aff commit e4524de
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
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

0 comments on commit e4524de

Please sign in to comment.