0

I didn't know how to call it but I'll try to explain what I mean -

How can I build an interface in android that can print some letters and then the user can pick some letters and form a word or a sentence.

Example: for those of you who know "Draw Something", when you have to guess what your friends drew, you have some scrambled letters from which you can pick some and form a sentence.

Here is an image of that: http://i.gyazo.com/033b5c9a2864c6a17d7445e0a1a3079e.png

How can I achieve that?

David Lasry
  • 1,407
  • 4
  • 26
  • 43
  • your question needs to be more in depth, this sounds more like you want someone to write you an app that will do this, you need a developer – Rob85 Aug 05 '14 at 22:03
  • That's not correct. I just wanna know from you guys how can I implement this programmatically. – David Lasry Aug 05 '14 at 22:25
  • @Rob85 and it seems to have worked – codeMagic Aug 05 '14 at 22:34
  • But what you are asking to create is something that is very simple in terms of android development - create a set of x amount of buttons and populate them with some random letters and some that form a word, so the question is are you asking how to create buttons or how to populate the text of the buttons dynamically. hence why i said you need to be more specific – Rob85 Aug 05 '14 at 22:39

1 Answers1

0

Something like this?

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <EditText
        android:id="@+id/editText1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="19dp"
        android:ems="10" >

        <requestFocus />
    </EditText>

    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/editText1"
        android:layout_centerHorizontal="true" >

        <Button
            android:id="@+id/button1"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:text="A" />

        <Button
            android:id="@+id/button2"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_toRightOf="@+id/button1"
            android:text="B" />

        <Button
            android:id="@+id/button3"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_toRightOf="@+id/button2"
            android:text="C" />

        <Button
            android:id="@+id/button4"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_toRightOf="@+id/button3"
            android:text="D" />

        <Button
            android:id="@+id/button5"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_below="@+id/button1"
            android:text="E" />

        <Button
            android:id="@+id/button6"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignLeft="@+id/button2"
            android:layout_alignTop="@+id/button5"
            android:text="F" />

        <Button
            android:id="@+id/button7"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignLeft="@+id/button3"
            android:layout_alignTop="@+id/button6"
            android:text="G" />

        <Button
            android:id="@+id/button8"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignLeft="@+id/button4"
            android:layout_alignTop="@+id/button7"
            android:text="H" />

    </RelativeLayout>

</RelativeLayout>