InputProfilFirstSixActivity.kt 1.2 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_first_six.*

class InputProfilFirstSixActivity : AppCompatActivity() {

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

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

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

        nextButton.setOnClickListener {
            if(gagoojooButton.isChecked){
                editor.putInt("c13_2",1); editor.commit()
            }else if(gagoowonButton.isChecked){
                editor.putInt("c13_3",1); editor.commit()
            }else{

            }

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

    }
}