InputProfilFourthFourActivity.kt 1.78 KB
package com.example.vip

import android.content.Context
import android.content.Intent
import android.content.SharedPreferences
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import kotlinx.android.synthetic.main.activity_input_profil_fourth_four.*

class InputProfilFourthFourActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_input_profil_fourth_four)

        previousButton.setOnClickListener {
            var intent = Intent(this, InputProfilFourthThreeActivity::class.java)
            startActivity(intent)
        }

        val prof: SharedPreferences =getSharedPreferences("profdata", Context.MODE_PRIVATE)
        val editor: SharedPreferences.Editor=prof.edit()

        nextButton.setOnClickListener {

            if(nothingButton.isChecked){editor.putInt("c8_1",1); editor.commit()}
            if(pokryukButton.isChecked){editor.putInt("c8_9",1); editor.commit()}
            if(pihaeButton.isChecked){editor.putInt("c8_9",1); editor.commit()}
            if(kachoolButton.isChecked){editor.putInt("c8_9",1); editor.commit()}
            if(sagoButton.isChecked){editor.putInt("c8_9",1); editor.commit()}
            if(ihonButton.isChecked){editor.putInt("c8_15",1); editor.commit()}
            if(jaehaeButton.isChecked){editor.putInt("c8_9",1); editor.commit()}
            if(hakkyobaakButton.isChecked){editor.putInt("c8_16",1); editor.commit()}
            if(siljikButton.isChecked){editor.putInt("c5_9",1); editor.commit()}
            if(guitarButton.isChecked){editor.putInt("c8_17",1); editor.commit()}

            var intent = Intent(this, InputProfilFourthFiveActivity::class.java)
            startActivity(intent)
        }






    }
}