how draw in realtime to tableLayout - in android with eclipse -


i build table 3*3 game x vs 0, , need draw cells x or 0, dont know how in realtime ' please help! part table new developer @ android need help

    </tablerow>             <tablerow         android:id="@+id/tablerow1"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:gravity="center_horizontal"         android:padding="10dip"          >          <textview             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:text="row 1"             android:gravity="center"             android:textsize="24sp"             android:layout_span="3"             android:background="#ff260a" />      </tablerow> 

how trigger draw? user clicking on table cell? if so, can create onclick listener each textview view element, , use set text clicked view.

if create custom view extends textview, relevant onclick listener in, can use cell contents in layout.

i've done similar android games, extending imageview custom view handle moving cells around, i'm @ day job don't have access sample code show @ moment. however, tutorial on creating custom views might point in right direction:

http://developer.android.com/training/custom-views/index.html


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -