code: private void addTickMarkTextLabels(){
          int tickMarkCount = discreteSlider.getTickMarkCount();
          float tickMarkRadius = discreteSlider.getTickMarkRadius();
          int width = tickMarkLabelsRelativeLayout.getMeasuredWidth();
  
          int discreteSliderBackdropLeftMargin = DisplayUtility.dp2px(getContext(), 32);
          int discreteSliderBackdropRightMargin = DisplayUtility.dp2px(getContext(), 32);
          float firstTickMarkRadius = tickMarkRadius;
          float lastTickMarkRadius = tickMarkRadius;
          int interval = (width - (discreteSliderBackdropLeftMargin+discreteSliderBackdropRightMargin) - ((int)(firstTickMarkRadius+lastTickMarkRadius)) )
                  / (tickMarkCount-1);
  
          String[] tickMarkLabels = {"$", "$$", "$$$", "$$$$", "$$$$$"};
          int tickMarkLabelWidth = DisplayUtility.dp2px(getContext(), 40);
  
          for(int i=0; i<tickMarkCount; i++) {
              TextView tv = new TextView(getContext());
  
              RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
                      tickMarkLabelWidth, RelativeLayout.LayoutParams.WRAP_CONTENT);
  
              tv.setText(tickMarkLabels[i]);
              tv.setGravity(Gravity.CENTER);
              if(i==discreteSlider.getPosition())
                  tv.setTextColor(getResources().getColor(R.color.colorPrimary));
              else
                  tv.setTextColor(getResources().getColor(R.color.grey_400));
  
  //                    tv.setBackgroundColor(getResources().getColor(android.R.color.holo_blue_dark));
  
              int left = discreteSliderBackdropLeftMargin + (int)firstTickMarkRadius + (i * interval) - (tickMarkLabelWidth/2);
  
              layoutParams.setMargins(left,
                      0,
                      0,
                      0);
              tv.setLayoutParams(layoutParams);
  
              tickMarkLabelsRelativeLayout.addView(tv);
          }
      }
docs: region Helper Methods