InputProfilThirdFourActivity.kt
3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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 android.view.View.GONE
import android.view.View.VISIBLE
import kotlinx.android.synthetic.main.activity_input_profil_third_four.*
class InputProfilThirdFourActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_input_profil_third_four)
previousButton.setOnClickListener {
var intent = Intent(this, InputProfilThirdThreeActivity::class.java)
startActivity(intent)
}
val prof: SharedPreferences =getSharedPreferences("profdata", Context.MODE_PRIVATE)
val editor: SharedPreferences.Editor=prof.edit()
nextButton.setOnClickListener {
if(yesButton.isChecked){
editor.putInt("c8_2",1); editor.commit()
}
if(jichaeButton.isChecked){editor.putInt("c9_2",1); editor.commit()}
if(noebyungbyunButton.isChecked){editor.putInt("c9_3",1); editor.commit()}
if(sigaakButton.isChecked){editor.putInt("c9_4",1); editor.commit()}
if(chungkaakButton.isChecked){editor.putInt("c9_5",1); editor.commit()}
if(unuhButton.isChecked){editor.putInt("c9_6",1); editor.commit()}
if(ahnmyunButton.isChecked){editor.putInt("c9_7",1); editor.commit()}
if(sinjaangButton.isChecked){editor.putInt("c9_8",1); editor.commit()}
if(simjaangButton.isChecked){editor.putInt("c9_9",1); editor.commit()}
if(gaanjaangButton.isChecked){editor.putInt("c9_10",1); editor.commit()}
if(jaangrooButton.isChecked){editor.putInt("c9_11",1); editor.commit()}
if(noejungjeungButton.isChecked){editor.putInt("c9_12",1); editor.commit()}
if(hoheupkiButton.isChecked){editor.putInt("c9_13",1); editor.commit()}
if(jijukButton.isChecked){editor.putInt("c9_14",1); editor.commit()}
if(japyeahButton.isChecked){editor.putInt("c9_15",1); editor.commit()}
if(jeongshinButton.isChecked){editor.putInt("c9_16",1); editor.commit()}
if(nothingButton.isChecked){editor.putInt("c8_1",1); editor.commit()}//DB,pref 뻑 주의
if(imshinButton.isChecked){editor.putInt("c7_2",1); editor.commit()}
if(nanchiButton.isChecked){editor.putInt("c9_17",1); editor.commit()}
if(oeButton.isChecked){editor.putInt("c9_18",1); editor.commit()}
if(yoyaangButton.isChecked){editor.putInt("c9_19",1); editor.commit()}
if(guitarButton.isChecked){editor.putInt("c8_17",1); editor.commit()}
var intent = Intent(this, InputProfilFourthOneActivity::class.java)
startActivity(intent)
}
yesButton.setOnClickListener {
eightoneLayout.visibility=VISIBLE
eighttwoLayout.visibility= GONE
}
noButton.setOnClickListener {
eightoneLayout.visibility= GONE
eighttwoLayout.visibility= VISIBLE
}
}
}