Java Code Examples for android.widget.TextView.setTag()

The following are Jave code examples for showing how to use setTag() of the android.widget.TextView class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: GongXianSheng   File: OrderDetailActivity.java   View Source Code Vote up 7 votes
private void setUpReturnOrderView(ReturnOrderDetailResponse returnOrderDetailResponse) {
        TextView tv = new TextView(getActivityContext());
        tv.setTextSize(14);
        tv.setTextColor(Color.parseColor(getString(R.string.textColorThird)));
        tv.setGravity(Gravity.CENTER_VERTICAL);
        tv.setTag(returnOrderDetailResponse.getReturnOrder().getReturnOrderID());
        if (!TextUtils.isEmpty(returnOrderDetailResponse.getReturnOrder().getName())) {
            LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
                    CommonUtils.dip2px(getActivityContext(), 40));
            SpannableString ss = new SpannableString(getString(R.string.tag_return_order_num) + returnOrderDetailResponse.getReturnOrder().getName());
            ss.setSpan(new ForegroundColorSpan(Color.parseColor(getString(R.string.color_return_order_num))), 5, 5 + returnOrderDetailResponse.getReturnOrder().getName().length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
            tv.setText(ss);
            mLlReturn.addView(tv, params);
            tv.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    //跳转到退货单详情
//                    Intent intent = new Intent(mContext, ReturnDetailActivity.class);
//                    intent.putExtra("rid", returnId);
//                    startActivity(intent);
                }
            });
        }
    }
 
Example 2
Project: Bailan   File: SubTabNavigator.java   View Source Code Vote up 7 votes
private void addTextView(Context context, int viewTag) {
    TextView tv = (TextView) View.inflate(context, R.layout.custom_textview, null);
    LayoutParams layoutParams = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
    layoutParams.weight = 1.0F;

    tv.setLayoutParams(layoutParams);
    tv.setOnClickListener(this);
    tv.setGravity(Gravity.CENTER);
    if (mTextSize > 0f)
        tv.setTextSize(0, mTextSize);

    tv.setOnClickListener(this);
    tv.setTag(viewTag);
    if (viewTag == TAG_LEFT_VIEW) {
        tv.setText(mLeftText);
        mLeftTextView = tv;
    } else if (viewTag == TAG_NONE_VIEW) {
        tv.setText(mSimpleText);
        mSimpleTextView = tv;
    } else if (viewTag == TAG_RIGHT_VIEW) {
        tv.setText(mRightText);
        mRightTextView = tv;
    }
    addView(tv);
}
 
Example 3
Project: android-project-gallery   File: XPreferenceGreen.java   View Source Code Vote up 6 votes
public void addHintIcon(int drawableId)
{
	if (this.mHintIconArray.indexOfKey(drawableId) == -1)
	{
		this.mHintIconArray.put(drawableId, drawableId);
		
		TextView tv = new TextView(mContext);
		tv.setTag(drawableId);
		tv.setGravity(Gravity.CENTER);
		ViewGroup.LayoutParams lp = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
				ViewGroup.LayoutParams.WRAP_CONTENT);
		tv.setLayoutParams(lp);
		tv.setBackgroundResource(drawableId);
		tv.setIncludeFontPadding(false);
		
		this.mHintIcons.addView(tv);
	}
}
 
Example 4
Project: Android_Labs   File: ListActivity.java   View Source Code Vote up 6 votes
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
    TrackMetaData trackMetaData= getItem(position);
    if (convertView==null){
        convertView = LayoutInflater.from(getContext()).inflate(R.layout.displaysongs,parent,false);
    }
    final TextView TrackTitle = (TextView) convertView.findViewById(R.id.song_title);
    final TextView TrackAuthor = (TextView) convertView.findViewById(R.id.song_author);
    TrackTitle.setOnClickListener(onClickListener);
    TrackTitle.setTag(R.string.TitleTag,position);
    if (trackMetaData.getISsongSelected()){
        TrackTitle.setTextColor(getResources().getColor(R.color.colorTrackPlay));
        Intent intent = new Intent(getContext(),TrackInfoActivity.class);
        Bundle b = new Bundle();
        b.putParcelable(TrackINFO,trackMetaData);
        intent.putExtras(b);
        startActivity(intent);
    }
    else{
        TrackTitle.setTextColor(getResources().getColor(R.color.colorTrackDefault));
    }
    TrackTitle.setText(trackMetaData.getTrackTitle());
    TrackAuthor.setText(trackMetaData.getTrackArtist());
    return convertView;
}
 
Example 5
Project: threed   File: Threed.java   View Source Code Vote up 6 votes
private static Threed getThreed(TextView view) {
    if (view == null) {
        throw new IllegalArgumentException("view must be non-null");
    }
    Object tag = view.getTag(R.id.threed);
    if (tag instanceof Threed) {
        return (Threed) tag;
    }
    Threed t = new Threed();
    t.textView = view;
    view.setTag(R.id.threed, t);
    return t;
}
 
Example 6
Project: LaunchTime   File: ColorChooser.java   View Source Code Vote up 6 votes
private void makeColorPresetButton(int color) {
        FrameLayout outframe = new FrameLayout(getContext());
        outframe.setBackgroundColor(Color.BLACK);
        outframe.setPadding(6,6,6,6);

        FrameLayout frame = new FrameLayout(getContext());
        //frame.setBackgroundColor(Color.BLACK);
        frame.setBackgroundResource(R.drawable.transparentgrid);

        TextView c = new TextView(getContext());
        c.setText("   ");
        c.setTextSize(22);
        c.setBackgroundColor(color);
//        if (color==Color.TRANSPARENT) {
//            c.setBackgroundResource(R.drawable.transparentgrid);
//        }
        c.setTag(color);
        c.setClickable(true);
        c.setOnClickListener(setColorListener);
        frame.addView(c);
        GridLayout.LayoutParams lp = new GridLayout.LayoutParams();
        lp.setMargins(24, 16, 24, 16);
        outframe.setPadding(6,6,6,6);
        outframe.addView(frame);
        colorPresets.addView(outframe, lp);
    }
 
Example 7
Project: GitHub   File: PinnedSectionListActivity.java   View Source Code Vote up 5 votes
@Override public View getView(int position, View convertView, ViewGroup parent) {
    TextView view = (TextView) super.getView(position, convertView, parent);
    view.setTextColor(Color.DKGRAY);
    view.setTag("" + position);
    Item item = getItem(position);
    if (item.type == Item.SECTION) {
        //view.setOnClickListener(PinnedSectionListActivity.this);
        view.setBackgroundColor(parent.getResources().getColor(COLORS[item.sectionPosition % COLORS.length]));
    }
    return view;
}
 
Example 8
Project: GitHub   File: WheelListView.java   View Source Code Vote up 5 votes
private void init(Context context) {
    setOrientation(LinearLayout.HORIZONTAL);
    int paddingTopBottom = ConvertUtils.toPx(context, ITEM_PADDING_TOP_BOTTOM);
    int paddingLeftRight = ConvertUtils.toPx(context, ITEM_PADDING_LEFT_RIGHT);
    setPadding(paddingLeftRight, paddingTopBottom, paddingLeftRight, paddingTopBottom);
    setGravity(Gravity.CENTER);
    int height = ConvertUtils.toPx(context, ITEM_HEIGHT);
    // fixed: 17-1-8 #79 安卓4.x兼容问题,java.lang.ClassCastException……onMeasure……
    setLayoutParams(new AbsListView.LayoutParams(MATCH_PARENT, height));

    imageView = new ImageView(getContext());
    imageView.setTag(ITEM_TAG_IMAGE);
    imageView.setVisibility(View.GONE);
    LayoutParams imageParams = new LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
    imageParams.rightMargin = ConvertUtils.toPx(context, ITEM_MARGIN);
    addView(imageView, imageParams);

    textView = new TextView(getContext());
    textView.setTag(ITEM_TAG_TEXT);
    textView.setEllipsize(TextUtils.TruncateAt.END);
    textView.setSingleLine(true);
    textView.setIncludeFontPadding(false);
    textView.setGravity(Gravity.CENTER);
    textView.setTextColor(Color.BLACK);
    LayoutParams textParams = new LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
    addView(textView, textParams);
}
 
Example 9
Project: boohee_v5.6   File: TimeLineUtility.java   View Source Code Vote up 5 votes
private static void handleLinksWithShowMore(TextView view, Post post) {
    String showMore = " [详细] ";
    String content = post.body + showMore;
    SpannableString spannable = convertNormalStringToSpannableString(content);
    spannable.setSpan(new RelativeSizeSpan(0.8f), content.length() - showMore.length(),
            content.length(), 17);
    spannable.setSpan(new ShowMoreSpan("showMore"), content.length() - showMore.length(),
            content.length(), 17);
    view.setText(spannable);
    view.setTag(R.id.timeline_post_id, Integer.valueOf(post.id));
}
 
Example 10
Project: Phoenix-for-VK   File: ViewUtils.java   View Source Code Vote up 5 votes
public static ObjectAnimator setCountText(TextView view, int count, boolean animate) {
    if (Objects.nonNull(view)) {
        if (animate) {
            ObjectAnimator animator = ObjectAnimator.ofInt(view, createAmountAnimatorProperty(DEFAULT_COUNT_FORMATTER), count);
            animator.setDuration(250);
            animator.start();
            return animator;
        } else {
            view.setTag(count);
            view.setText(DEFAULT_COUNT_FORMATTER.format(count));
        }
    }

    return null;
}
 
Example 11
Project: Widgets   File: HelperActivity.java   View Source Code Vote up 5 votes
private View getLoadingView() {
    TextView tv = new TextView(this);
    tv.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
    tv.setText("Helper中定义的加载中");
    tv.setGravity(Gravity.CENTER);
    tv.setTextSize(18);
    tv.setTextColor(Color.RED);
    // 设置tag为loading
    tv.setTag(StatusLayout.Status.LOADING.getStatus());
    return tv;
}
 
Example 12
Project: AssistantBySDK   File: TrafficShowPresenter.java   View Source Code Vote up 5 votes
@Override
public Object instantiateItem(ViewGroup container, int position) {
    Log.i(TAG, "instantiateItem>>>" + position);
    View child = chilren.get(position);
    if (child == null) {
        child = inflater.inflate(R.layout.target_poi_item_detail, null);
        chilren.put(position, child);
    }
    child.findViewById(R.id.tpid_target_confirm_bt).setOnClickListener(clickListener);
    child.findViewById(R.id.tpid_target_confirm_bt).setTag(position);
    ((TextView) child.findViewById(R.id.tpid_name_text)).setText((position + 1) + "." + aList.get(position).getName());
    ((TextView) child.findViewById(R.id.tpid_address_text)).setText(aList.get(position).getAddress());
    Double distance = DistanceUtil.getDistance(new LatLng(address.getLatitude(), address.getLongitude()),
            poiInfoList.get(position).location) / 1000;
    ((TextView) child.findViewById(R.id.tpid_distance_text)).setText(String.format("%.1f", distance) + "km");
    child.findViewById(R.id.tpid_set_target_bt).setOnClickListener(clickListener);
    child.findViewById(R.id.tpid_set_target_bt).setTag(position);
    TextView ft = (TextView) child.findViewById(R.id.tpid_favorite_bt);
    ft.setOnClickListener(clickListener);
    ft.setTag(position);
    if (aList.get(position).getFavoritedTime() != null) {
        ft.setText("已收藏");
        ((LevelListDrawable) ft.getBackground()).setLevel(1);
    }
    container.addView(child, 0);
    return chilren.get(position);
}
 
Example 13
Project: DailyStudy   File: IntentServiceActivity.java   View Source Code Vote up 5 votes
public void addTask(View view) {
    //模拟路径
    String path = "/sdcard/imgs/" + (++i) + ".png";
    MyIntentService.startUploadImg(this, path);

    TextView tv = new TextView(this);
    mLyTaskContainer.addView(tv);
    tv.setText(path + " is uploading ...");
    tv.setTag(path);
}
 
Example 14
Project: Hotspot-master-devp   File: EasySwitcher.java   View Source Code Vote up 5 votes
private View getItemView(int position){
    TextView textView = new TextView(mContext);
    textView.setTextAppearance(mContext, R.style.switcher_item_text_style);
    LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
            DensityUtil.dip2px(mContext,40));
    textView.setLayoutParams(layoutParams);
    textView.setSelected(position == mDefaultSelection);
    textView.setGravity(Gravity.CENTER);
    textView.setText(mAllItemArray.get(position));
    textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12.0f);
    textView.setOnClickListener(mItemOnClickListener);
    textView.setTag(position);
    return textView;
}
 
Example 15
Project: mvvm-template   File: DrawableGetter.java   View Source Code Vote up 4 votes
public DrawableGetter(TextView tv, int width) {
    tv.setTag(R.id.drawable_callback, this);
    this.container = new WeakReference<>(tv);
    this.cachedTargets = new HashSet<>();
    this.width = width;
}
 
Example 16
Project: FastAndroid   File: MultiVideoCallActivity.java   View Source Code Vote up 4 votes
public void onSwitchRemoteUsers(View view) {
    String from = (String) view.getTag();
    if (from == null)
        return;
    String to = (String) localView.getTag();
    FrameLayout layout = (FrameLayout) view;
    SurfaceView fromView = (SurfaceView) layout.getChildAt(0);
    SurfaceView toView = localView;

    localViewContainer.removeAllViews();
    layout.removeAllViews();

    View singleRemoteView = remoteViewContainer.findViewWithTag(from + "view");
    UserInfo toUserInfo = RongContext.getInstance().getUserInfoFromCache(to);
    UserInfo fromUserInfo = RongContext.getInstance().getUserInfoFromCache(from);

    AsyncImageView userPortraitView = (AsyncImageView) singleRemoteView.findViewById(R.id.user_portrait);
    TextView backUserNameView = (TextView) singleRemoteView.findViewById(R.id.user_name);

    if (toUserInfo != null) {
        if (toUserInfo.getPortraitUri() != null) {
            userPortraitView.setAvatar(toUserInfo.getPortraitUri().toString(), R.drawable.rc_default_portrait);
        }
        backUserNameView.setText(toUserInfo.getName());
    } else {
        backUserNameView.setText(to);
    }
    singleRemoteView.setTag(to + "view");
    fromView.setZOrderOnTop(false);
    fromView.setZOrderMediaOverlay(false);
    localViewContainer.addView(fromView);
    toView.setZOrderOnTop(true);
    toView.setZOrderMediaOverlay(true);
    layout.addView(toView);

    TextView topUserNameView = (TextView) topContainer.findViewById(R.id.rc_voip_user_name);
    topUserNameView.setTag(from + "name");
    if (fromUserInfo != null) {
        topUserNameView.setText(fromUserInfo.getName());
    } else {
        topUserNameView.setText(from);
    }
    layout.setTag(to);
    localView = fromView;
    localView.setTag(from);
    localViewUserId = from;
}
 
Example 17
Project: BlueTape   File: TextChangedBindingFunction.java   View Source Code Vote up 4 votes
private static void removeTextWatcher(TextView textView) {
    textView.removeTextChangedListener(
            (TextWatcher) textView.getTag(R.id.onTextChangedListener)
    );
    textView.setTag(R.id.onTextChangedListener, null);
}
 
Example 18
Project: airgram   File: ActionBarMenuItem.java   View Source Code Vote up 4 votes
public TextView addSubItem(int id, String text, int icon) {
    if (popupLayout == null) {
        rect = new Rect();
        location = new int[2];
        popupLayout = new ActionBarPopupWindow.ActionBarPopupWindowLayout(getContext());
        popupLayout.setOnTouchListener(new OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
                if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
                    if (popupWindow != null && popupWindow.isShowing()) {
                        v.getHitRect(rect);
                        if (!rect.contains((int) event.getX(), (int) event.getY())) {
                            popupWindow.dismiss();
                        }
                    }
                }
                return false;
            }
        });
        popupLayout.setDispatchKeyEventListener(new ActionBarPopupWindow.OnDispatchKeyEventListener() {
            @Override
            public void onDispatchKeyEvent(KeyEvent keyEvent) {
                if (keyEvent.getKeyCode() == KeyEvent.KEYCODE_BACK && keyEvent.getRepeatCount() == 0 && popupWindow != null && popupWindow.isShowing()) {
                    popupWindow.dismiss();
                }
            }
        });
    }
    TextView textView = new TextView(getContext());
    textView.setTypeface(FontManager.instance().getTypeface());
    textView.setTextColor(0xff212121);
    textView.setBackgroundResource(R.drawable.list_selector);
    if (!LocaleController.isRTL) {
        textView.setGravity(Gravity.CENTER_VERTICAL);
    } else {
        textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.RIGHT);
    }
    textView.setPadding(AndroidUtilities.dp(16), 0, AndroidUtilities.dp(16), 0);
    textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 18);
    textView.setMinWidth(AndroidUtilities.dp(196));
    textView.setTag(id);
    textView.setText(text);
    if (icon != 0) {
        textView.setCompoundDrawablePadding(AndroidUtilities.dp(12));
        if (!LocaleController.isRTL) {
            textView.setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(icon), null, null, null);
        } else {
            textView.setCompoundDrawablesWithIntrinsicBounds(null, null, getResources().getDrawable(icon), null);
        }
    }
    popupLayout.setShowedFromBotton(showFromBottom);
    popupLayout.addView(textView);
    LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) textView.getLayoutParams();
    if (LocaleController.isRTL) {
        layoutParams.gravity = Gravity.RIGHT;
    }
    layoutParams.width = LayoutHelper.MATCH_PARENT;
    layoutParams.height = AndroidUtilities.dp(48);
    textView.setLayoutParams(layoutParams);
    textView.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View view) {
            if (popupWindow != null && popupWindow.isShowing()) {
                if (processedPopupClick) {
                    return;
                }
                processedPopupClick = true;
                popupWindow.dismiss(allowCloseAnimation);
            }
            if (parentMenu != null) {
                parentMenu.onItemClick((Integer) view.getTag());
            } else if (delegate != null) {
                delegate.onItemClick((Integer) view.getTag());
            }
        }
    });
    menuHeight += layoutParams.height;
    return textView;
}
 
Example 19
Project: letv   File: LiveSubTypeLunboActivity.java   View Source Code Vote up 4 votes
private void initSecondaryTabs() {
    this.mHeadTitleView = UIsUtils.inflate(getActivity(), R.layout.half_lunbo_title, null);
    this.mTabTitleContainer = (LinearLayout) this.mHeadTitleView.findViewById(R.id.tabTitleContainer);
    LayoutParams tabTitlParams = new LayoutParams(-1, -2);
    tabTitlParams.height = UIsUtils.zoomWidth(40);
    this.mTabTitleContainer.setLayoutParams(tabTitlParams);
    String[] titles = getResources().getStringArray(R.array.channel_Titles);
    int j = titles.length;
    this.mTitleList = new ArrayList();
    for (int i = 0; i < j; i++) {
        RelativeLayout titleRelative = new RelativeLayout(getActivity());
        LayoutParams params = new LayoutParams(-1, -2);
        params.weight = 1.0f;
        titleRelative.setLayoutParams(params);
        TextView text = new TextView(getActivity());
        text.setBackgroundColor(getActivity().getResources().getColor(2131492949));
        text.setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
        text.setGravity(17);
        text.setTextSize(1, 15.0f);
        text.setText(titles[i]);
        text.setTag(Integer.valueOf(i));
        if (i == 1) {
            this.mCurrentSelectTab = text;
            text.setTextColor(getResources().getColor(2131493202));
        } else {
            text.setTextColor(getResources().getColor(2131493022));
        }
        text.setOnClickListener(this.mTabClickListener);
        titleRelative.addView(text);
        this.mTabTitleContainer.addView(titleRelative);
        if (i < j - 1) {
            View lineView = new View(getActivity());
            lineView.setBackgroundColor(getResources().getColor(2131493321));
            RelativeLayout.LayoutParams lineParams = new RelativeLayout.LayoutParams(-1, -1);
            lineParams.width = 1;
            lineParams.height = UIsUtils.zoomWidth(24);
            lineView.setLayoutParams(lineParams);
            this.mTabTitleContainer.addView(lineView);
        }
        this.mTitleList.add(titleRelative);
    }
    this.mSaveLinearLayout = (LinearLayout) this.mHeadTitleView.findViewById(R.id.saveRootLinear);
    LinearLayout saveChildLayout = (LinearLayout) this.mHeadTitleView.findViewById(R.id.saveChildLinear);
    LayoutParams saveLinearParams = (LayoutParams) saveChildLayout.getLayoutParams();
    saveLinearParams.height = UIsUtils.zoomWidth(65);
    saveChildLayout.setLayoutParams(saveLinearParams);
    saveChildLayout.setPadding(UIsUtils.zoomWidth(15), 0, 0, 0);
    this.mSaveLinearLayout.setOnClickListener(this.mAddToFavariteListener);
    this.mListView.addHeaderView(this.mHeadTitleView);
}
 
