Skip to content

Commit

Permalink
Tab默认设置tag为当先tab展示的CityInterface对象
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaocheng committed May 10, 2017
1 parent 48b2b6e commit ed21306
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ public void setIndex(int index) {
}
public void resetState(){
isSelected = false;
setTag(null);
setText(getText());
}
}
Expand Down Expand Up @@ -280,6 +281,7 @@ public void onClick(View v) {
if(onItemClickListener != null){
onItemClickListener.itemClick(AddressSelector.this,(CityInterface) v.getTag(),tabIndex);
tabs.get(tabIndex).setText(((CityInterface) v.getTag()).getCityName());
tabs.get(tabIndex).setTag(v.getTag());
if(tabIndex+1 < tabs.size()){
tabIndex ++;
resetAllTabs(tabIndex);
Expand Down

0 comments on commit ed21306

Please sign in to comment.