[TIMOB-16454] TiAPI: Customize button title similar to TableView deleteButtonTitle
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | Low |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | Release 3.2.1 |
| Fix Version/s | n/a |
| Components | TiAPI |
| Labels | delete, listitem, listview, tableView |
| Reporter | Craig Jones |
| Assignee | Unknown |
| Created | 2014-02-11T14:42:53.000+0000 |
| Updated | 2018-02-28T20:03:14.000+0000 |
Description
Unable to find it in the documentation but I use 'deleteButtonTitle' when swiping on an editable TableView so I can customize the label 'Delete' to something else, eg: 'Add', 'Remove', 'Hide' etc..
TableView example:
var tableView = Ti.UI.createTableView({
data:data,
deleteButtonTitle: "Hide", //L("hide")
editable:true
});
It would be great to have this feature on a ListView...
Well, would be even better to have it on a 'ListItem' so that it can be customizable on an item/row rather than the same label across a single list.
As all the features of a TableView haven't been implemented on a ListView yet, I'm having to slowly migrate, however would be useful (if this feature is possible to implemented) that it works with ListView's main/child templates also.
Many thanks
@Hardbyte
ListView does not implement all methods and properties of TableView intentionally so that not to have the similar performance problems with the TableView. Having said that, I am moving this feature request to engineering for further evaluation and prioritization.
We would like to have deleteButtonTitle supported on the ListView as well. I have a localized app, and need to change the "Delete" label to other languages. On a side note, "deleteButtonTitle" should also be documented for TableView. It's been supported for a few years, but still not in the docs. Thx!
My implementation in TiUIListView.m: https://gist.github.com/danny005/069451cbe13e1b8c5062
var item = { ... properties: { ... deleteButtonTitle: 'Your title' } };[~crossbits]: Can you submit a PR to cover your changes + docs just like [here](https://github.com/appcelerator/titanium_mobile/pull/7430/files).