Académique Documents
Professionnel Documents
Culture Documents
fentre de menu
activity correspondante:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/
res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.mac.gamebotonss.Main3Activity">
<Button
android:id="@+id/button31"
android:layout_width="182dp"
android:layout_height="74dp"
android:text="Start"
tools:layout_editor_absoluteX="101dp"
tools:layout_editor_absoluteY="157dp"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
</RelativeLayout>
MainActivity correspondante:
package com.example.mac.gamebotonss;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class MainActivity extends AppCompatActivity {
Button boton;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
boton=(Button) findViewById(R.id.button31);
boton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this,
Main2Activity.class);
String var = "coucou";
intent.putExtra("StringKey", var);
startActivityForResult(intent, 0);
}
});
fentre du jeu :
activity correspondante:
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/imageView1"
android:layout_marginEnd="46dp"
android:layout_marginRight="46dp"
app:srcCompat="@drawable/pic11" />
<ImageView
android:id="@+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/pic11"
android:layout_above="@+id/imageView2"
android:layout_alignLeft="@+id/imageView1"
android:layout_alignStart="@+id/imageView1"
android:layout_marginBottom="27dp" />
<ImageView
android:id="@+id/imageView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/imageView2"
android:layout_alignStart="@+id/imageView2"
android:layout_alignTop="@+id/imageView5"
app:srcCompat="@drawable/pic11" />
<ImageView
android:id="@+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignEnd="@+id/imageView2"
android:layout_alignRight="@+id/imageView2"
android:layout_alignTop="@+id/imageView3"
app:srcCompat="@drawable/pic21" />
<ImageView
android:id="@+id/imageView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/imageView1"
android:layout_alignStart="@+id/imageView1"
android:layout_below="@+id/imageView1"
android:layout_marginTop="47dp"
app:srcCompat="@drawable/pic21" />
<ImageView
android:id="@+id/imageView7"
android:layout_width="85dp"
android:layout_height="85dp"
android:layout_alignLeft="@+id/imageView3"
android:layout_alignStart="@+id/imageView3"
android:layout_alignTop="@+id/imageView3"
android:layout_marginLeft="13dp"
android:layout_marginStart="13dp"
app:srcCompat="@drawable/pic11" />
<ImageView
android:id="@+id/imageView10"
android:layout_width="85dp"
android:layout_height="85dp"
app:srcCompat="@drawable/pic11"
android:layout_below="@+id/imageView4"
android:layout_alignLeft="@+id/imageView8"
android:layout_alignStart="@+id/imageView8" />
<ImageView
android:id="@+id/imageView12"
android:layout_width="85dp"
android:layout_height="85dp"
android:layout_alignLeft="@+id/imageView10"
android:layout_alignStart="@+id/imageView10"
android:layout_alignTop="@+id/imageView11"
app:srcCompat="@drawable/pic11" />
<ImageView
android:id="@+id/imageView13"
android:layout_width="85dp"
android:layout_height="85dp"
android:layout_alignLeft="@+id/imageView11"
android:layout_alignParentBottom="true"
android:layout_alignStart="@+id/imageView11"
android:layout_marginBottom="32dp"
app:srcCompat="@drawable/pic11" />
<ImageView
android:id="@+id/imageView8"
android:layout_width="85dp"
android:layout_height="85dp"
app:srcCompat="@drawable/pic21"
android:layout_alignTop="@+id/imageView4"
android:layout_alignLeft="@+id/imageView2"
android:layout_alignStart="@+id/imageView2"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp" />
<ImageView
android:id="@+id/imageView9"
android:layout_width="85dp"
android:layout_height="85dp"
app:srcCompat="@drawable/pic21"
android:layout_below="@+id/imageView4"
android:layout_alignLeft="@+id/imageView7"
android:layout_alignStart="@+id/imageView7" />
<ImageView
android:id="@+id/imageView11"
android:layout_width="85dp"
android:layout_height="85dp"
app:srcCompat="@drawable/pic21"
android:layout_below="@+id/imageView9"
android:layout_alignLeft="@+id/imageView9"
android:layout_alignStart="@+id/imageView9"
android:layout_marginTop="31dp" />
<ImageView
android:id="@+id/imageView14"
android:layout_width="85dp"
android:layout_height="85dp"
app:srcCompat="@drawable/pic21"
android:layout_alignTop="@+id/imageView13"
android:layout_alignRight="@+id/imageView6"
android:layout_alignEnd="@+id/imageView6" />
<ImageView
android:id="@+id/imageView15"
android:layout_width="70dp"
android:layout_height="70dp"
app:srcCompat="@drawable/pic11"
android:layout_alignBottom="@+id/imageView7"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="31dp"
android:layout_marginStart="31dp"
android:layout_marginBottom="27dp" />
<ImageView
android:id="@+id/imageView19"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView15"
android:layout_alignStart="@+id/imageView15"
android:layout_below="@+id/imageView7"
app:srcCompat="@drawable/pic11" />
<ImageView
android:id="@+id/imageView21"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView2"
android:layout_alignStart="@+id/imageView2"
android:layout_below="@+id/imageView8"
app:srcCompat="@drawable/pic11" />
<ImageView
android:id="@+id/imageView25"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView2"
android:layout_alignStart="@+id/imageView2"
android:layout_below="@+id/imageView10"
app:srcCompat="@drawable/pic11" />
<ImageView
android:id="@+id/imageView26"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_below="@+id/imageView10"
android:layout_toEndOf="@+id/imageView10"
android:layout_toRightOf="@+id/imageView10"
app:srcCompat="@drawable/pic11" />
<ImageView
android:id="@+id/imageView28"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignTop="@+id/imageView5"
android:layout_toLeftOf="@+id/imageView6"
android:layout_toStartOf="@+id/imageView6"
app:srcCompat="@drawable/pic11" />
<ImageView
android:id="@+id/imageView29"
android:layout_width="70dp"
android:layout_height="70dp"
app:srcCompat="@drawable/pic11"
android:layout_alignTop="@+id/imageView6"
android:layout_alignLeft="@+id/imageView15"
android:layout_alignStart="@+id/imageView15" />
<ImageView
android:id="@+id/imageView16"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignTop="@+id/imageView15"
android:layout_marginEnd="17dp"
android:layout_marginRight="17dp"
android:layout_toLeftOf="@+id/imageView4"
android:layout_toStartOf="@+id/imageView4"
app:srcCompat="@drawable/pic11" />
<ImageView
android:id="@+id/imageView17"
android:layout_width="70dp"
android:layout_height="70dp"
app:srcCompat="@drawable/pic21"
android:layout_alignTop="@+id/imageView4"
android:layout_alignLeft="@+id/imageView4"
android:layout_alignStart="@+id/imageView4" />
<ImageView
android:id="@+id/imageView20"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_below="@+id/imageView7"
android:layout_toEndOf="@+id/imageView7"
android:layout_toRightOf="@+id/imageView7"
app:srcCompat="@drawable/pic21" />
<ImageView
android:id="@+id/imageView22"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_below="@+id/imageView8"
android:layout_toEndOf="@+id/imageView10"
android:layout_toRightOf="@+id/imageView10"
app:srcCompat="@drawable/pic21" />
<ImageView
android:id="@+id/imageView23"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView19"
android:layout_alignStart="@+id/imageView19"
android:layout_below="@+id/imageView9"
app:srcCompat="@drawable/pic21" />
<ImageView
android:id="@+id/imageView24"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_below="@+id/imageView9"
android:layout_toLeftOf="@+id/imageView4"
android:layout_toStartOf="@+id/imageView4"
app:srcCompat="@drawable/pic21" />
<ImageView
android:id="@+id/imageView27"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView23"
android:layout_alignStart="@+id/imageView23"
android:layout_alignTop="@+id/imageView5"
app:srcCompat="@drawable/pic21" />
<ImageView
android:id="@+id/imageView30"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/imageView6"
app:srcCompat="@drawable/pic21" />
<ImageView
android:id="@+id/imageView18"
android:layout_width="70dp"
android:layout_height="70dp"
app:srcCompat="@drawable/pic21"
android:layout_alignTop="@+id/imageView4"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
<ImageView
android:id="@+id/imageView31"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/imageView9"
android:layout_alignStart="@+id/imageView9"
android:layout_below="@+id/imageView3"
app:srcCompat="@drawable/pic1" />
<ImageView
android:id="@+id/imageView32"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/pic1"
android:layout_alignTop="@+id/imageView2"
android:layout_toRightOf="@+id/imageView24"
android:layout_toEndOf="@+id/imageView24" />
<ImageView
android:id="@+id/imageView36"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/imageView35"
android:layout_toEndOf="@+id/imageView28"
android:layout_toRightOf="@+id/imageView28"
app:srcCompat="@drawable/pic1" />
<ImageView
android:id="@+id/imageView33"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/imageView9"
android:layout_alignLeft="@+id/imageView7"
android:layout_alignStart="@+id/imageView7"
app:srcCompat="@drawable/pic1" />
<ImageView
android:id="@+id/imageView34"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/imageView3"
android:layout_alignLeft="@+id/imageView4"
android:layout_alignStart="@+id/imageView4"
app:srcCompat="@drawable/pic2" />
<ImageView
android:id="@+id/imageView35"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/imageView5"
android:layout_alignEnd="@+id/imageView31"
android:layout_alignRight="@+id/imageView31"
app:srcCompat="@drawable/pic2" />
<ImageView
android:id="@+id/imageView37"
android:layout_width="85dp"
android:layout_height="85dp"
app:srcCompat="@drawable/pic1"
android:layout_alignTop="@+id/imageView34"
android:layout_toLeftOf="@+id/imageView24"
android:layout_toStartOf="@+id/imageView24" />
<ImageView
android:id="@+id/imageView40"
android:layout_width="85dp"
android:layout_height="85dp"
android:layout_alignLeft="@+id/imageView10"
android:layout_alignStart="@+id/imageView10"
android:layout_below="@+id/imageView34"
app:srcCompat="@drawable/pic1" />
<ImageView
android:id="@+id/imageView42"
android:layout_width="85dp"
android:layout_height="85dp"
android:layout_alignEnd="@+id/imageView34"
android:layout_alignRight="@+id/imageView34"
android:layout_below="@+id/imageView25"
app:srcCompat="@drawable/pic1" />
<ImageView
android:id="@+id/imageView43"
android:layout_width="85dp"
android:layout_height="85dp"
android:layout_alignLeft="@+id/imageView35"
android:layout_alignStart="@+id/imageView35"
android:layout_below="@+id/imageView42"
app:srcCompat="@drawable/pic1" />
<ImageView
android:id="@+id/imageView38"
android:layout_width="85dp"
android:layout_height="85dp"
app:srcCompat="@drawable/pic2"
android:layout_alignTop="@+id/imageView34"
android:layout_alignLeft="@+id/imageView21"
android:layout_alignStart="@+id/imageView21" />
<ImageView
android:id="@+id/imageView39"
android:layout_width="85dp"
android:layout_height="85dp"
android:layout_alignLeft="@+id/imageView35"
android:layout_alignStart="@+id/imageView35"
android:layout_below="@+id/imageView33"
app:srcCompat="@drawable/pic2" />
<ImageView
android:id="@+id/imageView41"
android:layout_width="85dp"
android:layout_height="85dp"
android:layout_alignTop="@+id/imageView11"
android:layout_toLeftOf="@+id/imageView24"
android:layout_toStartOf="@+id/imageView24"
app:srcCompat="@drawable/pic2" />
<ImageView
android:id="@+id/imageView44"
android:layout_width="85dp"
android:layout_height="85dp"
android:layout_alignLeft="@+id/imageView14"
android:layout_alignStart="@+id/imageView14"
android:layout_below="@+id/imageView30"
app:srcCompat="@drawable/pic2" />
<ImageView
android:id="@+id/imageView45"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView15"
android:layout_alignStart="@+id/imageView15"
android:layout_alignTop="@+id/imageView15"
app:srcCompat="@drawable/pic1" />
<ImageView
android:id="@+id/imageView49"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView19"
android:layout_alignStart="@+id/imageView19"
android:layout_below="@+id/imageView37"
app:srcCompat="@drawable/pic1" />
<ImageView
android:id="@+id/imageView51"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView2"
android:layout_alignStart="@+id/imageView2"
android:layout_below="@+id/imageView38"
app:srcCompat="@drawable/pic1" />
<ImageView
android:id="@+id/imageView55"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignEnd="@+id/imageView38"
android:layout_alignRight="@+id/imageView38"
android:layout_below="@+id/imageView10"
app:srcCompat="@drawable/pic1" />
<ImageView
android:id="@+id/imageView56"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/imageView10"
app:srcCompat="@drawable/pic1" />
<ImageView
android:id="@+id/imageView58"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignTop="@+id/imageView6"
android:layout_centerHorizontal="true"
app:srcCompat="@drawable/pic1" />
<ImageView
android:id="@+id/imageView59"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView55"
android:layout_alignStart="@+id/imageView55"
android:layout_alignTop="@+id/imageView36"
app:srcCompat="@drawable/pic1" />
<ImageView
android:id="@+id/imageView46"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView16"
android:layout_alignStart="@+id/imageView16"
android:layout_alignTop="@+id/imageView16"
app:srcCompat="@drawable/pic1" />
<ImageView
android:id="@+id/imageView47"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView38"
android:layout_alignStart="@+id/imageView38"
android:layout_alignTop="@+id/imageView16"
app:srcCompat="@drawable/pic2" />
<ImageView
android:id="@+id/imageView48"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/imageView33"
app:srcCompat="@drawable/pic2" />
<ImageView
android:id="@+id/imageView50"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_below="@+id/imageView37"
android:layout_toLeftOf="@+id/imageView4"
android:layout_toStartOf="@+id/imageView4"
app:srcCompat="@drawable/pic2" />
<ImageView
android:id="@+id/imageView52"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_below="@+id/imageView8"
android:layout_toEndOf="@+id/imageView10"
android:layout_toRightOf="@+id/imageView10"
app:srcCompat="@drawable/pic2" />
<ImageView
android:id="@+id/imageView53"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView23"
android:layout_alignStart="@+id/imageView23"
android:layout_below="@+id/imageView9"
app:srcCompat="@drawable/pic2" />
<ImageView
android:id="@+id/imageView54"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignTop="@+id/imageView25"
android:layout_toLeftOf="@+id/imageView2"
android:layout_toStartOf="@+id/imageView2"
app:srcCompat="@drawable/pic2" />
<ImageView
android:id="@+id/imageView57"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView29"
android:layout_alignStart="@+id/imageView29"
android:layout_alignTop="@+id/imageView5"
app:srcCompat="@drawable/pic2" />
<ImageView
android:id="@+id/imageView60"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/imageView6"
app:srcCompat="@drawable/pic2" />
<Button
android:id="@+id/button1"
android:layout_width="110dp"
android:layout_height="110dp"
android:layout_alignEnd="@+id/imageView1"
android:layout_alignRight="@+id/imageView1"
android:layout_below="@+id/imageView19" />
<Button
android:id="@+id/button2"
android:layout_width="110dp"
android:layout_height="110dp"
android:layout_alignEnd="@+id/imageView42"
android:layout_alignRight="@+id/imageView42"
android:layout_below="@+id/imageView21" />
<Button
android:id="@+id/button3"
android:layout_width="110dp"
android:layout_height="110dp"
android:layout_alignEnd="@+id/imageView5"
android:layout_alignRight="@+id/imageView5"
android:layout_alignTop="@+id/imageView33" />
<Button
android:id="@+id/button4"
android:layout_width="110dp"
android:layout_height="110dp"
android:layout_alignTop="@+id/imageView34"
android:layout_toEndOf="@+id/imageView50"
android:layout_toRightOf="@+id/imageView50" />
<Button
android:id="@+id/button5"
android:layout_width="110dp"
android:layout_height="110dp"
android:layout_alignBottom="@+id/imageView6"
android:layout_alignLeft="@+id/imageView13"
android:layout_alignStart="@+id/imageView13" />
<Button
android:id="@+id/button6"
android:layout_width="110dp"
android:layout_height="110dp"
android:layout_alignTop="@+id/imageView36"
android:layout_toEndOf="@+id/imageView24"
android:layout_toRightOf="@+id/imageView24" />
<Button
android:id="@+id/button7"
android:layout_width="85dp"
android:layout_height="85dp"
android:layout_alignTop="@+id/imageView37"
android:layout_toLeftOf="@+id/imageView54"
android:layout_toStartOf="@+id/imageView54" />
<Button
android:id="@+id/button8"
android:layout_width="85dp"
android:layout_height="85dp"
android:layout_alignTop="@+id/imageView34"
android:layout_toEndOf="@+id/imageView58"
android:layout_toRightOf="@+id/imageView58" />
<Button
android:id="@+id/button9"
android:layout_width="85dp"
android:layout_height="85dp"
android:layout_below="@+id/button3"
android:layout_toLeftOf="@+id/imageView50"
android:layout_toStartOf="@+id/imageView50" />
<Button
android:id="@+id/button10"
android:layout_width="85dp"
android:layout_height="85dp"
android:layout_below="@+id/button4"
android:layout_toEndOf="@+id/imageView54"
android:layout_toRightOf="@+id/imageView54" />
<Button
android:id="@+id/button11"
android:layout_width="85dp"
android:layout_height="85dp"
android:layout_above="@+id/imageView35"
android:layout_toLeftOf="@+id/imageView28"
android:layout_toStartOf="@+id/imageView28" />
<Button
android:id="@+id/button12"
android:layout_width="85dp"
android:layout_height="85dp"
android:layout_above="@+id/imageView36"
android:layout_alignLeft="@+id/imageView14"
android:layout_alignStart="@+id/imageView14"
android:layout_marginLeft="11dp"
android:layout_marginStart="11dp" />
<Button
android:id="@+id/button13"
android:layout_width="85dp"
android:layout_height="85dp"
android:layout_alignTop="@+id/imageView43"
android:layout_toLeftOf="@+id/imageView28"
android:layout_toStartOf="@+id/imageView28" />
<Button
android:id="@+id/button14"
android:layout_width="85dp"
android:layout_height="85dp"
android:layout_alignLeft="@+id/button12"
android:layout_alignStart="@+id/button12"
android:layout_below="@+id/imageView59" />
<Button
android:id="@+id/button15"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignTop="@+id/imageView15"
android:layout_alignLeft="@+id/imageView15"
android:layout_alignStart="@+id/imageView15" />
<Button
android:id="@+id/button16"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView16"
android:layout_alignStart="@+id/imageView16"
android:layout_alignTop="@+id/imageView16" />
<Button
android:id="@+id/button17"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView38"
android:layout_alignStart="@+id/imageView38"
android:layout_alignTop="@+id/imageView47" />
<Button
android:id="@+id/button18"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/imageView34" />
<Button
android:id="@+id/button19"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView19"
android:layout_alignStart="@+id/imageView19"
android:layout_below="@+id/imageView7" />
<Button
android:id="@+id/button20"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignTop="@+id/imageView20"
android:layout_toLeftOf="@+id/button2"
android:layout_toStartOf="@+id/button2" />
<Button
android:id="@+id/button21"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/button8"
android:layout_alignStart="@+id/button8"
android:layout_below="@+id/imageView8" />
<Button
android:id="@+id/button22"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_below="@+id/button8"
android:layout_toEndOf="@+id/imageView10"
android:layout_toRightOf="@+id/imageView10" />
<Button
android:id="@+id/button23"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView23"
android:layout_alignStart="@+id/imageView23"
android:layout_below="@+id/button10" />
<Button
android:id="@+id/button24"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignBottom="@+id/button1"
android:layout_toEndOf="@+id/button11"
android:layout_toRightOf="@+id/button11" />
<Button
android:id="@+id/button25"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_below="@+id/button10"
android:layout_toLeftOf="@+id/imageView56"
android:layout_toStartOf="@+id/imageView56" />
<Button
android:id="@+id/button26"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignBaseline="@+id/button24"
android:layout_alignBottom="@+id/button24"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
<Button
android:id="@+id/button27"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView29"
android:layout_alignStart="@+id/imageView29"
android:layout_alignTop="@+id/button5" />
<Button
android:id="@+id/button28"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView58"
android:layout_alignStart="@+id/imageView58"
android:layout_alignTop="@+id/button5" />
<Button
android:id="@+id/button29"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignLeft="@+id/imageView42"
android:layout_alignStart="@+id/imageView42"
android:layout_below="@+id/button12" />
<Button
android:id="@+id/button30"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignBaseline="@+id/button28"
android:layout_alignBottom="@+id/button28"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true" />
<ProgressBar
android:id="@+id/progressBar1"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignLeft="@+id/imageView13"
android:layout_alignStart="@+id/imageView13" />
</RelativeLayout>
MainActivity correspondante:
package com.example.mac.gamebotonss;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ProgressBar;
Button boton1,boton2;
ImageView im,im2;
ImageView im0,im02;
Button boton3,boton4,boton5,boton6;
ImageView im3,im4,im5,im6;
ImageView im03,im04,im05,im06;
Button boton7,boton8,boton9,boton10,boton11,
boton12,boton13,boton14;
ImageView im7,im8,im9,im10,im11,im12,im13,im14;
ImageView im07,im08,im09,im010,im011,im012,im013,im014;
Button
boton15,boton16,boton17,boton18,boton19,boton20,boton21,boton2
2,
boton23,boton24,boton25,boton26,boton27,boton28,boton29,boton3
0;
ImageView im15,im16,im17,im18,im19,im20,im21,im22,
im23,im24,im25,im26,im27,im28,im29,im30;
ImageView im015,im016,im017,im018,im019,im020,im021,im022,
im023,im024,im025,im026,im027,im028,im029,im030;
int glob;
int prec;
int parit;
int i;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main2);
bar = (ProgressBar) findViewById(R.id.progressBar1);
im = (ImageView) findViewById(R.id.imageView31);
im2 = (ImageView) findViewById(R.id.imageView32);
im03.setVisibility(View.INVISIBLE);
im04.setVisibility(View.INVISIBLE);
im05.setVisibility(View.INVISIBLE);
im06.setVisibility(View.INVISIBLE);
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im010.setVisibility(View.INVISIBLE);
im011.setVisibility(View.INVISIBLE);
im012.setVisibility(View.INVISIBLE);
im013.setVisibility(View.INVISIBLE);
im014.setVisibility(View.INVISIBLE);
im015.setVisibility(View.INVISIBLE);
im016.setVisibility(View.INVISIBLE);
im017.setVisibility(View.INVISIBLE);
im018.setVisibility(View.INVISIBLE);
im019.setVisibility(View.INVISIBLE);
im020.setVisibility(View.INVISIBLE);
im021.setVisibility(View.INVISIBLE);
im022.setVisibility(View.INVISIBLE);
im023.setVisibility(View.INVISIBLE);
im024.setVisibility(View.INVISIBLE);
im025.setVisibility(View.INVISIBLE);
im026.setVisibility(View.INVISIBLE);
im027.setVisibility(View.INVISIBLE);
im028.setVisibility(View.INVISIBLE);
im029.setVisibility(View.INVISIBLE);
im030.setVisibility(View.INVISIBLE);
im3.setVisibility(View.INVISIBLE);
im4.setVisibility(View.INVISIBLE);
im5.setVisibility(View.INVISIBLE);
im6.setVisibility(View.INVISIBLE);
im7.setVisibility(View.INVISIBLE);
im8.setVisibility(View.INVISIBLE);
im9.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im15.setVisibility(View.INVISIBLE);
im16.setVisibility(View.INVISIBLE);
im17.setVisibility(View.INVISIBLE);
im18.setVisibility(View.INVISIBLE);
im19.setVisibility(View.INVISIBLE);
im20.setVisibility(View.INVISIBLE);
im21.setVisibility(View.INVISIBLE);
im22.setVisibility(View.INVISIBLE);
im23.setVisibility(View.INVISIBLE);
im24.setVisibility(View.INVISIBLE);
im25.setVisibility(View.INVISIBLE);
im26.setVisibility(View.INVISIBLE);
im27.setVisibility(View.INVISIBLE);
im28.setVisibility(View.INVISIBLE);
im29.setVisibility(View.INVISIBLE);
im30.setVisibility(View.INVISIBLE);
View b3 = findViewById(R.id.button3);
b3.setVisibility(View.INVISIBLE);
View b4 = findViewById(R.id.button4);
b4.setVisibility(View.INVISIBLE);
View b5 = findViewById(R.id.button5);
b5.setVisibility(View.INVISIBLE);
View b6 = findViewById(R.id.button6);
b6.setVisibility(View.INVISIBLE);
View b7 = findViewById(R.id.button7);
b7.setVisibility(View.INVISIBLE);
View b8 = findViewById(R.id.button8);
b8.setVisibility(View.INVISIBLE);
View b9 = findViewById(R.id.button9);
b9.setVisibility(View.INVISIBLE);
View b10 = findViewById(R.id.button10);
b10.setVisibility(View.INVISIBLE);
View b11 = findViewById(R.id.button11);
b11.setVisibility(View.INVISIBLE);
View b12 = findViewById(R.id.button12);
b12.setVisibility(View.INVISIBLE);
View b13 = findViewById(R.id.button13);
b13.setVisibility(View.INVISIBLE);
View b14 = findViewById(R.id.button14);
b14.setVisibility(View.INVISIBLE);
View b15 = findViewById(R.id.button15);
b15.setVisibility(View.INVISIBLE);
View b16 = findViewById(R.id.button16);
b16.setVisibility(View.INVISIBLE);
View b17 = findViewById(R.id.button17);
b17.setVisibility(View.INVISIBLE);
View b18 = findViewById(R.id.button18);
b18.setVisibility(View.INVISIBLE);
View b19 = findViewById(R.id.button19);
b19.setVisibility(View.INVISIBLE);
View b20 = findViewById(R.id.button20);
b20.setVisibility(View.INVISIBLE);
View b21 = findViewById(R.id.button21);
b21.setVisibility(View.INVISIBLE);
View b22 = findViewById(R.id.button22);
b22.setVisibility(View.INVISIBLE);
View b23 = findViewById(R.id.button23);
b23.setVisibility(View.INVISIBLE);
View b24 = findViewById(R.id.button24);
b24.setVisibility(View.INVISIBLE);
View b25 = findViewById(R.id.button25);
b25.setVisibility(View.INVISIBLE);
View b26 = findViewById(R.id.button26);
b26.setVisibility(View.INVISIBLE);
View b27 = findViewById(R.id.button27);
b27.setVisibility(View.INVISIBLE);
View b28 = findViewById(R.id.button28);
b28.setVisibility(View.INVISIBLE);
View b29 = findViewById(R.id.button29);
b29.setVisibility(View.INVISIBLE);
View b30 = findViewById(R.id.button30);
b30.setVisibility(View.INVISIBLE);
playSound(R.raw.rr);
}
});
if(progressStatus==99){
Intent intent = new
Intent(Main2Activity.this, Main3Activity.class);
String var = "coucou";
intent.putExtra("StringKey", var);
startActivityForResult(intent, 0);
}
}
}
}).start();
glob = 0;
parit = 1;
prec = 0;
boton1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View
v) {
if (parit % 2 == 1)
{
View b =
findViewById(R.id.button1);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 1;
} else {
if (prec == 2) {
glob++;
parit++;
i = 1;
Thread th =
new Thread(new Runnable() {
public
void run() {
while (i < 5) {
runOnUiThread(new Runnable() {
@Override
if (i == 1) {
View b = findViewById(R.id.button1);
b.setVisibility(View.INVISIBLE);
if (i == 2) {
im.setVisibility(View.INVISIBLE);
im2.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
i++;
}
}
});
th.start();
if (glob ==
1) {
im0.setVisibility(View.INVISIBLE);
im02.setVisibility(View.INVISIBLE);
im03.setVisibility(View.VISIBLE);
im04.setVisibility(View.VISIBLE);
im05.setVisibility(View.VISIBLE);
im06.setVisibility(View.VISIBLE);
im3.setVisibility(View.VISIBLE);
im4.setVisibility(View.VISIBLE);
im5.setVisibility(View.VISIBLE);
im6.setVisibility(View.VISIBLE);
View b3
= findViewById(R.id.button3);
b3.setVisibility(View.VISIBLE);
View b4
= findViewById(R.id.button4);
b4.setVisibility(View.VISIBLE);
View b5
= findViewById(R.id.button5);
b5.setVisibility(View.VISIBLE);
View b6
= findViewById(R.id.button6);
b6.setVisibility(View.VISIBLE);
}
}
);
boton2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View
v) {
if (parit % 2 == 1)
{
View b =
findViewById(R.id.button2);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 2;
} else {
if (prec == 1) {
glob++;
parit++;
i = 1;
Thread th =
new Thread(new Runnable() {
public
void run() {
while (i < 5) {
runOnUiThread(new Runnable() {
@Override
if (i == 1) {
View b = findViewById(R.id.button2);
b.setVisibility(View.INVISIBLE);
if (i == 2) {
im.setVisibility(View.INVISIBLE);
im2.setVisibility(View.INVISIBLE);
});
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
i++;
}
}
});
th.start();
if (glob ==
1) {
im0.setVisibility(View.INVISIBLE);
im02.setVisibility(View.INVISIBLE);
im03.setVisibility(View.VISIBLE);
im04.setVisibility(View.VISIBLE);
im05.setVisibility(View.VISIBLE);
im06.setVisibility(View.VISIBLE);
im3.setVisibility(View.VISIBLE);
im4.setVisibility(View.VISIBLE);
im5.setVisibility(View.VISIBLE);
im6.setVisibility(View.VISIBLE);
View b3
= findViewById(R.id.button3);
b3.setVisibility(View.VISIBLE);
View b4
= findViewById(R.id.button4);
b4.setVisibility(View.VISIBLE);
View b5
= findViewById(R.id.button5);
b5.setVisibility(View.VISIBLE);
View b6
= findViewById(R.id.button6);
b6.setVisibility(View.VISIBLE);
}
}
}
);
glob = 0;
boton3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button3);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 3;
} else {
if (prec == 4) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button3);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton3.setVisibility(View.VISIBLE);
boton4.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 5) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button3);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton3.setVisibility(View.VISIBLE);
boton5.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 6) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button3);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im3.setVisibility(View.INVISIBLE);
im6.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 3) {
im03.setVisibility(View.INVISIBLE);
im04.setVisibility(View.INVISIBLE);
im05.setVisibility(View.INVISIBLE);
im06.setVisibility(View.INVISIBLE);
im07.setVisibility(View.VISIBLE);
im08.setVisibility(View.VISIBLE);
im09.setVisibility(View.VISIBLE);
im010.setVisibility(View.VISIBLE);
im011.setVisibility(View.VISIBLE);
im012.setVisibility(View.VISIBLE);
im013.setVisibility(View.VISIBLE);
im014.setVisibility(View.VISIBLE);
im7.setVisibility(View.VISIBLE);
im8.setVisibility(View.VISIBLE);
im9.setVisibility(View.VISIBLE);
im10.setVisibility(View.VISIBLE);
im11.setVisibility(View.VISIBLE);
im12.setVisibility(View.VISIBLE);
im13.setVisibility(View.VISIBLE);
im14.setVisibility(View.VISIBLE);
View b7 =
findViewById(R.id.button7);
b7.setVisibility(View.VISIBLE);
View b8 =
findViewById(R.id.button8);
b8.setVisibility(View.VISIBLE);
View b9 =
findViewById(R.id.button9);
b9.setVisibility(View.VISIBLE);
View b10 =
findViewById(R.id.button10);
b10.setVisibility(View.VISIBLE);
View b11 =
findViewById(R.id.button11);
b11.setVisibility(View.VISIBLE);
View b12 =
findViewById(R.id.button12);
b12.setVisibility(View.VISIBLE);
View b13 =
findViewById(R.id.button13);
b13.setVisibility(View.VISIBLE);
View b14 =
findViewById(R.id.button14);
b14.setVisibility(View.VISIBLE);
}
}
}
});
boton4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button4);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 4;
} else if (prec == 3) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button4);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton4.setVisibility(View.VISIBLE);
boton3.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 5) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button4);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im4.setVisibility(View.INVISIBLE);
im5.setVisibility(View.INVISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 3) {
im03.setVisibility(View.INVISIBLE);
im04.setVisibility(View.INVISIBLE);
im05.setVisibility(View.INVISIBLE);
im06.setVisibility(View.INVISIBLE);
im07.setVisibility(View.VISIBLE);
im08.setVisibility(View.VISIBLE);
im09.setVisibility(View.VISIBLE);
im010.setVisibility(View.VISIBLE);
im011.setVisibility(View.VISIBLE);
im012.setVisibility(View.VISIBLE);
im013.setVisibility(View.VISIBLE);
im014.setVisibility(View.VISIBLE);
im7.setVisibility(View.VISIBLE);
im8.setVisibility(View.VISIBLE);
im9.setVisibility(View.VISIBLE);
im10.setVisibility(View.VISIBLE);
im11.setVisibility(View.VISIBLE);
im12.setVisibility(View.VISIBLE);
im13.setVisibility(View.VISIBLE);
im14.setVisibility(View.VISIBLE);
View b7 = findViewById(R.id.button7);
b7.setVisibility(View.VISIBLE);
View b8 = findViewById(R.id.button8);
b8.setVisibility(View.VISIBLE);
View b9 = findViewById(R.id.button9);
b9.setVisibility(View.VISIBLE);
View b10 =
findViewById(R.id.button10);
b10.setVisibility(View.VISIBLE);
View b11 =
findViewById(R.id.button11);
b11.setVisibility(View.VISIBLE);
View b12 =
findViewById(R.id.button12);
b12.setVisibility(View.VISIBLE);
View b13 =
findViewById(R.id.button13);
b13.setVisibility(View.VISIBLE);
View b14 =
findViewById(R.id.button14);
b14.setVisibility(View.VISIBLE);
}
} else if (prec == 6) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button4);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton6.setVisibility(View.VISIBLE);
boton4.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
});
boton5.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button5);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 5;
} else {
if (prec == 3) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button5);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton3.setVisibility(View.VISIBLE);
boton5.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 4) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button5);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im4.setVisibility(View.INVISIBLE);
im5.setVisibility(View.INVISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 3) {
im03.setVisibility(View.INVISIBLE);
im04.setVisibility(View.INVISIBLE);
im05.setVisibility(View.INVISIBLE);
im06.setVisibility(View.INVISIBLE);
im07.setVisibility(View.VISIBLE);
im08.setVisibility(View.VISIBLE);
im09.setVisibility(View.VISIBLE);
im010.setVisibility(View.VISIBLE);
im011.setVisibility(View.VISIBLE);
im012.setVisibility(View.VISIBLE);
im013.setVisibility(View.VISIBLE);
im014.setVisibility(View.VISIBLE);
im7.setVisibility(View.VISIBLE);
im8.setVisibility(View.VISIBLE);
im9.setVisibility(View.VISIBLE);
im10.setVisibility(View.VISIBLE);
im11.setVisibility(View.VISIBLE);
im12.setVisibility(View.VISIBLE);
im13.setVisibility(View.VISIBLE);
im14.setVisibility(View.VISIBLE);
View b7 =
findViewById(R.id.button7);
b7.setVisibility(View.VISIBLE);
View b8 =
findViewById(R.id.button8);
b8.setVisibility(View.VISIBLE);
View b9 =
findViewById(R.id.button9);
b9.setVisibility(View.VISIBLE);
View b10 =
findViewById(R.id.button10);
b10.setVisibility(View.VISIBLE);
View b11 =
findViewById(R.id.button11);
b11.setVisibility(View.VISIBLE);
View b12 =
findViewById(R.id.button12);
b12.setVisibility(View.VISIBLE);
View b13 =
findViewById(R.id.button13);
b13.setVisibility(View.VISIBLE);
View b14 =
findViewById(R.id.button14);
b14.setVisibility(View.VISIBLE);
}
}
if (prec == 6) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button5);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton6.setVisibility(View.VISIBLE);
boton5.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
});
boton6.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button6);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 4;
} else {
if (prec == 3) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button6);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im3.setVisibility(View.INVISIBLE);
im6.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 3) {
im03.setVisibility(View.INVISIBLE);
im04.setVisibility(View.INVISIBLE);
im05.setVisibility(View.INVISIBLE);
im06.setVisibility(View.INVISIBLE);
im07.setVisibility(View.VISIBLE);
im08.setVisibility(View.VISIBLE);
im09.setVisibility(View.VISIBLE);
im010.setVisibility(View.VISIBLE);
im011.setVisibility(View.VISIBLE);
im012.setVisibility(View.VISIBLE);
im013.setVisibility(View.VISIBLE);
im014.setVisibility(View.VISIBLE);
im7.setVisibility(View.VISIBLE);
im8.setVisibility(View.VISIBLE);
im9.setVisibility(View.VISIBLE);
im10.setVisibility(View.VISIBLE);
im11.setVisibility(View.VISIBLE);
im12.setVisibility(View.VISIBLE);
im13.setVisibility(View.VISIBLE);
im14.setVisibility(View.VISIBLE);
View b7 =
findViewById(R.id.button7);
b7.setVisibility(View.VISIBLE);
View b8 =
findViewById(R.id.button8);
b8.setVisibility(View.VISIBLE);
View b9 =
findViewById(R.id.button9);
b9.setVisibility(View.VISIBLE);
View b10 =
findViewById(R.id.button10);
b10.setVisibility(View.VISIBLE);
View b11 =
findViewById(R.id.button11);
b11.setVisibility(View.VISIBLE);
View b12 =
findViewById(R.id.button12);
b12.setVisibility(View.VISIBLE);
View b13 =
findViewById(R.id.button13);
b13.setVisibility(View.VISIBLE);
View b14 =
findViewById(R.id.button14);
b14.setVisibility(View.VISIBLE);
}
}
if (prec == 4) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button6);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton4.setVisibility(View.VISIBLE);
boton6.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 5) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button6);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton5.setVisibility(View.VISIBLE);
boton6.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
});
boton7.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button7);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 7;
} else {
if (prec == 8) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button7);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton7.setVisibility(View.VISIBLE);
boton8.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 9) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton7.setVisibility(View.VISIBLE);
boton9.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 10) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button7);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im7.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
} else if (prec == 11) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button7);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton7.setVisibility(View.VISIBLE);
boton11.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 12) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button7);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im7.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
} else if (prec == 13) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button7);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton7.setVisibility(View.VISIBLE);
boton13.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 14) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button7);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im7.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
}
}
}
});
boton8.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button8);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 8;
} else if (prec == 7) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button8);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton8.setVisibility(View.VISIBLE);
boton7.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 9) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button8);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im8.setVisibility(View.INVISIBLE);
im9.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
} else if (prec == 10) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button8);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton10.setVisibility(View.VISIBLE);
boton8.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 11) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button8);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im8.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
} else if (prec == 12) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
public void run() {
while (i < 5) {
runOnUiThread(new Runnable() {
@Override
public void run() {
if (i == 1) {
View b =
findViewById(R.id.button8);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton8.setVisibility(View.VISIBLE);
boton12.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 13) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton8.setVisibility(View.VISIBLE);
boton13.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 14) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button8);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im8.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
}
}
});
boton9.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button9);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 9;
} else {
if (prec == 7) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button9);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton7.setVisibility(View.VISIBLE);
boton9.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 8) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button9);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im8.setVisibility(View.INVISIBLE);
im9.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
}
if (prec == 10) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button9);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton10.setVisibility(View.VISIBLE);
boton9.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 11) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button9);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im9.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
}
if (prec == 12) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button9);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton12.setVisibility(View.VISIBLE);
boton9.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 13) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button9);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton13.setVisibility(View.VISIBLE);
boton9.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 14) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button9);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im9.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
}
}
}
});
boton10.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button10);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 10;
} else {
if (prec == 7) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button10);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im7.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
}
if (prec == 8) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button10);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton8.setVisibility(View.VISIBLE);
boton10.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 9) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button10);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton9.setVisibility(View.VISIBLE);
boton10.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 11) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button10);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton10.setVisibility(View.VISIBLE);
boton11.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 12) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button10);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im12.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
}
if (prec == 13) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button10);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im13.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
}
if (prec == 14) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button10);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton10.setVisibility(View.VISIBLE);
boton14.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
}
});
boton11.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button11);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 11;
} else if (prec == 7) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button11);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton7.setVisibility(View.VISIBLE);
boton11.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 8) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button11);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im11.setVisibility(View.INVISIBLE);
im8.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
} else if (prec == 9) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button11);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im11.setVisibility(View.INVISIBLE);
im9.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
} else if (prec == 10) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button11);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton10.setVisibility(View.VISIBLE);
boton11.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 12) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton12.setVisibility(View.VISIBLE);
boton11.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 13) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button11);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton13.setVisibility(View.VISIBLE);
boton11.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 14) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button11);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im11.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
}
}
});
boton12.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button6);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 12;
} else if (prec == 7) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button12);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im7.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
} else if (prec == 8) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button12);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton8.setVisibility(View.VISIBLE);
boton12.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 9) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button12);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton9.setVisibility(View.VISIBLE);
boton12.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 10) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button12);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im10.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
} else if (prec == 11) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton11.setVisibility(View.VISIBLE);
boton12.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 13) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button12);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im13.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
} else if (prec == 14) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button12);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton14.setVisibility(View.VISIBLE);
boton12.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
});
boton13.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button7);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 13;
} else if (prec == 7) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button13);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im7.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
} else if (prec == 8) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button13);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton8.setVisibility(View.VISIBLE);
boton13.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 9) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button13);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton9.setVisibility(View.VISIBLE);
boton13.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 10) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button13);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im10.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
} else if (prec == 11) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button13);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton11.setVisibility(View.VISIBLE);
boton13.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 12) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button13);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
} else if (prec == 14) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button13);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton14.setVisibility(View.VISIBLE);
boton13.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
});
boton14.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button14);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 14;
} else if (prec == 7) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button14);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton7.setVisibility(View.VISIBLE);
boton14.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 8) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button14);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im8.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
} else if (prec == 9) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button14);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im9.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
} else if (prec == 10) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
public void run() {
while (i < 5) {
runOnUiThread(new Runnable() {
@Override
public void run() {
if (i == 1) {
View b =
findViewById(R.id.button14);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton10.setVisibility(View.VISIBLE);
boton14.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 11) {
glob++;
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im11.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (glob == 7) {
im07.setVisibility(View.INVISIBLE);
im08.setVisibility(View.INVISIBLE);
im09.setVisibility(View.INVISIBLE);
im10.setVisibility(View.INVISIBLE);
im11.setVisibility(View.INVISIBLE);
im12.setVisibility(View.INVISIBLE);
im13.setVisibility(View.INVISIBLE);
im14.setVisibility(View.INVISIBLE);
im015.setVisibility(View.VISIBLE);
im016.setVisibility(View.VISIBLE);
im017.setVisibility(View.VISIBLE);
im018.setVisibility(View.VISIBLE);
im019.setVisibility(View.VISIBLE);
im020.setVisibility(View.VISIBLE);
im021.setVisibility(View.VISIBLE);
im022.setVisibility(View.VISIBLE);
im023.setVisibility(View.VISIBLE);
im024.setVisibility(View.VISIBLE);
im025.setVisibility(View.VISIBLE);
im026.setVisibility(View.VISIBLE);
im027.setVisibility(View.VISIBLE);
im028.setVisibility(View.VISIBLE);
im029.setVisibility(View.VISIBLE);
im030.setVisibility(View.VISIBLE);
im15.setVisibility(View.VISIBLE);
im16.setVisibility(View.VISIBLE);
im17.setVisibility(View.VISIBLE);
im18.setVisibility(View.VISIBLE);
im19.setVisibility(View.VISIBLE);
im20.setVisibility(View.VISIBLE);
im21.setVisibility(View.VISIBLE);
im22.setVisibility(View.VISIBLE);
im23.setVisibility(View.VISIBLE);
im24.setVisibility(View.VISIBLE);
im25.setVisibility(View.VISIBLE);
im26.setVisibility(View.VISIBLE);
im27.setVisibility(View.VISIBLE);
im28.setVisibility(View.VISIBLE);
im29.setVisibility(View.VISIBLE);
im30.setVisibility(View.VISIBLE);
View b15 =
findViewById(R.id.button15);
b15.setVisibility(View.VISIBLE);
View b16 =
findViewById(R.id.button16);
b16.setVisibility(View.VISIBLE);
View b17 =
findViewById(R.id.button17);
b17.setVisibility(View.VISIBLE);
View b18 =
findViewById(R.id.button18);
b18.setVisibility(View.VISIBLE);
View b19 =
findViewById(R.id.button19);
b19.setVisibility(View.VISIBLE);
View b20 =
findViewById(R.id.button20);
b20.setVisibility(View.VISIBLE);
View b21 =
findViewById(R.id.button21);
b21.setVisibility(View.VISIBLE);
View b22 =
findViewById(R.id.button22);
b22.setVisibility(View.VISIBLE);
View b23 =
findViewById(R.id.button23);
b23.setVisibility(View.VISIBLE);
View b24 =
findViewById(R.id.button24);
b24.setVisibility(View.VISIBLE);
View b25 =
findViewById(R.id.button25);
b25.setVisibility(View.VISIBLE);
View b26 =
findViewById(R.id.button26);
b26.setVisibility(View.VISIBLE);
View b27 =
findViewById(R.id.button27);
b27.setVisibility(View.VISIBLE);
View b28 =
findViewById(R.id.button28);
b28.setVisibility(View.VISIBLE);
View b29 =
findViewById(R.id.button29);
b29.setVisibility(View.VISIBLE);
View b30 =
findViewById(R.id.button30);
b30.setVisibility(View.VISIBLE);
}
} else if (prec == 12) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button14);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton12.setVisibility(View.VISIBLE);
boton14.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 13) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button14);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton13.setVisibility(View.VISIBLE);
boton14.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
});
boton15.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button15);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 15;
} else {
if (prec == 16) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button15);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im15.setVisibility(View.INVISIBLE);
im16.setVisibility(View.INVISIBLE);
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
if (i == 1) {
View b =
findViewById(R.id.button15);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton15.setVisibility(View.VISIBLE);
boton17.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 18) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button15);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton15.setVisibility(View.VISIBLE);
boton18.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 19) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button15);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im15.setVisibility(View.INVISIBLE);
im19.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 20) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button15);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton15.setVisibility(View.VISIBLE);
boton20.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 21) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button15);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im15.setVisibility(View.INVISIBLE);
im21.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 22) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
public void run() {
while (i < 5) {
runOnUiThread(new
Runnable() {
@Override
public void run() {
if (i == 1) {
View b =
findViewById(R.id.button15);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton15.setVisibility(View.VISIBLE);
boton22.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 23) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button15);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton15.setVisibility(View.VISIBLE);
boton23.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 24) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button15);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton15.setVisibility(View.VISIBLE);
boton24.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 25) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button15);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im15.setVisibility(View.INVISIBLE);
im25.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 26) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button15);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im15.setVisibility(View.INVISIBLE);
im26.setVisibility(View.INVISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 27) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button15);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton15.setVisibility(View.VISIBLE);
boton27.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 28) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button15);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im15.setVisibility(View.INVISIBLE);
im28.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 29) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button15);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im15.setVisibility(View.INVISIBLE);
im29.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 30) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button15);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton15.setVisibility(View.VISIBLE);
boton30.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
}
});
boton16.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button18);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 18;
} else if (prec == 15) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button16);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im15.setVisibility(View.INVISIBLE);
im16.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 17) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button16);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton16.setVisibility(View.VISIBLE);
boton17.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 18) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button16);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton18.setVisibility(View.VISIBLE);
boton16.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 19) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button16);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im15.setVisibility(View.INVISIBLE);
im19.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 20) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button16);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton16.setVisibility(View.VISIBLE);
boton20.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 21) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button16);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im21.setVisibility(View.INVISIBLE);
im16.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 22) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button16);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton16.setVisibility(View.VISIBLE);
boton22.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 23) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button16);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton16.setVisibility(View.VISIBLE);
boton23.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 24) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button16);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton16.setVisibility(View.VISIBLE);
boton24.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 25) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button16);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im25.setVisibility(View.INVISIBLE);
im16.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 26) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button16);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im26.setVisibility(View.INVISIBLE);
im16.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 27) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button16);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton16.setVisibility(View.VISIBLE);
boton27.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 28) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button16);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im28.setVisibility(View.INVISIBLE);
im16.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 29) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button16);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im29.setVisibility(View.INVISIBLE);
im16.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 30) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
public void run() {
while (i < 5) {
runOnUiThread(new Runnable() {
@Override
public void run() {
if (i == 1) {
View b =
findViewById(R.id.button16);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton30.setVisibility(View.VISIBLE);
boton16.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
});
boton17.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button17);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 17;
} else {
if (prec == 15) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button17);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton15.setVisibility(View.VISIBLE);
boton17.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 16) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button17);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton16.setVisibility(View.VISIBLE);
boton17.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 18) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
public void run() {
while (i < 5) {
runOnUiThread(new
Runnable() {
@Override
public void run() {
if (i == 1) {
View b =
findViewById(R.id.button17);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im18.setVisibility(View.INVISIBLE);
im17.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 19) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button17);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton19.setVisibility(View.VISIBLE);
boton17.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 20) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button17);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im17.setVisibility(View.INVISIBLE);
im20.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 21) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button17);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton21.setVisibility(View.VISIBLE);
boton17.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 22) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button17);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im17.setVisibility(View.INVISIBLE);
im22.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 23) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button17);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im17.setVisibility(View.INVISIBLE);
im23.setVisibility(View.INVISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 24) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button17);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im17.setVisibility(View.INVISIBLE);
im24.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 25) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button17);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton25.setVisibility(View.VISIBLE);
boton17.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 26) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button17);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton26.setVisibility(View.VISIBLE);
boton17.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 27) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button17);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im27.setVisibility(View.INVISIBLE);
im17.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 28) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
public void run() {
while (i < 5) {
runOnUiThread(new
Runnable() {
@Override
public void run() {
if (i == 1) {
View b =
findViewById(R.id.button17);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton28.setVisibility(View.VISIBLE);
boton17.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 29) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button17);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton29.setVisibility(View.VISIBLE);
boton17.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 30) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button17);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im17.setVisibility(View.INVISIBLE);
im30.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
}
});
boton18.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button4);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 18;
} else {
if (prec == 15) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button18);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton15.setVisibility(View.VISIBLE);
boton18.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 16) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button18);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton16.setVisibility(View.VISIBLE);
boton18.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 17) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im17.setVisibility(View.INVISIBLE);
im18.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 19) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button18);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton18.setVisibility(View.VISIBLE);
boton19.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 20) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button18);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im20.setVisibility(View.INVISIBLE);
im18.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 21) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button18);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton18.setVisibility(View.VISIBLE);
boton21.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 22) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button18);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im22.setVisibility(View.INVISIBLE);
im18.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 23) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button18);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im23.setVisibility(View.INVISIBLE);
im18.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 24) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button18);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im24.setVisibility(View.INVISIBLE);
im18.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 25) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button18);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton25.setVisibility(View.VISIBLE);
boton18.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 26) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button18);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton26.setVisibility(View.VISIBLE);
boton18.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 27) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button18);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im27.setVisibility(View.INVISIBLE);
im18.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 28) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton28.setVisibility(View.VISIBLE);
boton18.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 29) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button18);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton29.setVisibility(View.VISIBLE);
boton18.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
if (prec == 30) {
parit++;
i = 1;
Thread th = new Thread(new Runnable()
{
if (i == 1) {
View b =
findViewById(R.id.button18);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im30.setVisibility(View.INVISIBLE);
im18.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch
(InterruptedException e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
}
});
boton19.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button19);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 19;
} else if (prec == 1) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button19);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im15.setVisibility(View.INVISIBLE);
im19.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 16) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button19);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im19.setVisibility(View.INVISIBLE);
im16.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 17) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button19);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton19.setVisibility(View.VISIBLE);
boton17.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 18) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button19);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton18.setVisibility(View.VISIBLE);
boton19.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 20) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button19);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton20.setVisibility(View.VISIBLE);
boton19.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 21) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
public void run() {
while (i < 5) {
runOnUiThread(new Runnable() {
@Override
public void run() {
if (i == 1) {
View b =
findViewById(R.id.button19);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im19.setVisibility(View.INVISIBLE);
im21.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 22) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton22.setVisibility(View.VISIBLE);
boton19.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 23) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button19);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton23.setVisibility(View.VISIBLE);
boton19.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 24) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button19);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton24.setVisibility(View.VISIBLE);
boton19.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 25) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button19);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im25.setVisibility(View.INVISIBLE);
im19.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 26) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button19);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im26.setVisibility(View.INVISIBLE);
im19.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 27) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button19);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton19.setVisibility(View.VISIBLE);
boton27.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 28) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im28.setVisibility(View.INVISIBLE);
im19.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 29) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button19);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im29.setVisibility(View.INVISIBLE);
im19.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 30) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button19);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton19.setVisibility(View.VISIBLE);
boton30.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
});
boton20.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button6);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 20;
} else if (prec == 15) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button20);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton15.setVisibility(View.VISIBLE);
boton20.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 16) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button20);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton16.setVisibility(View.VISIBLE);
boton20.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 17) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button20);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im17.setVisibility(View.INVISIBLE);
im20.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 18) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button20);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im18.setVisibility(View.INVISIBLE);
im20.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 19) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button20);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton19.setVisibility(View.VISIBLE);
boton20.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 21) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton21.setVisibility(View.VISIBLE);
boton20.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 22) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button20);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im22.setVisibility(View.INVISIBLE);
im20.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 23) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button20);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im23.setVisibility(View.INVISIBLE);
im20.setVisibility(View.INVISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 24) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button20);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im24.setVisibility(View.INVISIBLE);
im20.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 25) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button20);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton25.setVisibility(View.VISIBLE);
boton20.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 26) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button20);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton26.setVisibility(View.VISIBLE);
boton20.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 27) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button20);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im27.setVisibility(View.INVISIBLE);
im20.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 28) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button20);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton28.setVisibility(View.VISIBLE);
boton20.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 29) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button20);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton29.setVisibility(View.VISIBLE);
boton20.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 30) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button20);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im30.setVisibility(View.INVISIBLE);
im20.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
});
boton21.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button21);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 21;
} else if (prec == 15) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button21);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im15.setVisibility(View.INVISIBLE);
im21.setVisibility(View.INVISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 16) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button21);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im21.setVisibility(View.INVISIBLE);
im16.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 17) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button21);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton17.setVisibility(View.VISIBLE);
boton21.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 18) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button21);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton18.setVisibility(View.VISIBLE);
boton21.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 19) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button21);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im21.setVisibility(View.INVISIBLE);
im19.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 20) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button21);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton20.setVisibility(View.VISIBLE);
boton21.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 22) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button21);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton22.setVisibility(View.VISIBLE);
boton21.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 23) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button21);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton23.setVisibility(View.VISIBLE);
boton21.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 24) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button21);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton24.setVisibility(View.VISIBLE);
boton21.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 25) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button21);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im21.setVisibility(View.INVISIBLE);
im25.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 26) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button21);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im21.setVisibility(View.INVISIBLE);
im26.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 27) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button21);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton21.setVisibility(View.VISIBLE);
boton27.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 28) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button21);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im21.setVisibility(View.INVISIBLE);
im28.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 29) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button21);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im21.setVisibility(View.INVISIBLE);
im29.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 30) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button21);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton21.setVisibility(View.VISIBLE);
boton30.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
});
boton22.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button8);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 22;
} else if (prec == 15) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button22);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton15.setVisibility(View.VISIBLE);
boton22.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 16) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button22);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton16.setVisibility(View.VISIBLE);
boton22.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 17) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button22);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im17.setVisibility(View.INVISIBLE);
im22.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 18) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
public void run() {
while (i < 5) {
runOnUiThread(new Runnable() {
@Override
public void run() {
if (i == 1) {
View b =
findViewById(R.id.button22);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im18.setVisibility(View.INVISIBLE);
im22.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 19) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button22);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton19.setVisibility(View.VISIBLE);
boton22.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 20) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button22);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im20.setVisibility(View.INVISIBLE);
im22.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 21) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button22);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton21.setVisibility(View.VISIBLE);
boton22.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 23) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button22);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im23.setVisibility(View.INVISIBLE);
im22.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 24) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button22);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im22.setVisibility(View.INVISIBLE);
im24.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 25) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button22);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton22.setVisibility(View.VISIBLE);
boton25.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 26) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton22.setVisibility(View.VISIBLE);
boton26.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 27) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button22);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im22.setVisibility(View.INVISIBLE);
im27.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 28) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button22);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton22.setVisibility(View.VISIBLE);
boton28.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 29) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button22);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton22.setVisibility(View.VISIBLE);
boton29.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 30) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button22);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im22.setVisibility(View.INVISIBLE);
im30.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
});
boton23.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button23);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 23;
} else if (prec == 1) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button23);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton15.setVisibility(View.VISIBLE);
boton23.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 16) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button23);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton16.setVisibility(View.VISIBLE);
boton23.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 17) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button23);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im17.setVisibility(View.INVISIBLE);
im23.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 18) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im18.setVisibility(View.INVISIBLE);
im23.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 19) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button23);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton19.setVisibility(View.VISIBLE);
boton23.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 20) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button23);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im20.setVisibility(View.INVISIBLE);
im23.setVisibility(View.INVISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 21) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button23);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton21.setVisibility(View.VISIBLE);
boton23.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 22) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button23);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im22.setVisibility(View.INVISIBLE);
im23.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 24) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button23);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im24.setVisibility(View.INVISIBLE);
im23.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 25) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button23);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton25.setVisibility(View.VISIBLE);
boton23.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 26) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button23);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton26.setVisibility(View.VISIBLE);
boton23.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 27) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button23);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im27.setVisibility(View.INVISIBLE);
im23.setVisibility(View.INVISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 28) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button23);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton28.setVisibility(View.VISIBLE);
boton23.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 29) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button23);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton29.setVisibility(View.VISIBLE);
boton23.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 30) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button23);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im30.setVisibility(View.INVISIBLE);
im23.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
});
boton24.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button24);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 24;
} else if (prec == 15) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button24);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton15.setVisibility(View.VISIBLE);
boton24.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 16) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button24);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton16.setVisibility(View.VISIBLE);
boton24.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 17) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button24);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im17.setVisibility(View.INVISIBLE);
im24.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 18) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button24);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im18.setVisibility(View.INVISIBLE);
im24.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 19) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button24);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton19.setVisibility(View.VISIBLE);
boton24.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 20) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button24);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im20.setVisibility(View.INVISIBLE);
im24.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 21) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button24);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton21.setVisibility(View.VISIBLE);
boton24.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 22) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button24);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im22.setVisibility(View.INVISIBLE);
im24.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 23) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button24);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im23.setVisibility(View.INVISIBLE);
im24.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 25) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button24);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton25.setVisibility(View.VISIBLE);
boton24.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 26) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button24);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton26.setVisibility(View.VISIBLE);
boton24.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 27) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button24);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im27.setVisibility(View.INVISIBLE);
im24.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 28) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button24);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton28.setVisibility(View.VISIBLE);
boton24.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 29) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button24);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton29.setVisibility(View.VISIBLE);
boton24.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 30) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
public void run() {
while (i < 5) {
runOnUiThread(new Runnable() {
@Override
public void run() {
if (i == 1) {
View b =
findViewById(R.id.button24);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im30.setVisibility(View.INVISIBLE);
im24.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
});
boton25.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button25);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 25;
} else if (prec == 15) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button25);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im15.setVisibility(View.INVISIBLE);
im25.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 16) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button25);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im16.setVisibility(View.INVISIBLE);
im25.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 17) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button25);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton17.setVisibility(View.VISIBLE);
boton25.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 18) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button25);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton18.setVisibility(View.VISIBLE);
boton25.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 19) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button25);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im19.setVisibility(View.INVISIBLE);
im25.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 20) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button25);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton20.setVisibility(View.VISIBLE);
boton25.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 21) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button25);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im21.setVisibility(View.INVISIBLE);
im25.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 22) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
public void run() {
while (i < 5) {
runOnUiThread(new Runnable() {
@Override
public void run() {
if (i == 1) {
View b =
findViewById(R.id.button25);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton22.setVisibility(View.VISIBLE);
boton25.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 23) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button25);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton23.setVisibility(View.VISIBLE);
boton25.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 24) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button25);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton24.setVisibility(View.VISIBLE);
boton25.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 26) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button25);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im25.setVisibility(View.INVISIBLE);
im26.setVisibility(View.INVISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 27) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button25);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton27.setVisibility(View.VISIBLE);
boton25.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 28) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button25);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im28.setVisibility(View.INVISIBLE);
im25.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 29) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button25);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im29.setVisibility(View.INVISIBLE);
im25.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 30) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton30.setVisibility(View.VISIBLE);
boton25.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
});
boton26.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button26);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 26;
if (i == 1) {
View b =
findViewById(R.id.button26);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im26.setVisibility(View.INVISIBLE);
im15.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 16) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im26.setVisibility(View.INVISIBLE);
im16.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 17) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button26);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton26.setVisibility(View.VISIBLE);
boton17.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 18) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button26);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton26.setVisibility(View.VISIBLE);
boton18.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 19) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button26);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im26.setVisibility(View.INVISIBLE);
im19.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 20) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button26);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton26.setVisibility(View.VISIBLE);
boton20.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 21) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button26);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im26.setVisibility(View.INVISIBLE);
im21.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 22) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton26.setVisibility(View.VISIBLE);
boton22.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 23) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button26);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton26.setVisibility(View.VISIBLE);
boton23.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 24) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button26);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton26.setVisibility(View.VISIBLE);
boton24.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 25) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button26);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im26.setVisibility(View.INVISIBLE);
im25.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 27) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button26);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton26.setVisibility(View.VISIBLE);
boton27.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 28) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button26);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im26.setVisibility(View.INVISIBLE);
im28.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 29) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button29);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im26.setVisibility(View.INVISIBLE);
im29.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 30) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button26);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton26.setVisibility(View.VISIBLE);
boton30.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
});
boton27.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button13);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 27;
} else if (prec == 15) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button27);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton27.setVisibility(View.VISIBLE);
boton15.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 16) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button27);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton26.setVisibility(View.VISIBLE);
boton16.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 17) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button27);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im27.setVisibility(View.INVISIBLE);
im17.setVisibility(View.INVISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 18) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button27);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im27.setVisibility(View.INVISIBLE);
im18.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 19) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button27);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton27.setVisibility(View.VISIBLE);
boton19.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 20) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button27);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im27.setVisibility(View.INVISIBLE);
im20.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 21) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button27);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton27.setVisibility(View.VISIBLE);
boton21.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 22) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button27);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im27.setVisibility(View.INVISIBLE);
im22.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 23) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button27);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im27.setVisibility(View.INVISIBLE);
im23.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 24) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button27);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im27.setVisibility(View.INVISIBLE);
im24.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 25) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button27);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton27.setVisibility(View.VISIBLE);
boton25.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 26) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button27);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton27.setVisibility(View.VISIBLE);
boton26.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 28) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
public void run() {
while (i < 5) {
runOnUiThread(new Runnable() {
@Override
public void run() {
if (i == 1) {
View b =
findViewById(R.id.button27);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton27.setVisibility(View.VISIBLE);
boton28.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 29) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button27);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton27.setVisibility(View.VISIBLE);
boton29.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 30) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button27);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im27.setVisibility(View.INVISIBLE);
im30.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
});
boton28.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button28);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 28;
} else if (prec == 15) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button28);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im28.setVisibility(View.INVISIBLE);
im15.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 16) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button28);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im28.setVisibility(View.INVISIBLE);
im16.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 17) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button28);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton28.setVisibility(View.VISIBLE);
boton17.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 18) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button28);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton28.setVisibility(View.VISIBLE);
boton18.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 19) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button28);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im28.setVisibility(View.INVISIBLE);
im19.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 20) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
public void run() {
while (i < 5) {
runOnUiThread(new Runnable() {
@Override
public void run() {
if (i == 1) {
View b =
findViewById(R.id.button28);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton28.setVisibility(View.VISIBLE);
boton20.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 21) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button28);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im28.setVisibility(View.INVISIBLE);
im21.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 22) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button28);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton28.setVisibility(View.VISIBLE);
boton22.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 23) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button28);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton28.setVisibility(View.VISIBLE);
boton23.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 24) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button28);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton28.setVisibility(View.VISIBLE);
boton24.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 25) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button28);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im28.setVisibility(View.INVISIBLE);
im25.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 26) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button28);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im28.setVisibility(View.INVISIBLE);
im26.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 27) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton28.setVisibility(View.VISIBLE);
boton27.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 29) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button28);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im28.setVisibility(View.INVISIBLE);
im29.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 30) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button28);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton28.setVisibility(View.VISIBLE);
boton30.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
});
boton29.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button29);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 29;
} else if (prec == 15) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button29);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im29.setVisibility(View.INVISIBLE);
im15.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 16) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button29);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im29.setVisibility(View.INVISIBLE);
im16.setVisibility(View.INVISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 17) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button29);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton29.setVisibility(View.VISIBLE);
boton17.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 18) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button29);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton29.setVisibility(View.VISIBLE);
boton18.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 19) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button29);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im29.setVisibility(View.INVISIBLE);
im19.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 20) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton29.setVisibility(View.VISIBLE);
boton20.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 21) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button29);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im29.setVisibility(View.INVISIBLE);
im21.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 22) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button29);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton29.setVisibility(View.VISIBLE);
boton22.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 23) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button29);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton29.setVisibility(View.VISIBLE);
boton23.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 24) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button29);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton29.setVisibility(View.VISIBLE);
boton24.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 25) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button29);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im29.setVisibility(View.INVISIBLE);
im25.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 26) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button29);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im29.setVisibility(View.INVISIBLE);
im26.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 27) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button29);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton29.setVisibility(View.VISIBLE);
boton27.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 28) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button29);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im29.setVisibility(View.INVISIBLE);
im28.setVisibility(View.INVISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 30) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button29);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton29.setVisibility(View.VISIBLE);
boton30.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
});
boton30.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {
if (parit % 2 == 1) {
View b = findViewById(R.id.button30);
b.setVisibility(View.INVISIBLE);
parit++;
prec = 30;
} else if (prec == 15) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button30);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton30.setVisibility(View.VISIBLE);
boton15.setVisibility(View.VISIBLE);
}
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 16) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button30);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton30.setVisibility(View.VISIBLE);
boton16.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 17) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button30);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im30.setVisibility(View.INVISIBLE);
im17.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 18) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button30);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im30.setVisibility(View.INVISIBLE);
im18.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 19) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button30);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton30.setVisibility(View.VISIBLE);
boton19.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 20) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button30);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im30.setVisibility(View.INVISIBLE);
im20.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 21) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button30);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton30.setVisibility(View.VISIBLE);
boton21.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 22) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button30);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im30.setVisibility(View.INVISIBLE);
im22.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 23) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button30);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im30.setVisibility(View.INVISIBLE);
im23.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 24) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button30);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im30.setVisibility(View.INVISIBLE);
im24.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 25) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button30);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton30.setVisibility(View.VISIBLE);
boton25.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 26) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button30);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton30.setVisibility(View.VISIBLE);
boton26.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 27) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button30);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
im30.setVisibility(View.INVISIBLE);
im27.setVisibility(View.INVISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 28) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button30);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton30.setVisibility(View.VISIBLE);
boton28.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
} else if (prec == 29) {
parit++;
i = 1;
Thread th = new Thread(new Runnable() {
if (i == 1) {
View b =
findViewById(R.id.button30);
b.setVisibility(View.INVISIBLE);
}
if (i == 2) {
boton30.setVisibility(View.VISIBLE);
boton29.setVisibility(View.VISIBLE);
}
});
try {
Thread.sleep(500);
} catch (InterruptedException
e) {
e.printStackTrace();
}
i++;
}
}
});
th.start();
}
}
});
}
@Override
public void onPause() {
super.onPause();
if(mPlayer != null) {
mPlayer.stop();
mPlayer.release();
}
}
fentre fin
activity correspondante
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/
res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.mac.gamebotonss.Main2Activity">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="172dp"
android:text="Game over"
tools:layout_editor_absoluteX="146dp"
tools:layout_editor_absoluteY="226dp"
android:textSize="32pt"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
</RelativeLayout>
MainActivity correpondante
package com.example.mac.gamebotonss;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main3);
}
}