You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the location of the balloon according to the anchor would be located at the boundaries on the screen,<br>
261
261
the balloon will be stick to the end of the screen. In this case, we can give horizontal margins to the balloon.
262
+
262
263
```kotlin
263
264
.setMargin(12) // sets the margin on the balloon all directions.
264
265
.setMarginLeft(14) // sets the left margin on the balloon.
265
266
.setMarginRight(14) // sets the right margin on the balloon.
266
267
```
267
268
269
+
### Auto-sized text
270
+
271
+
You can set auto-sized text based on the balloon's window size, specifying minimum and maximum text sizes, as shown in the example below:
272
+
273
+
```kotlin
274
+
.setTextSize(15f)
275
+
.setMinAutoSizeTextSize(14f)
276
+
.setMaxAutoSizeTextSize(18f)
277
+
.setEnableAutoSized(true)
278
+
```
279
+
280
+
> Note: Ensure that the maximum auto text size is set to a value higher than the minimum auto text size.
281
+
268
282
### Arrow Composition
269
283
We can customize the arrow on the Balloon with various methods. For more details, check out the [Balloon.Builder](https://skydoves.github.io/libraries/balloon/html/balloon/com.skydoves.balloon/-balloon/-builder/index.html).
270
284
@@ -322,9 +336,11 @@ We can customize the text on the Balloon.
322
336
```
323
337
324
338
If your text includes HTML tags, you can render the text by enabling HTML option with `setTextIsHtml` method.
339
+
325
340
```java
326
341
.setTextIsHtml(true)
327
342
```
343
+
328
344
This method will parse the text with the `Html.fromHtml(text)` internally.
0 commit comments