Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Set view gravity inside of TextSwitcher dinamically

 
Aleksey Vladimirovich
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys! I have a problem with setting gravity of the TextView within TextSwitcher - I want it to be centered (horizontally and vertically), I've spent about 4 hours on it and haven't found the solution so far.
That's how I add TextView into TextSwitcher:

Activity layout:

And custom TextView layout:


Android API used: version 7
That's how it looks now:

I want this text to be centered vertically. What am I doing wrong, guys?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic