Esempio n. 1
0
        protected void Init(Context context, IAttributeSet attrs)
        {
            metrics       = new TickerDrawMetrics(textPaint);
            columnManager = new TickerColumnManager(metrics);

            // After we've fetched the correct values for the attributes, set them on the view
            animationInterpolator = DEFAULT_ANIMATION_INTERPOLATOR;

            this.animationDurationInMillis = DEFAULT_ANIMATION_DURATION;
            this.animateMeasurementChange  = false;
            this.gravity = DEFAULT_GRAVITY;


            //setTextColor(styledAttributes.textColor);
            //setTextSize(styledAttributes.textSize);

            //int defaultCharList = 0;
            //switch (defaultCharList)
            //{
            //    case 1:
            //        setCharacterLists(TickerUtils.provideNumberList());
            //        break;
            //    case 2:
            //        setCharacterLists(TickerUtils.provideAlphabeticalList());
            //        break;
            //    default:
            //        if (isInEditMode())
            //        {
            //            setCharacterLists(TickerUtils.provideNumberList());
            //        }
            //}

            //if (isCharacterListsSet())
            //{
            //    setText(styledAttributes.text, false);
            //}
            //else
            //{
            //    this.pendingTextToSet = styledAttributes.text;
            //}


            //animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            //@Override
            //public void onAnimationUpdate(ValueAnimator animation)
            //{
            //    columnManager.setAnimationProgress(
            //            animation.getAnimatedFraction());
            //    checkForRelayout();
            //    invalidate();
            //}
            //});
            //animator.addListener(new AnimatorListenerAdapter()
            //{
            //    @Override
            //    public void onAnimationEnd(Animator animation)
            //    {
            //        columnManager.onAnimationEnd();
            //        checkForRelayout();
            //        invalidate();
            //    }
            //});
        }
 public TickerColumn(TickerCharacterList[] characterLists, TickerDrawMetrics metrics)
 {
     this.characterLists = characterLists;
     this.metrics        = metrics;
 }
 public TickerColumnManager(TickerDrawMetrics metrics)
 {
     this.metrics = metrics;
 }