Sw-spec/2048

จาก Theory Wiki
รุ่นแก้ไขเมื่อ 18:45, 15 มีนาคม 2561 โดย Jittat (คุย | มีส่วนร่วม) (หน้าที่ถูกสร้างด้วย ''''activity_main.xml''' <syntaxhighlight lang="xml"> <TextView android:id="@+id/cell00" android:layout_width="wrap_...')
(ต่าง) ←รุ่นแก้ไขก่อนหน้า | รุ่นแก้ไขล่าสุด (ต่าง) | รุ่นแก้ไขถัดไป→ (ต่าง)
ไปยังการนำทาง ไปยังการค้นหา

activity_main.xml

    <TextView
        android:id="@+id/cell00"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:minWidth="70dp"
        android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
        app:layout_constraintDimensionRatio="1:1"
        android:background="@drawable/cell_back"
        app:layout_constraintRight_toLeftOf="@id/cell01"
        android:gravity="center"
        android:text="2048"/>
    <TextView
        android:id="@+id/cell01"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:minWidth="70dp"
        android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
        app:layout_constraintDimensionRatio="1:1"
        android:background="@drawable/cell_back"
        app:layout_constraintRight_toLeftOf="@id/cell02"
        app:layout_constraintLeft_toRightOf="@id/cell00"
        android:gravity="center"
        android:text="2048"/>
    <TextView
        android:id="@+id/cell02"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:minWidth="70dp"
        android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
        app:layout_constraintDimensionRatio="1:1"
        android:background="@drawable/cell_back"
        app:layout_constraintRight_toLeftOf="@id/cell03"
        app:layout_constraintLeft_toRightOf="@id/cell01"
        android:gravity="center"
        android:text="2048"/>
    <TextView
        android:id="@+id/cell03"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:minWidth="70dp"
        android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
        app:layout_constraintDimensionRatio="1:1"
        android:background="@drawable/cell_back"
        app:layout_constraintLeft_toRightOf="@id/cell02"
        android:gravity="center"
        android:text="2048"/>

    <TextView
        android:id="@+id/cell10"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:minWidth="70dp"
        android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
        app:layout_constraintDimensionRatio="1:1"
        android:background="@drawable/cell_back"
        app:layout_constraintRight_toLeftOf="@id/cell11"
        app:layout_constraintTop_toBottomOf="@id/cell00"
        android:gravity="center"
        android:text="2048"/>
    <TextView
        android:id="@+id/cell11"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:minWidth="70dp"
        android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
        app:layout_constraintDimensionRatio="1:1"
        android:background="@drawable/cell_back"
        app:layout_constraintRight_toLeftOf="@id/cell12"
        app:layout_constraintLeft_toRightOf="@id/cell10"
        app:layout_constraintTop_toBottomOf="@id/cell00"
        android:gravity="center"
        android:text="2048"/>
    <TextView
        android:id="@+id/cell12"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:minWidth="70dp"
        android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
        app:layout_constraintDimensionRatio="1:1"
        android:background="@drawable/cell_back"
        app:layout_constraintRight_toLeftOf="@id/cell13"
        app:layout_constraintLeft_toRightOf="@id/cell11"
        app:layout_constraintTop_toBottomOf="@id/cell00"
        android:gravity="center"
        android:text="2048"/>
    <TextView
        android:id="@+id/cell13"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:minWidth="70dp"
        android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
        app:layout_constraintDimensionRatio="1:1"
        android:background="@drawable/cell_back"
        app:layout_constraintLeft_toRightOf="@id/cell12"
        app:layout_constraintTop_toBottomOf="@id/cell00"
        android:gravity="center"
        android:text="2048"/>

    <TextView
        android:id="@+id/cell20"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:minWidth="70dp"
        android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
        app:layout_constraintDimensionRatio="1:1"
        android:background="@drawable/cell_back"
        app:layout_constraintRight_toLeftOf="@id/cell21"
        app:layout_constraintTop_toBottomOf="@id/cell10"
        android:gravity="center"
        android:text="2048"/>
    <TextView
        android:id="@+id/cell21"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:minWidth="70dp"
        android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
        app:layout_constraintDimensionRatio="1:1"
        android:background="@drawable/cell_back"
        app:layout_constraintRight_toLeftOf="@id/cell22"
        app:layout_constraintLeft_toRightOf="@id/cell20"
        app:layout_constraintTop_toBottomOf="@id/cell10"
        android:gravity="center"
        android:text="2048"/>
    <TextView
        android:id="@+id/cell22"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:minWidth="70dp"
        android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
        app:layout_constraintDimensionRatio="1:1"
        android:background="@drawable/cell_back"
        app:layout_constraintRight_toLeftOf="@id/cell23"
        app:layout_constraintLeft_toRightOf="@id/cell21"
        app:layout_constraintTop_toBottomOf="@id/cell10"
        android:gravity="center"
        android:text="2048"/>
    <TextView
        android:id="@+id/cell23"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:minWidth="70dp"
        android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
        app:layout_constraintDimensionRatio="1:1"
        android:background="@drawable/cell_back"
        app:layout_constraintLeft_toRightOf="@id/cell22"
        app:layout_constraintTop_toBottomOf="@id/cell10"
        android:gravity="center"
        android:text="2048"/>

    <TextView
        android:id="@+id/cell30"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:minWidth="70dp"
        android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
        app:layout_constraintDimensionRatio="1:1"
        android:background="@drawable/cell_back"
        app:layout_constraintRight_toLeftOf="@id/cell31"
        app:layout_constraintTop_toBottomOf="@id/cell20"
        android:gravity="center"
        android:text="2048"/>
    <TextView
        android:id="@+id/cell31"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:minWidth="70dp"
        android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
        app:layout_constraintDimensionRatio="1:1"
        android:background="@drawable/cell_back"
        app:layout_constraintRight_toLeftOf="@id/cell32"
        app:layout_constraintLeft_toRightOf="@id/cell30"
        app:layout_constraintTop_toBottomOf="@id/cell20"
        android:gravity="center"
        android:text="2048"/>
    <TextView
        android:id="@+id/cell32"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:minWidth="70dp"
        android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
        app:layout_constraintDimensionRatio="1:1"
        android:background="@drawable/cell_back"
        app:layout_constraintRight_toLeftOf="@id/cell33"
        app:layout_constraintLeft_toRightOf="@id/cell31"
        app:layout_constraintTop_toBottomOf="@id/cell20"
        android:gravity="center"
        android:text="2048"/>
    <TextView
        android:id="@+id/cell33"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:minWidth="70dp"
        android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
        app:layout_constraintDimensionRatio="1:1"
        android:background="@drawable/cell_back"
        app:layout_constraintLeft_toRightOf="@id/cell32"
        app:layout_constraintTop_toBottomOf="@id/cell20"
        android:gravity="center"
        android:text="2048"/>

    <Button
        android:id="@+id/restartButton"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintTop_toBottomOf="@id/cell33"
        android:text="Restart"/>

    <Button
        android:id="@+id/leftButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintTop_toBottomOf="@id/restartButton"
        android:text="Left"/>
    <Button
        android:id="@+id/upButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintTop_toBottomOf="@id/restartButton"
        app:layout_constraintLeft_toRightOf="@id/leftButton"
        android:text="Up"/>
    <Button
        android:id="@+id/downButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintTop_toBottomOf="@id/restartButton"
        app:layout_constraintLeft_toRightOf="@id/upButton"
        android:text="Down"/>
    <Button
        android:id="@+id/rightButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintTop_toBottomOf="@id/restartButton"
        app:layout_constraintLeft_toRightOf="@id/downButton"
        android:text="Right"/>