Skip to content

Commit

Permalink
add getSelectedTagViewText()
Browse files Browse the repository at this point in the history
  • Loading branch information
anhtuan23 committed Jun 12, 2018
1 parent d77e47f commit ae8503b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
4 changes: 3 additions & 1 deletion androidtagview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ dependencies {
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.0.1'
}
apply from: 'https://raw.githubusercontent.com/whilu/AndroidPublishLibrary/master/project/library/bintray_publish.gradle'
//TODO fix bug apply from: 'https://raw.githubusercontent.com/whilu/AndroidPublishLibrary/master/project/library/bintray_publish.gradle'
//https://github.com/google/ExoPlayer/commit/13592dfb53ec99ce1fdb2744e34717dbdec9dea8
//https://github.com/davideas/FlexibleAdapter/issues/579
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ public void deselectTagView(int position) {
}

/**
* Return selected TagView
* Return selected TagView positions
*
* @return list of selected positions
*/
Expand All @@ -871,6 +871,22 @@ public List<Integer> getSelectedTagViewPositions() {
return selectedPositions;
}

/**
* Return selected TagView text
*
* @return list of selected tag text
*/
public List<String> getSelectedTagViewText() {
List<String> selectedTagText = new ArrayList<>();
for (int i = 0; i < mChildViews.size(); i++){
TagView tagView = (TagView)mChildViews.get(i);
if ((tagView.getIsViewSelected())){
selectedTagText.add(tagView.getText());
}
}
return selectedTagText;
}

/**
* Get TagView text.
*
Expand Down

0 comments on commit ae8503b

Please sign in to comment.