-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Right To Left flow direction is not applied to the ListView on the Mac and iOS platforms. #22391
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Closed similar issues:
|
Hi, @ArunachalamSyncfusion it looks to me like the iOS native behaviour. Setting
Here's a sample in Swift which shows that forcing RTL on the UITableView won't apply its to its cells like Android does import UIKit
class TableViewViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
let animals: [String] = ["Horse", "Cow", "Camel", "Sheep", "Goat"]
let cellReuseIdentifier = "cell"
private var tableView : UITableView = {
let tableView = UITableView()
tableView.semanticContentAttribute = .forceRightToLeft;
tableView.translatesAutoresizingMaskIntoConstraints = false;
return tableView
}()
override func viewDidLoad() {
super.viewDidLoad()
view.addSubview(tableView)
self.tableView.register(UITableViewCell.self, forCellReuseIdentifier: cellReuseIdentifier)
tableView.delegate = self
tableView.dataSource = self
NSLayoutConstraint.activate([
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
tableView.topAnchor.constraint(equalTo: view.topAnchor),
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
])
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return self.animals.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell:UITableViewCell = self.tableView.dequeueReusableCell(withIdentifier: cellReuseIdentifier)! as UITableViewCell
cell.textLabel?.text = self.animals[indexPath.row]
//uncomment to applu RTL
//cell.textLabel?.semanticContentAttribute = .forceRightToLeft
return cell
}
} In theory we could propagate it to viewCells, but this would be a new feature I think @PureWeen @jsuarezruiz? |
@kubaflo usually we propagate RTL settings all the way down the visual tree So it should work with CV. Does it not? |
Description
Right To Left flow direction is not applied to the ListView on the Mac and iOS platforms. On the Android and Windows, RTL applied to the ListView properly but the issue only occurred on Mac and iOS platforms. I have attached the output images of each platform after providing RTL to the list view.
Sample repository link - https://github.com/Arunachalam3641/ListViewRTL
Android
![image](https://private-user-images.githubusercontent.com/102668599/330376307-bb58b26e-7f3d-4d51-a975-61bcbe1188ca.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NzA2ODgsIm5iZiI6MTczOTU3MDM4OCwicGF0aCI6Ii8xMDI2Njg1OTkvMzMwMzc2MzA3LWJiNThiMjZlLTdmM2QtNGQ1MS1hOTc1LTYxYmNiZTExODhjYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNFQyMTU5NDhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xYjRmOTUwOWM1MGM4OTNkZDQwZmY3Y2UwODI3YTcxOTdjMmE2MDFiNDI1MDlmODNmZmYzODJmOGM1MGU3YjhkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.ZcKfNIxZaUjpe2P4VaZizLAIJhhVJs-q0VqYtRICjLI)
Windows platform
![image](https://private-user-images.githubusercontent.com/102668599/330376456-31db1e0d-a8c6-477c-b6ac-a742892b2e39.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NzA2ODgsIm5iZiI6MTczOTU3MDM4OCwicGF0aCI6Ii8xMDI2Njg1OTkvMzMwMzc2NDU2LTMxZGIxZTBkLWE4YzYtNDc3Yy1iNmFjLWE3NDI4OTJiMmUzOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNFQyMTU5NDhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04ODcyODU4MTc3MzMzYjhkNmIyYzc2OTg2NGUzM2Q5MzhjZWRkZjIzMjFmZjZiY2Y1MWU4YmRjYjhkMWQ5MTFjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.WbCqVz2aaxRAH3y8-8bfpv3z5yjZPBSYuZcaYNuhZW8)
Steps to Reproduce
Expected result:
RTL applied to the ListView.
Link to public reproduction project repository
https://github.com/Arunachalam3641/ListViewRTL
Version with bug
8.0.6 SR1
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS, macOS
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: