@@ -35,7 +35,7 @@ public class TagContainerLayout extends ViewGroup {
3535 /**
3636 * The list to store the tags color info
3737 */
38- private ArrayList <int []> mColorArrayList ;
38+ private List <int []> mColorArrayList ;
3939
4040 /**
4141 * Horizontal interval, default 5(dp)
@@ -720,7 +720,7 @@ public void setTags(List<String> tags) {
720720 * @param tags
721721 * @param colorArrayList
722722 */
723- public void setTags (List <String > tags , ArrayList <int []> colorArrayList ) {
723+ public void setTags (List <String > tags , List <int []> colorArrayList ) {
724724 mTags = tags ;
725725 mColorArrayList = colorArrayList ;
726726 onSetTag ();
@@ -1385,11 +1385,24 @@ public boolean isTagSupportLettersRTL() {
13851385 }
13861386
13871387 /**
1388- * Set whether the 'support letters show with RTL(like: Android to diordnA)' style is enabled
1388+ * Set whether the 'support letters show with RTL(like: Android to diordnA)' style is enabled.
13891389 *
13901390 * @param mTagSupportLettersRTL
13911391 */
13921392 public void setTagSupportLettersRTL (boolean mTagSupportLettersRTL ) {
13931393 this .mTagSupportLettersRTL = mTagSupportLettersRTL ;
13941394 }
1395+
1396+ /**
1397+ * Get TagView in specified position.
1398+ *
1399+ * @param position the position of the TagView
1400+ * @return
1401+ */
1402+ public TagView getTagView (int position ){
1403+ if (position < 0 || position >= mChildViews .size ()) {
1404+ throw new RuntimeException ("Illegal position!" );
1405+ }
1406+ return (TagView ) mChildViews .get (position );
1407+ }
13951408}
0 commit comments