Example 20
Project: MyAnimeViewer   File: FabFilterFragment.java   View Source Code Vote up 4 votes
private void inflateLayoutWithFilters(final String filter_category, FlexboxLayout fbl) {
    List<String> keys = new ArrayList<>();
    switch (filter_category) {
        case "genre":
            keys = filterReq.getUniqueGenreKeys();
            break;
        case "rating":
            keys = filterReq.getUniqueRatingKeys();
            break;
        case "year":
            keys = filterReq.getUniqueYearKeys();
            break;
    }

    for (int i = 0; i < keys.size(); i++) {
        View subchild = getActivity().getLayoutInflater().inflate(R.layout.single_chip, null);
        final TextView tv = ((TextView) subchild.findViewById(R.id.txt_title));
        tv.setText(keys.get(i));
        final int finalI = i;
        final List<String> finalKeys = keys;
        tv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (tv.getTag() != null && tv.getTag().equals("selected")) {
                    tv.setTag("unselected");
                    tv.setBackgroundResource(R.drawable.chip_unselected);
                    tv.setTextColor(ContextCompat.getColor(getContext(), R.color.filters_chips));
                    removeFromSelectedMap(filter_category, finalKeys.get(finalI));
                } else {
                    tv.setTag("selected");
                    tv.setBackgroundResource(R.drawable.chip_selected);
                    tv.setTextColor(ContextCompat.getColor(getContext(), R.color.filters_header));
                    addToSelectedMap(filter_category, finalKeys.get(finalI));
                }
            }
        });
        try {
            Log.d("k9res", "key: " + filter_category + " |val:" + keys.get(finalI));
            Log.d("k9res", "appliedFilters != null: " + (appliedFilters != null));
            Log.d("k9res", "appliedFilters.get(key) != null: " + (appliedFilters.get(filter_category) != null));
            Log.d("k9res", "appliedFilters.get(key).contains(keys.get(finalI)): " + (appliedFilters.get(filter_category).contains(keys.get(finalI))));
        } catch (Exception e) {

        }
        if (appliedFilters != null && appliedFilters.get(filter_category) != null && appliedFilters.get(filter_category).contains(keys.get(finalI))) {
            tv.setTag("selected");
            tv.setBackgroundResource(R.drawable.chip_selected);
            tv.setTextColor(ContextCompat.getColor(getContext(), R.color.filters_header));
        } else {
            tv.setBackgroundResource(R.drawable.chip_unselected);
            tv.setTextColor(ContextCompat.getColor(getContext(), R.color.filters_chips));
        }
        textviews.add(tv);

        fbl.addView(subchild);
    }


}