mdgspace / RotatingText

A periodic text updating library
MIT License
1.58k stars 168 forks source link

For every one second a new timer thread is being created. #10

Closed Durgaprasad1541996 closed 4 years ago

Durgaprasad1541996 commented 6 years ago

For every one second a new timer thread is being created. which is making more CPU usage every second. Can you solve the problem.

Typeface custom_font = Typeface.createFromAsset(getAssets(), "fonts/Reckoner_Bold.ttf"); RotatingTextWrapper rotatingTextWrapper = (RotatingTextWrapper) findViewById(R.id.custom_switcher); rotatingTextWrapper.setSize(35); Rotatable rotatable = new Rotatable(Color.parseColor("#FFA036"), 1000, " Why ?", "What ?", " How ?"); rotatable.setSize(35); rotatable.setAnimationDuration(500); rotatable.setTypeface(custom_font); rotatable.setInterpolator(new BounceInterpolator()); rotatingTextWrapper.setContent("?",rotatable );

screenshot 8

bryan-ibrahim commented 4 years ago

This is true

dev-ritik commented 4 years ago

@Durgaprasad1541996 @bryan-ibrahim @stillonmyway could you check if the problem persists in the recently updated code of the library. I am hopeful that the issue has been resolved but the dependency has not been updated yet. If someone could confirm this, it would be a great help in a new release of the library. Thanks!