When I include the below XML to layout file, I can see the below image. If you see it, you could realize that the TextView has top and bot
XML
TextView
The answer of TopAlignedTextView code:TopAlignedTextView@GitHub
use it by layout: