Bigkoo / Bigkoo/EasySideBar

所选择的条目返回数据不对

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
176
Forks
45
PR merge metrics
No merged PRs in 30d

Description

//ListView的点击事件
sortListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {

@Override
public void onItemClick(AdapterView parent, View view, int position, long id) {

String city = ((CitySortModel) adapter.getItem(position - 2)).getName();
SentDataForResult(city);
}
});
position - 1改成position - 2才对 因为添加了两个head

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the ListView onItemClick handler shown in the issue and inspect how the two headers affect the reported position. Verify that the selected CitySortModel matches the tapped row, then test selection of entries around both headers to confirm the returned city data is correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
mobile
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.