Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to get the display of 9x9 grid in the android?
    primarykey
    data
    text
    <p>Now it's time to explore Android for me. I have designed one ui which is shown below, The thing is I am getting confused with what should I do in the first frame in order to get 9x9 grid. Actually the same thing I developed in core java by placing 81 JTextFields in each cell using for loops and with the help of gridbaglayout and I got my application perfectly working. But in android how can I define my 9x9 cells in xml, so that it should accept numbers and entered numbers should be retrieved too in order to validate the sudoku rules. Following is my code and diagram. Can anyone suggest how to make the frame 1 to have 9x9 cells? If I use TextEdit in my xml file, it would be 81 textfields, and if I use Canvas(I am thinking, don't know whether it is possible), it seems to me impossible to make it accept numbers and to retrieve from that canvas board. I really appreciate if anyone could help. Please go easy, if it seems silly question(which I hope not, as I tried 2 days for it), as I am new to android. Thanks in advance.</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"&gt; &lt;FrameLayout android:id="@+id/fLayout1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="2" android:background="#0f0" /&gt; &lt;FrameLayout android:id="@+id/fLayout2" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="3" android:background="#00f"&gt; &lt;TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/keypad" android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:stretchColumns="*"&gt; &lt;TableRow &gt; &lt;Button android:id="@+id/cancel" android:text="cancel" android:layout_span="3" android:layout_width="fill_parent" android:layout_height="fill_parent" &gt; &lt;/TableRow&gt; &lt;TableRow&gt; &lt;Button android:id="@+id/submit" android:text="validate" android:layout_span="3" android:layout_width="fill_parent" android:layout_height="fill_parent" &gt; &lt;/Button&gt; &lt;/TableRow&gt; &lt;/TableLayout&gt; &lt;/FrameLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p>Here is the UI</p> <p><img src="https://i.stack.imgur.com/qZt4K.png" alt="enter image description here">. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload