java - onCreate/textView sizing issue -


i have 2 horizontalscrollviews. each has layout containing 8 textviews. top scrollview being used header while bottom 1 displaying data. trying 2 rows of textviews line correctly. solution make width of textviews in bottom scrollview match width of textviews in top scrollview. i'm accessing width property of first textview in first scrollview , trying assign second textview in second scrollview tvbtm1.setwidth(tvtop1.getwidth()); i'm doing in oncreate method. problem i'm running ui isn't drawn until after oncreate tvtop1.getwidth() returning zero. have sizing function attached button, run on application start up. there way not work in oncreate method?

side note: have 2 scrollviews tied when scroll 1 other scrolls. exception when fling.

viewtreeobserver

check link , search on stackoverflow. there tons of examples


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -