SimpleMobileTools / Simple-Notes

A simple textfield for adding quick notes without ads.
https://www.simplemobiletools.com
GNU General Public License v3.0
828 stars 274 forks source link

Fix 353: Change gravity internally from Left and Right to Start and End #648

Closed Dejvino closed 1 year ago

Dejvino commented 1 year ago

Replaces Left and Right gravity with the proper Start and End equivalents to support RTL languages.

Fixes #353: Aligning RTL text isn't working correctly.

Before the change, notes and checklists in the app were aligned to one side, either Left or Right (regardless of LTR or RTL of the language). This was inconsistent with the widgets, which were already using Start and End gravity (widget_text_layout.xml).

After the change to Start / End, both LTR and RTL languages can coexist in the same note / checklist.

The Alignment setting should not be needed anymore for RTL as it works out of the box. It still uses the Left & Right terms for simplicity and even swaps the labels for RTL languages. TBD if renaming them to something like "Default" and "Inverted" would make more sense.

tibbi commented 1 year ago

should be good, thanks