File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Android and the fly likes Set view gravity inside of TextSwitcher dinamically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Set view gravity inside of TextSwitcher dinamically" Watch "Set view gravity inside of TextSwitcher dinamically" New topic
Author

Set view gravity inside of TextSwitcher dinamically

Aleksey Vladimirovich
Ranch Hand

Joined: Sep 05, 2012
Posts: 56
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Set view gravity inside of TextSwitcher dinamically
 
Similar Threads
TabHost repeating tab content
Layout issue-footer image to the bottom of screen (Landscape & portrai) irrespective of body content
how to add multiple frames
How to capture the current screen from device
Scrolling a TextView