Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Medium
-
Resolution: Unresolved
-
Affects Version/s: Release 6.0.0
-
Fix Version/s: Release 9.3.0
-
Component/s: Android
-
Labels:
-
Story Points:3
-
Sprint:2020 Sprint 22, 2020 Sprint 23
Description
Summary:
The "SearchBar" height on Android defaults to Ti.UI.FILL, but iOS defaults to Ti.UI.SIZE. The default on Android should be changed to match iOS' behavior for parity.
Also, setting the height explicitly to Ti.UI.SIZE on Android does not work at all and it still does a FILL instead.
Test Code:
var window = Ti.UI.createWindow( |
{
|
layout: "vertical", |
fullscreen: true, |
});
|
window.add(Ti.UI.createSearchBar(
|
{
|
showCancel: true, |
barColor: "#008800", |
width: Ti.UI.FILL,
|
// height: Ti.UI.SIZE,
|
}));
|
window.add(Ti.UI.createLabel(
|
{
|
text: "Search Bar Test", |
height: Ti.UI.FILL,
|
}));
|
window.open();
|
Alternative Solution:
Instead of fixing the Java "TiUISearchBar.java" code's height issue, we could instead replace Titanium's custom search bar implementation to use Android's native "SearchView" feature as suggested by TIMOB-16886. Titanium's "Ti.UI.Android.SearchView" feature does not have this height issue and is native. So, the idea is to keep the "SearchBarProxy.java" but have it map to SearchView instead. However, this may be a breaking change and perhaps should only be done in a major rev of Titanium.
Attachments
Issue Links
- relates to
-
TIMOB-27077 Android: Rewrite Ti.UI.TableView to use RecyclerView
-
- Closed
-
-
TIMOB-28088 Android: Rewrite Ti.UI.ListView to use RecyclerView
-
- Closed
-