Welcome, guest! Login / Register - Why register?
[email protected] webmail now available. Want one? Go here.
Windows getting boring or just want to try something Open Source for your next Desktop Environment?! Go Zorin OS.

Paste

Pasted as Java by registered user gunturps ( 2 years ago )
a2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (a2_click == 0){
                    a2.setBackgroundColor(Color.parseColor("#03A9F4"));
                    a2_click = 1;
                }else{
                    a2.setBackgroundColor(Color.parseColor("#999797"));
                    a2_click = 0;
                }
            }
        });

        b2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (b2_click == 0){
                    b2.setBackgroundColor(Color.parseColor("#03A9F4"));
                    b2_click = 1;
                }else{
                    b2.setBackgroundColor(Color.parseColor("#999797"));
                    b2_click = 0;
                }
            }
        });

        c2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (c2_click == 0){
                    c2.setBackgroundColor(Color.parseColor("#03A9F4"));
                    c2_click = 1;
                }else{
                    c2.setBackgroundColor(Color.parseColor("#999797"));
                    c2_click = 0;
                }
            }
        });

        d2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (d2_click == 0){
                    d2.setBackgroundColor(Color.parseColor("#03A9F4"));
                    d2_click = 1;
                }else{
                    d2.setBackgroundColor(Color.parseColor("#999797"));
                    d2_click = 0;
                }
            }
        });

        e2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (e2_click == 0){
                    e2.setBackgroundColor(Color.parseColor("#03A9F4"));
                    e2_click = 1;
                }else{
                    e2.setBackgroundColor(Color.parseColor("#999797"));
                    e2_click = 0;
                }
            }
        });

        a3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (a3_click == 0){
                    a3.setBackgroundColor(Color.parseColor("#03A9F4"));
                    a3_click = 1;
                }else{
                    a3.setBackgroundColor(Color.parseColor("#999797"));
                    a3_click = 0;
                }
            }
        });

        b3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (b3_click == 0){
                    b3.setBackgroundColor(Color.parseColor("#03A9F4"));
                    b3_click = 1;
                }else{
                    b3.setBackgroundColor(Color.parseColor("#999797"));
                    b3_click = 0;
                }
            }
        });

        c3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (c3_click == 0){
                    c3.setBackgroundColor(Color.parseColor("#03A9F4"));
                    c3_click = 1;
                }else{
                    c3.setBackgroundColor(Color.parseColor("#999797"));
                    c3_click = 0;
                }
            }
        });

        d3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (d3_click == 0){
                    d3.setBackgroundColor(Color.parseColor("#03A9F4"));
                    d3_click = 1;
                }else{
                    d3.setBackgroundColor(Color.parseColor("#999797"));
                    d3_click = 0;
                }
            }
        });

        e3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (e3_click == 0){
                    e3.setBackgroundColor(Color.parseColor("#03A9F4"));
                    e3_click = 1;
                }else{
                    e3.setBackgroundColor(Color.parseColor("#999797"));
                    e3_click = 0;
                }
            }
        });

        a4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (a4_click == 0){
                    a4.setBackgroundColor(Color.parseColor("#03A9F4"));
                    a4_click = 1;
                }else{
                    a4.setBackgroundColor(Color.parseColor("#999797"));
                    a4_click = 0;
                }
            }
        });

        b4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (b4_click == 0){
                    b4.setBackgroundColor(Color.parseColor("#03A9F4"));
                    b4_click = 1;
                }else{
                    b4.setBackgroundColor(Color.parseColor("#999797"));
                    b4_click = 0;
                }
            }
        });

        c4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (c4_click == 0){
                    c4.setBackgroundColor(Color.parseColor("#03A9F4"));
                    c4_click = 1;
                }else{
                    c4.setBackgroundColor(Color.parseColor("#999797"));
                    c4_click = 0;
                }
            }
        });

        d4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (d4_click == 0){
                    d4.setBackgroundColor(Color.parseColor("#03A9F4"));
                    d4_click = 1;
                }else{
                    d4.setBackgroundColor(Color.parseColor("#999797"));
                    d4_click = 0;
                }
            }
        });

        e4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (e4_click == 0){
                    e4.setBackgroundColor(Color.parseColor("#03A9F4"));
                    e4_click = 1;
                }else{
                    e4.setBackgroundColor(Color.parseColor("#999797"));
                    e4_click = 0;
                }
            }
        });

        a5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (a5_click == 0){
                    a5.setBackgroundColor(Color.parseColor("#03A9F4"));
                    a5_click = 1;
                }else{
                    a5.setBackgroundColor(Color.parseColor("#999797"));
                    a5_click = 0;
                }
            }
        });

        b5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (b5_click == 0){
                    b5.setBackgroundColor(Color.parseColor("#03A9F4"));
                    b5_click = 1;
                }else{
                    b5.setBackgroundColor(Color.parseColor("#999797"));
                    b5_click = 0;
                }
            }
        });

        c5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (c5_click == 0){
                    c5.setBackgroundColor(Color.parseColor("#03A9F4"));
                    c5_click = 1;
                }else{
                    c5.setBackgroundColor(Color.parseColor("#999797"));
                    c5_click = 0;
                }
            }
        });

        d5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (d5_click == 0){
                    d5.setBackgroundColor(Color.parseColor("#03A9F4"));
                    d5_click = 1;
                }else{
                    d5.setBackgroundColor(Color.parseColor("#999797"));
                    d5_click = 0;
                }
            }
        });

        e5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (e5_click == 0){
                    e5.setBackgroundColor(Color.parseColor("#03A9F4"));
                    e5_click = 1;
                }else{
                    e5.setBackgroundColor(Color.parseColor("#999797"));
                    e5_click = 0;
                }
            }
        });

        a6.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (a6_click == 0){
                    a6.setBackgroundColor(Color.parseColor("#03A9F4"));
                    a6_click = 1;
                }else{
                    a6.setBackgroundColor(Color.parseColor("#999797"));
                    a6_click = 0;
                }
            }
        });

        b6.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (b6_click == 0){
                    b6.setBackgroundColor(Color.parseColor("#03A9F4"));
                    b6_click = 1;
                }else{
                    b6.setBackgroundColor(Color.parseColor("#999797"));
                    b6_click = 0;
                }
            }
        });

        c6.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (c6_click == 0){
                    c6.setBackgroundColor(Color.parseColor("#03A9F4"));
                    c6_click = 1;
                }else{
                    c6.setBackgroundColor(Color.parseColor("#999797"));
                    c6_click = 0;
                }
            }
        });

        d6.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (d6_click == 0){
                    d6.setBackgroundColor(Color.parseColor("#03A9F4"));
                    d6_click = 1;
                }else{
                    d6.setBackgroundColor(Color.parseColor("#999797"));
                    d6_click = 0;
                }
            }
        });

        e6.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (e6_click == 0){
                    e6.setBackgroundColor(Color.parseColor("#03A9F4"));
                    e6_click = 1;
                }else{
                    e6.setBackgroundColor(Color.parseColor("#999797"));
                    e6_click = 0;
                }
            }
        });

        a7.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (a7_click == 0){
                    a7.setBackgroundColor(Color.parseColor("#03A9F4"));
                    a7_click = 1;
                }else{
                    a7.setBackgroundColor(Color.parseColor("#999797"));
                    a7_click = 0;
                }
            }
        });

        b7.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (b7_click == 0){
                    b7.setBackgroundColor(Color.parseColor("#03A9F4"));
                    b7_click = 1;
                }else{
                    b7.setBackgroundColor(Color.parseColor("#999797"));
                    b7_click = 0;
                }
            }
        });

        c7.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (c7_click == 0){
                    c7.setBackgroundColor(Color.parseColor("#03A9F4"));
                    c7_click = 1;
                }else{
                    c7.setBackgroundColor(Color.parseColor("#999797"));
                    c7_click = 0;
                }
            }
        });

        d7.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (d7_click == 0){
                    d7.setBackgroundColor(Color.parseColor("#03A9F4"));
                    d7_click = 1;
                }else{
                    d7.setBackgroundColor(Color.parseColor("#999797"));
                    d7_click = 0;
                }
            }
        });

        e7.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (e7_click == 0){
                    e7.setBackgroundColor(Color.parseColor("#03A9F4"));
                    e7_click = 1;
                }else{
                    e7.setBackgroundColor(Color.parseColor("#999797"));
                    e7_click = 0;
                }
            }
        });

        btnkursilanjut.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent formIntent = new Intent(PilihKursiZ.this, FormBiodata.class);
                formIntent.putExtra("a1", String.valueOf(a1_click));
                formIntent.putExtra("b1", String.valueOf(b1_click));
                formIntent.putExtra("c1", String.valueOf(c1_click));
                formIntent.putExtra("d1", String.valueOf(d1_click));
                formIntent.putExtra("e1", String.valueOf(e1_click));

                formIntent.putExtra("a2", String.valueOf(a2_click));
                formIntent.putExtra("b2", String.valueOf(b2_click));
                formIntent.putExtra("c2", String.valueOf(c2_click));
                formIntent.putExtra("d2", String.valueOf(d2_click));
                formIntent.putExtra("e2", String.valueOf(e2_click));

                formIntent.putExtra("a3", String.valueOf(a3_click));
                formIntent.putExtra("b3", String.valueOf(b3_click));
                formIntent.putExtra("c3", String.valueOf(c3_click));
                formIntent.putExtra("d3", String.valueOf(d3_click));
                formIntent.putExtra("e3", String.valueOf(e3_click));

                formIntent.putExtra("a4", String.valueOf(a4_click));
                formIntent.putExtra("b4", String.valueOf(b4_click));
                formIntent.putExtra("c4", String.valueOf(c4_click));
                formIntent.putExtra("d4", String.valueOf(d4_click));
                formIntent.putExtra("e4", String.valueOf(e4_click));

                formIntent.putExtra("a5", String.valueOf(a5_click));
                formIntent.putExtra("b5", String.valueOf(b5_click));
                formIntent.putExtra("c5", String.valueOf(c5_click));
                formIntent.putExtra("d5", String.valueOf(d5_click));
                formIntent.putExtra("e5", String.valueOf(e5_click));

                formIntent.putExtra("a6", String.valueOf(a6_click));
                formIntent.putExtra("b6", String.valueOf(b6_click));
                formIntent.putExtra("c6", String.valueOf(c6_click));
                formIntent.putExtra("d6", String.valueOf(d6_click));
                formIntent.putExtra("e6", String.valueOf(e6_click));

                formIntent.putExtra("a7", String.valueOf(a7_click));
                formIntent.putExtra("b7", String.valueOf(b7_click));
                formIntent.putExtra("c7", String.valueOf(c7_click));
                formIntent.putExtra("d7", String.valueOf(d7_click));
                formIntent.putExtra("e7", String.valueOf(e7_click));

                formIntent.putExtra("id_bus", Id_bus);
                formIntent.putExtra("nama_bus", Nama_bus);
                formIntent.putExtra("asal_bus", Asal_bus);
                formIntent.putExtra("tujuan_bus", Tujuan_bus);
                formIntent.putExtra("waktu_bus", Waktu_bus);
                formIntent.putExtra("harga_bus", Harga_bus);
                startActivity(formIntent);
            }
        });
    }
}

 

Revise this Paste

Your Name: Code Language: