java - How to access the column# of a GridLayout programmatically? -
i working on connect 4 game. i'm trying work out logic app able access coordinates of each token imageview can work out if 4 have been connected. i've looked high , low on documentation , can't seem find method in either gridlayout or gridlayout.layoutparams return either row or column of child. gridlayout.spec seems have methods set specs, not return them. missing something?
how go retrieving column or row number of child view?
edit: don't have code in front of me because i'm out of home , project saved locally. however, if helps, it's gridlayout on relativelayout 4 imageviews read vaguely thusly:
<imageview android:layout_width="@dimen/tokensize" android:layout_height="@dimen/tokensize" android:layout_column="0" android:layout_row="0"//or "1" or "2" or "3" android:src="@drawable/token" android:id="@+id/tokenxbyy"/>
i don't have java show because that's i'm trying figure out. thank help.
Comments
Post a Comment