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

fix(android): ListView's SearchBar/SearchView wrongly overlaps rows as of 8.0.1 #11104

Merged
merged 3 commits into from
Aug 1, 2019

Conversation

jquick-axway
Copy link
Contributor

JIRA:
https://jira.appcelerator.org/browse/TIMOB-27094

Summary:

  • Caused by us no longer auto-assigning IDs to all views in 8.0.1.
    • Old code's RelativeLayout was trying to layout the ListView beneath search view via ID.
    • We don't want to arbitrarily assign IDs to views anymore to avoid random crashes when Android OS "restores" an activity.
  • Changed its view group from RelativeLayout to a vertical LinearLayout.

Test:

  1. Build and run the below code on Android.
  2. Verify that the SearchBar does not overlap the ListView rows.
  3. In the code, comment out: Ti.UI.createSearchBar({ showCancel: true })
  4. In the code, uncomment: Ti.UI.createSearchBar({ showCancel: true, height: "120dp" })
  5. Build and run on Android.
  6. Verify that the SearchBar is taller and does not overlap ListView rows.
  7. Comment out: Ti.UI.createSearchBar({ showCancel: true, height: "120dp" })
  8. Uncomment: Ti.UI.Android.createSearchView()
  9. Build and run on Android.
  10. Verify that the SearchView does not overlap the ListView rows.
  11. Comment out: Ti.UI.Android.createSearchView()
  12. Uncomment: Ti.UI.Android.createSearchView({ height: "120dp" })
  13. Build and run on Android.
  14. Verify that the SearchView is taller and does not overlap ListView rows.
function createListViewSectionItems() {
	var items = [];
	for (var index = 1; index <= 100; index++) {
		items.push({ properties: { title: "Row " + index } });
	}
	return items;
}

var window = Ti.UI.createWindow();
window.add(Ti.UI.createListView({
	sections: [Ti.UI.createListSection({
		headerTitle: "ListView",
		items: createListViewSectionItems(),
	})],
	searchView: Ti.UI.createSearchBar({ showCancel: true }),
//	searchView: Ti.UI.createSearchBar({ showCancel: true, height: "120dp" }),
//	searchView: Ti.UI.Android.createSearchView(),
//	searchView: Ti.UI.Android.createSearchView({ height: "120dp" }),
}));
window.open();

…s of 8.0.1

- Resolves ticket [TIMOB-27094]
- Changes ListView/Search parent view group from RelativeLayout to LinearLayout.
@jquick-axway jquick-axway added this to the 8.2.0 milestone Aug 1, 2019
@build build requested a review from a team August 1, 2019 03:17
@build
Copy link
Contributor

build commented Aug 1, 2019

Warnings
⚠️

Commit 57a99e4922bdaef6d866f72cab83628fade5fece has a message "fix(android): ListView's SearchBar/SearchView wrongly overlaps rows as of 8.0.1

  • Resolves ticket [TIMOB-27094]
  • Changes ListView/Search parent view group from RelativeLayout to LinearLayout." giving 2 errors:
  • header must not be longer than 72 characters, current length is 79
  • subject must not be sentence-case, start-case, pascal-case, upper-case
Messages
📖 👍 Hey!, You deleted more code than you added. That's awesome!
📖

💾 Here's the generated SDK zipfile.

📖

✅ All tests are passing
Nice one! All 3728 tests are passing.
(There are 470 tests skipped)

📖

🚨 This PR has one or more commits with warnings/errors for commit messages not matching our configuration. You may want to squash merge this PR and edit the message to match our conventions, or ask the original developer to modify their history.

Generated by 🚫 dangerJS against 13843a2

Copy link
Contributor

@ypbnv ypbnv left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@garymathews garymathews 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

@keerthi1032
Copy link
Contributor

FR passed. No overlapping Searchbar/Searchview on list view. Works as expected.
Test Environment:
Name = Mac OS X
Version = 10.14.5
Architecture = 64bit
Node.js
Node.js Version = 10.16.0
npm Version = 6.9.0
Titanium CLI
CLI Version = 5.2.1
Titanium SDK
SDK Version = local sdk 8.1.0.v20190731205629,8.2.0.v20190731203504
Device =samsung s5 android 6.oneplus 5t android 9
Emulator = pixel andorid 9, nexus 6p android 8
Studio =5.1.3.201907112159
Cli= 7.1.0-24

@keerthi1032 keerthi1032 merged commit e2db386 into tidev:master Aug 1, 2019
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

5 participants