项目作者: hatewx

项目描述 :
FrameTextView is a custom TextView can be interpolated or regularly rendered
高级语言: Java
项目地址: git://github.com/hatewx/FrameTextView.git
创建时间: 2016-05-11T05:10:50Z
项目社区:https://github.com/hatewx/FrameTextView

开源协议:

下载


FrameTextView

FrameTextView is a custom TextView can be interpolated or regularly rendered.

custom content include:

  • text content(for example: [“One”, “Two”, “Three”], number 1 - 100)

  • text color(for example: [“#000000”, “#FFFFFF”])

  • animation time

  • render time

  • render interval

Not only that, FrameTextView provide abundant features allow you to custom.

You can set your own TextProvider and ColorProvider, to format any String and set any color.

There are some Samples in frametextview-sample module, you can also contact me for any question, have fun!

Samples

  1. <com.in404.frametextview.FrameTextView
  2. android:id="@+id/ftv_2"
  3. android:layout_width="wrap_content"
  4. android:layout_height="wrap_content"
  5. android:textSize="24sp"
  6. android:layout_gravity="center"
  7. app:autoStart="true"
  8. app:duration="5000"
  9. app:scrollSpeed="high"
  10. app:from="1190"
  11. app:to="1199"
  12. app:colorSequence="gradual"
  13. app:scroll="true"
  14. app:repeatCount="10" ></com.in404.frametextview.FrameTextView>
  15. <com.in404.frametextview.FrameTextView
  16. android:id="@+id/ftv_3"
  17. android:layout_width="wrap_content"
  18. android:layout_height="wrap_content"
  19. android:textSize="38sp"
  20. android:textStyle="bold"
  21. android:layout_gravity="center"
  22. app:mode="interpolated"
  23. app:autoStart="true"
  24. app:duration="1500"
  25. app:from="0"
  26. app:to="689"
  27. app:colorSequence="gradual"
  28. app:interpolator="@android:interpolator/accelerate_decelerate"
  29. app:colorItems="@array/ftv_colorItems1" ></com.in404.frametextview.FrameTextView>
  30. <com.in404.frametextview.FrameTextView
  31. android:id="@+id/ftv_4"
  32. android:layout_width="wrap_content"
  33. android:layout_height="wrap_content"
  34. android:textSize="38sp"
  35. android:textStyle="bold"
  36. android:layout_gravity="center"
  37. app:format="%1$s"
  38. app:mode="interpolated"
  39. app:autoStart="true"
  40. app:duration="5300"
  41. app:from="100"
  42. app:to="1"
  43. app:colorSequence="gradual"
  44. app:interpolator="@android:interpolator/decelerate_cubic"
  45. app:colorItems="@array/ftv_colorItems" ></com.in404.frametextview.FrameTextView>
  46. <com.in404.frametextview.FrameTextView
  47. android:id="@+id/ftv_5"
  48. android:layout_width="wrap_content"
  49. android:layout_height="wrap_content"
  50. android:textSize="30sp"
  51. android:layout_gravity="center"
  52. app:mode="interval"
  53. app:autoStart="true"
  54. app:amount="20"
  55. app:interval="200"
  56. app:textItems="@array/countries"
  57. app:itemsSequence="random"
  58. app:colorSequence="asc"
  59. app:colorItems="@array/ftv_colorItems" ></com.in404.frametextview.FrameTextView>
  60. <com.in404.frametextview.FrameTextView
  61. android:id="@+id/ftv_6"
  62. android:layout_width="250dp"
  63. android:layout_height="wrap_content"
  64. android:textSize="14sp"
  65. android:layout_gravity="center"
  66. android:textStyle=""
  67. app:mode="interval"
  68. app:autoStart="true"
  69. app:interval="100"
  70. app:to="@string/android"
  71. app:colorSequence="asc"
  72. app:itemsSequence="random"
  73. app:interpolator="@android:interpolator/decelerate_cubic" ></com.in404.frametextview.FrameTextView>

License

  1. Copyright 2015 Shawn Wang
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.