Advertisement
Guest User

Untitled

a guest
Nov 20th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. package kchaiko.vandrouki.ui.view.textview
  2.  
  3. import android.content.Context
  4. import android.widget.TextView
  5. import kchaiko.vandrouki.R
  6. import kchaiko.vandrouki.extensions.getColorFromAttribute
  7. import org.jetbrains.anko.textColor
  8.  
  9. /**
  10. * Base class for all text view controls
  11. *
  12. * Created by kchaiko on 23.01.2018.
  13. */
  14.  
  15. open class VandTextView(ctx: Context) : TextView(ctx)
  16.  
  17. open class SecondaryTextView(ctx: Context) : VandTextView(ctx) {
  18. init {
  19. textColor = ctx.getColorFromAttribute(R.attr.colorSecondaryText)
  20. }
  21. }
  22.  
  23. class NormalSecondaryTextView(ctx: Context) : SecondaryTextView(ctx) {
  24. init {
  25. textSize = 14F
  26. }
  27. }
  28.  
  29. open class LightTextView(ctx: Context) : VandTextView(ctx) {
  30. init {
  31. textColor = ctx.getColorFromAttribute(R.attr.colorLightText)
  32. }
  33. }
  34.  
  35. class LargeLightTextView(ctx: Context) : LightTextView(ctx) {
  36. init {
  37. textSize = 18F
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement