0
我正在玩Titanium Mobile。我構建了一個TableView並在iPhone上測試它。所有工作正常,我啓用了TableView的「選擇」屬性。Titanium Mobile - 選擇一行時在TableVIew中反轉文字顏色
我無法輕易弄清楚如何在文本顏色中插入文本,這樣當一行被選中時,背景是藍色的,文本從我的黑色或灰色切換到白色,以便對比度只是就像在iPhone上一樣。
任何想法?
THX 沙皇
我正在玩Titanium Mobile。我構建了一個TableView並在iPhone上測試它。所有工作正常,我啓用了TableView的「選擇」屬性。Titanium Mobile - 選擇一行時在TableVIew中反轉文字顏色
我無法輕易弄清楚如何在文本顏色中插入文本,這樣當一行被選中時,背景是藍色的,文本從我的黑色或灰色切換到白色,以便對比度只是就像在iPhone上一樣。
任何想法?
THX 沙皇
我不知道,如果你在你的細胞有UILabels,但是處理這種基本的方法是通過屬性的API提供
selectedBackgroundColor - the background color to render when the row cell is selected
selectedBackgroundImage - the background image to render when the row cell is selected
selectedColor - color of the row during selection
我建立內有多個Titanium.Ui.Labels的自定義行。根據API,只有行本身可以具有「選擇...」值。任何其他想法? – Czar 2010-11-11 16:25:46
然後它變得複雜..你將不得不管理更新每個元素的UI時,他們被選中 – 2010-11-11 17:01:19
你可能有任何代碼snipplet我可以用作起點嗎? – Czar 2010-11-13 14:33:14