summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaco <SkytkRSfan3895@gmail.com>2022-01-04 05:37:26 -0500
committerGitHub <noreply@github.com>2022-01-04 11:37:26 +0100
commit6154c8a282ce4b83654bf130ad506948fd2f2fc7 (patch)
tree7e623fcf3845030a95dc8468cf70008c47a2dfa2
parent8568226468e7377e273410847a97ebf8a1d7e5e7 (diff)
downloadantennapod-6154c8a282ce4b83654bf130ad506948fd2f2fc7.zip
Update Balloon library (#5584)
-rw-r--r--app/build.gradle2
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java5
-rw-r--r--core/src/main/res/layout/popup_bubble_view.xml55
3 files changed, 33 insertions, 29 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 5a6f57f5f..edfd124c3 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -155,7 +155,7 @@ dependencies {
implementation "com.github.AntennaPod:AntennaPod-AudioPlayer:$audioPlayerVersion"
implementation 'com.github.mfietz:fyydlin:v0.5.0'
implementation 'com.github.ByteHamster:SearchPreference:v2.0.0'
- implementation 'com.github.skydoves:balloon:1.1.5'
+ implementation 'com.github.skydoves:balloon:1.4.0'
implementation 'com.github.xabaras:RecyclerViewSwipeDecorator:1.3'
implementation 'com.annimon:stream:1.2.2'
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java
index 7361c8527..726eafa14 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java
@@ -22,6 +22,7 @@ import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions;
import com.google.android.material.snackbar.Snackbar;
import com.skydoves.balloon.ArrowOrientation;
+import com.skydoves.balloon.ArrowOrientationRules;
import com.skydoves.balloon.Balloon;
import com.skydoves.balloon.BalloonAnimation;
import de.danoeh.antennapod.R;
@@ -191,9 +192,11 @@ public class ItemFragment extends Fragment {
== View.LAYOUT_DIRECTION_RTL;
Balloon balloon = new Balloon.Builder(getContext())
.setArrowOrientation(ArrowOrientation.TOP)
+ .setArrowOrientationRules(ArrowOrientationRules.ALIGN_FIXED)
.setArrowPosition(0.25f + ((isLocaleRtl ^ offerStreaming) ? 0f : 0.5f))
.setWidthRatio(1.0f)
- .isRtlSupport(true)
+ .setMarginLeft(8)
+ .setMarginRight(8)
.setBackgroundColor(ThemeUtils.getColorFromAttr(getContext(), R.attr.colorSecondary))
.setBalloonAnimation(BalloonAnimation.OVERSHOOT)
.setLayout(R.layout.popup_bubble_view)
diff --git a/core/src/main/res/layout/popup_bubble_view.xml b/core/src/main/res/layout/popup_bubble_view.xml
index 6b2e16f99..cc93bec72 100644
--- a/core/src/main/res/layout/popup_bubble_view.xml
+++ b/core/src/main/res/layout/popup_bubble_view.xml
@@ -1,40 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="16dp">
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:padding="16dp">
<TextView
- android:layout_width="match_parent"
- android:textColor="?attr/colorOnSecondary"
- android:layout_height="wrap_content"
- android:lines="3"
- android:id="@+id/balloon_message"/>
+ android:id="@+id/balloon_message"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textColor="?attr/colorOnSecondary"
+ android:lines="3" />
<LinearLayout
- android:orientation="horizontal"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
- android:gravity="end">
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:layout_marginTop="4dp"
+ android:gravity="end">
<Button
- style="@style/Widget.MaterialComponents.Button.TextButton"
- android:textColor="?attr/colorOnSecondary"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/no"
- android:id="@+id/balloon_button_negative"/>
+ android:id="@+id/balloon_button_negative"
+ android:layout_width="wrap_content"
+ android:layout_height="36dp"
+ android:textColor="?attr/colorOnSecondary"
+ android:text="@string/no"
+ style="@style/Widget.MaterialComponents.Button.TextButton" />
<Button
- style="@style/Widget.MaterialComponents.Button.TextButton"
- android:textColor="?attr/colorOnSecondary"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/yes"
- android:id="@+id/balloon_button_positive"/>
+ android:id="@+id/balloon_button_positive"
+ android:layout_width="wrap_content"
+ android:layout_height="36dp"
+ android:textColor="?attr/colorOnSecondary"
+ android:text="@string/yes"
+ style="@style/Widget.MaterialComponents.Button.TextButton" />
</LinearLayout>
+
</LinearLayout>