-
-
Notifications
You must be signed in to change notification settings - Fork 302
Description
Please complete the following information:
- Library Version 1.6.11
- Affected Device(s) - tested on multiple devices, like on emulator Pixel 9 Pro
Describe the Bug:
Hey folks, an issue I noticed is that when I set a custom layout and the height of the ballon to be wrapped:
return createBalloon(context) {
setLayout(R.layout.tooltip)
setHeight(BalloonSizeSpec.WRAP)
I noticed that the bottom of the text tends to get cut off.
See attached screenshot:
When I include the same layout on a regular Android layout, I don't see any problems:
Sample layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/container"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="#ff0077db">
<View
android:id="@+id/icon"
android:layout_width="84dp"
android:layout_height="84dp"
android:padding="16dp"/>
<LinearLayout
android:id="@+id/text_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_marginVertical="16dp">
<TextView
android:id="@+id/headline"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Sample text multiline abcqgj pjgxyz abcqgj pjgxyz"
android:textColor="#ffffffff"
android:textSize="17sp"/>
<TextView
android:id="@+id/headline_sub"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Sample text abcqgj pjgxyz abcqgj pjgxyz abcqgj pjgxyz"
android:textColor="#ffffffff"
android:textSize="15sp"/>
</LinearLayout>
</LinearLayout>
The issue seems to be similar to this one:
#372
However that issue seemed to be related to supporting multiple languages, while I'm seeing this problem even for a simple use-case, using a static layout.
I don't know how the layout is constructed by the library to include the arrow icon, etc., but my feeling is that something might be off there when calculating the height in certain use-cases.
Expected Behavior:
Height should be calculated properly and content should not be cut off.