alexbirkett/android-cassowary-layout

Cassowary layout does not support rtl

Opened this issue · 5 comments

Is there a easy way to support rtl..

How would you like it to behave?

It should be exactly mirror replica of the current layout.. Say you are creating constraint, a.left == 0.. Then b.right == 0. In normal case, a is placed at the left and b is at the right. When we switch to rtl, a should be at the right and b should be at the left.. In relative layout terms instead of using left and right, can we have start and end for the layout constraints.. Based on the language, it should adapt appropriately.

@rammuralidhar Inside Node.java add leading and trailing properties to Node, then modify String getCanonicalName(String name) to map them to either left or right based on your localization.

Thanks for input @yongsunCN

This is definitely doable if somebody wants to send a pull request.