Skip to content
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

[AC-5514] Android: SearchView hintTextColor #9729

Merged
merged 10 commits into from May 1, 2018
Merged

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Jan 13, 2018

JIRA: https://jira.appcelerator.org/browse/AC-5514

Example

var win = Ti.UI.createWindow({
  fullscreen: false,
  theme: "Theme.AppCompat.Light"
});
 
// Use action bar search view
var search = Ti.UI.Android.createSearchView({
  hintText: "Table Search",
  color: "#000",
  hintTextColor: "#999",
  iconifiedByDefault: false
});
 
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
});
 
win.add(tableview);
win.open();

@build
Copy link
Contributor

build commented Jan 13, 2018

Fails
🚫

🔬 There are library changes, but no changes to the unit tests. That's OK as long as you're refactoring existing code, but will require an admin to merge this PR. Please see README.md#unit-tests for docs on unit testing.

Messages
📖

🎉 Another contribution from our awesome community member, m1ga! Thanks again for helping us make Titanium SDK better. 👍

Generated by 🚫 dangerJS

@m1ga
Copy link
Contributor Author

m1ga commented Jan 13, 2018

The dangerJS formating hints are a bit hard to understand :)

@hansemannn
Copy link
Collaborator

hansemannn commented Jan 13, 2018

Why do we have a Ti.UI.SearchBar AND Ti.UI.Android.SearchView again? This should receive some parity love as well. And then expose this property on iOS as well. @jquick-axway, maybe something for later this year.

@jquick-axway
Copy link
Contributor

@hansemannn, the Ti.UI.SearchBar is a custom made view we made on Android. Ti.UI.Android.SearchView is a native implementation which Google didn't add until Android 3.0.

My understanding is that we made a custom search bar implementation back when Titanium still needed to support Android OS 2.x. The two views look and function slightly different, which is why we haven't replaced the custom implementation with the native one. But I do think the native implementation looks better. Perhaps we should consider swapping it out in Titanium 8.

Copy link
Contributor

@jquick-axway jquick-axway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: Pass

@hansemannn hansemannn added this to the 7.1.0 milestone Jan 16, 2018
Copy link
Contributor

@ssjsamir ssjsamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR passed: Was able to see the hint text when a light theme is used.

Test steps:

  • Built a new SDK from this PR
  • Created a new titanium project
  • Added the test case mentioned above in to the project
  • Ran the program
  • Was able to "Table search" which was set as the hint text

Test Environment
Appcelerator Command-Line Interface, version 7.0.1
Nexus 6p (8.1.0)
Operating System Name: Mac OS High Sierra
Operating System Version: 10.13
Node.js Version: 8.9.1
Appcelerator Studio: 5.0.0.201712081732

@hansemannn hansemannn modified the milestones: 7.1.0, 7.2.0 Feb 17, 2018
@sgtcoolguy sgtcoolguy merged commit 9c06e44 into tidev:master May 1, 2018
@sgtcoolguy sgtcoolguy modified the milestones: 7.2.0, 7.3.0 May 16, 2018
@m1ga m1ga deleted the searchview branch December 10, 2022 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants