0
What’s the best way to cross-word correctly on different devices?
I made the squares individually being each one textview
with a background, because these squares vary in the color of your edges, in case the background, this way was perfect in my mobile S3 mini, but when I rotate in other devices are not aligned properly.
I already researched and saw that I would have to put images for backgrounds in different sizes in Source but it still wasn’t very cool. What I could do?
follows a part of the layout because did not give everything, sorry for the mistakes still estouf souring some tests and other things is for lack of experience even, thanks
<TextView
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="100dp"
android:background="#000000"
android:gravity="center"
android:text="Escolha um dos quadrados"
android:textColor="#ffffff"
android:textSize="20sp" />
<GridLayout
android:id="@+id/quadrados"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:columnCount="8" >
<TextView
android:id="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="0"
android:layout_gravity="left|top"
android:layout_row="0"
android:background="@drawable/back_black"
android:clickable="true"
android:gravity="center"
android:onClick="wordRip"
android:tag="1"
android:textSize="21sp" />
<TextView
android:id="@+id/TextView02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="1"
android:layout_gravity="left|top"
android:layout_row="0"
android:background="@drawable/back_black"
android:clickable="true"
android:gravity="center"
android:onClick="wordRip"
android:tag="1"
android:textSize="21sp" />
<TextView
android:id="@+id/TextView03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="2"
android:layout_gravity="left|top"
android:layout_row="0"
android:background="@drawable/back_black"
android:clickable="true"
android:gravity="center"
android:onClick="wordRip"
android:tag="1"
android:textSize="21sp" />
<TextView
android:id="@+id/TextView04"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="3"
android:layout_gravity="left|top"
android:layout_row="0"
android:background="@drawable/back_fullblack"
android:gravity="center"
android:tag="1"
android:textSize="21sp" />
<TextView
android:id="@+id/TextView05"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="04"
android:layout_gravity="left|top"
android:layout_row="0"
android:background="@drawable/back_black"
android:clickable="true"
android:gravity="center"
android:onClick="wordRede"
android:tag="1"
android:textSize="21sp" />
<TextView
android:id="@+id/TextView06"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="5"
android:layout_gravity="left|top"
android:layout_row="0"
android:background="@drawable/back_black"
android:clickable="true"
android:gravity="center"
android:onClick="wordEstrela"
android:tag="1"
android:textSize="21sp" />
Could you include your layout? Or how is this building? The amount of cells is flexible?
– Wakim
http://postimg.org/image/3kzz7zlg9/
– luno
the quantity would be fixed !
– luno
I think using sprites as in a game itself helps to make a system that runs on as many devices as possible.
– Oralista de Sistemas
my problem is in relation to the dimensioning of these squares that are getting smaller than they should in larger devices and I don’t know how to solve
– luno
If you can, put the xml you use to build your Layout.
– Wakim
edited it with part of xml
– luno