Skip to content

Commit 5af3643

Browse files
committed
[CollapsingToolbarLayout] Added experimental setRtlTextDirectionHeuristicsEnabled() method
PiperOrigin-RevId: 377044268 (cherry picked from commit ae82585)
1 parent bab907f commit 5af3643

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lib/java/com/google/android/material/appbar/CollapsingToolbarLayout.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,24 @@ public int getHyphenationFrequency() {
12921292
return collapsingTextHelper.getHyphenationFrequency();
12931293
}
12941294

1295+
/**
1296+
* Sets whether {@code TextDirectionHeuristics} should be used to determine whether the title text
1297+
* is RTL. Experimental Feature.
1298+
*/
1299+
@RestrictTo(LIBRARY_GROUP)
1300+
public void setRtlTextDirectionHeuristicsEnabled(boolean rtlTextDirectionHeuristicsEnabled) {
1301+
collapsingTextHelper.setRtlTextDirectionHeuristicsEnabled(rtlTextDirectionHeuristicsEnabled);
1302+
}
1303+
1304+
/**
1305+
* Gets whether {@code TextDirectionHeuristics} should be used to determine whether the title text
1306+
* is RTL. Experimental Feature.
1307+
*/
1308+
@RestrictTo(LIBRARY_GROUP)
1309+
public boolean isRtlTextDirectionHeuristicsEnabled() {
1310+
return collapsingTextHelper.isRtlTextDirectionHeuristicsEnabled();
1311+
}
1312+
12951313
/**
12961314
* Set the amount of visible height in pixels used to define when to trigger a scrim visibility
12971315
* change.

0 commit comments

Comments
 (0)