Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16956] Android: SearchBar - Text color needs to be implemented for Dark Holo Theme

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.2.3
Fix Version/sn/a
ComponentsAndroid
Labelsandroid
ReporterDavid He
AssigneeUnknown
Created2014-05-09T05:30:47.000+0000
Updated2018-02-28T20:04:03.000+0000

Description

This feature needs to be implemented since input text is not visible if the search view is being placed inside actionBar with HOLO.DARK theme. See screenshot attached

Attachments

FileDateSize
unseeable_input.png2014-05-09T05:30:47.000+0000110122

Comments

  1. Ritu Agrawal 2014-05-12

    Thank you for the screenshot. Would it be possible for you to attach the test case as well so that I can verify issue?
  2. David He 2014-05-13

    @Ritu Sure, see below (Alloy Version)
       var search;
       var searchAsChild = false;
       
       var picker = Ti.UI.createPicker({
       	bottom : 50
       });
       
       var data = [];
       data[0] = Ti.UI.createPickerRow({
       	title : 'Bananas'
       });
       data[1] = Ti.UI.createPickerRow({
       	title : 'Strawberries'
       });
       data[2] = Ti.UI.createPickerRow({
       	title : 'Mangos'
       });
       data[3] = Ti.UI.createPickerRow({
       	title : 'Grapes'
       });
       
       picker.add(data);
       picker.selectionIndicator = true;
       
       if (Ti.Platform.name == 'android' && Ti.Platform.Android.API_LEVEL >= 11) {
       	// Use action bar search view
       	search = Ti.UI.Android.createSearchView({
       		hintText : "Table Search",
       		color : "white"
       	});
       
       	$.index.activity.onCreateOptionsMenu = function(e) {
       		var menu = e.menu;
       		var menuItem = menu.add({
       			title : 'Table Search',
       			actionView : search,
       			icon : (Ti.Android.R.drawable.ic_menu_search ? Ti.Android.R.drawable.ic_menu_search : "my_search.png"),
       			showAsAction : Ti.Android.SHOW_AS_ACTION_IF_ROOM | Ti.Android.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW
       		});
       	};
       } else {
       	// Use search bar
       	search = Ti.UI.createSearchBar({
       		hintText : "Table Search"
       	});
       	searchAsChild = true;
       }
       
       var data = [];
       data.push(Ti.UI.createTableViewRow({
       	title : 'Apple'
       }));
       data.push(Ti.UI.createTableViewRow({
       	title : 'Banana'
       }));
       data.push(Ti.UI.createTableViewRow({
       	title : 'Orange'
       }));
       data.push(Ti.UI.createTableViewRow({
       	title : 'Raspberry'
       }));
       
       var tableview = Titanium.UI.createTableView({
       	data : data,
       	search : search,
       	searchAsChild : searchAsChild
       });
       
       $.index.add(tableview);
       
       $.index.add(picker);
       $.index.open();
       
       <Alloy>
       	<Window title="Root Win" >
       	</Window>
       </Alloy>
       
  3. Ritu Agrawal 2014-05-14

    Moving this ticket to engineering for further evaluation and prioritization as I can reproduce this issue with the provided test case. Not sure if it should be considered a new feature or a bug.

JSON Source