신기성

make mutable list

Showing 25 changed files with 386 additions and 87 deletions
......@@ -190,6 +190,9 @@ class InputProfilFifthFourActivity : AppCompatActivity() {
}
nextButton.setOnClickListener {
editor.remove("fifth_four")
editor.remove("fifth_four_editText1")
editor.commit()
if((editText1.text.toString()!="")){editor.putString("fifth_four_editText1",editText1.text.toString());editor.putString("fifth_four","done");editor.commit()}
......@@ -210,6 +213,59 @@ class InputProfilFifthFourActivity : AppCompatActivity() {
editor.putInt("c15_1",1); editor.commit()
editor.putInt("c16_1",1); editor.commit()
sendToken()
val user=firebaseAuth?.currentUser!!.uid
Log.d("test:", user.toString())
val cat_1=listOf("c1_1","c1_2","c1_3")
val cat_2=listOf("c2_1","c2_2","c2_3","c2_4","c2_5","c2_6","c2_7")
val cat_3=listOf("c3_1","c3_2","c3_3")
val cat_4=listOf("c4_1","c4_2","c4_3","c4_4","c4_5","c4_6","c4_7","c4_8","c4_9","c4_10","c4_11")
val cat_5=listOf("c5_1","c5_2","c5_3","c5_4","c5_5","c5_6","c5_7","c5_8","c5_9")
val cat_6=listOf("c6_1","c6_2","c6_3","c6_4","c6_5","c6_6","c6_7")
val cat_7=listOf("c7_1","c7_2","c7_3")
val cat_8=listOf("c8_1","c8_2","c8_3","c8_4","c8_5","c8_6","c8_7","c8_8","c8_9","c8_10","c8_11","c8_12","c8_13","c8_14","c8_15","c8_16","c8_17")
val cat_9=listOf("c9_1","c9_2","c9_3","c9_4","c9_5","c9_6","c9_7","c9_8","c9_9","c9_10","c9_11","c9_12","c9_13","c9_14","c9_15","c9_16","c9_17","c9_18","c9_19")
val cat_10=listOf("c10_1","c10_2","c10_3","c10_4","c10_5","c10_6","c10_7","c10_8","c10_9","c10_10","c10_11","c10_12","c10_13","c10_14","c10_15","c10_16","c10_17","c10_18")
val cat_11=listOf("c11_1","c11_2","c11_3","c11_4","c11_5","c11_6","c11_7","c11_8","c11_9","c11_10","c11_11","c11_12","c11_13","c11_14","c11_15","c11_16","c11_17","c11_18")
val cat_12=listOf("c12_1","c12_100","c12_101","c12_102","c12_103","c12_104","c12_105","c12_106","c12_107","c12_108","c12_109","c12_110","c12_111","c12_112","c12_113","c12_114","c12_115","c12_116","c12_117","c12_118","c12_119","c12_120","c12_121","c12_122","c12_123","c12_124","c12_125","c12_126","c12_127","c12_128","c12_129","c12_130","c12_131","c12_132","c12_133","c12_134","c12_135","c12_136","c12_137","c12_138","c12_139","c12_140","c12_141","c12_142","c12_143","c12_144","c12_145","c12_146","c12_147","c12_148","c12_149","c12_150","c12_151","c12_152","c12_153","c12_154","c12_155","c12_156","c12_157","c12_158","c12_159","c12_160","c12_161","c12_162","c12_163","c12_164","c12_165","c12_166","c12_167","c12_168","c12_169","c12_170","c12_171","c12_172","c12_173","c12_174","c12_175","c12_176","c12_177","c12_178","c12_179","c12_180","c12_181","c12_182","c12_183","c12_184","c12_185","c12_186","c12_187","c12_188","c12_189","c12_190","c12_191","c12_192","c12_193","c12_194","c12_195","c12_196","c12_197","c12_198","c12_199","c12_200","c12_201","c12_202","c12_203","c12_204","c12_205","c12_206","c12_207","c12_208","c12_209","c12_210","c12_211","c12_212","c12_213","c12_214","c12_215","c12_216","c12_217","c12_218","c12_219","c12_220","c12_221","c12_222","c12_223","c12_224","c12_225","c12_226","c12_227","c12_228","c12_229","c12_230","c12_231","c12_232","c12_233","c12_234","c12_235","c12_236","c12_237","c12_238","c12_239","c12_240","c12_241","c12_242","c12_243","c12_244","c12_245","c12_246","c12_247","c12_248","c12_249","c12_250","c12_251","c12_252","c12_253","c12_254","c12_255","c12_256","c12_257","c12_258","c12_259","c12_260","c12_261","c12_262","c12_263","c12_264","c12_265","c12_266","c12_267","c12_268","c12_269","c12_270","c12_271","c12_272","c12_273","c12_274","c12_275","c12_276","c12_277","c12_278","c12_279","c12_280","c12_281","c12_282","c12_283","c12_284","c12_285","c12_286","c12_287","c12_288","c12_289","c12_290","c12_291","c12_292","c12_293","c12_294","c12_295","c12_296","c12_297","c12_298","c12_299","c12_300","c12_301","c12_302","c12_303","c12_304","c12_305","c12_306","c12_307","c12_308","c12_309","c12_310","c12_311","c12_312","c12_313","c12_314","c12_315","c12_316","c12_317","c12_318","c12_319","c12_320","c12_321","c12_322","c12_323","c12_324","c12_325","c12_326","c12_327","c12_328","c12_329","c12_330","c12_331","c12_332","c12_333","c12_334","c12_335","c12_336","c12_337","c12_338","c12_339","c12_340","c12_341","c12_342","c12_343","c12_344","c12_345","c12_346","c12_347","c12_348","c12_349","c12_350")
val cat_13=listOf("c13_1","c13_2","c13_3")
val cat_14=listOf("c14_1","c14_2","c14_3")
val cat_15=listOf("c15_1","c15_2","c15_3")
val cat_16=listOf("c16_1","c16_2","c16_3","c16_4","c16_5","c16_6","c16_7")
val cat_list=mutableListOf<String>()
cat_list.addAll(cat_1)
cat_list.addAll(cat_2)
cat_list.addAll(cat_3)
cat_list.addAll(cat_4)
cat_list.addAll(cat_5)
cat_list.addAll(cat_6)
cat_list.addAll(cat_7)
cat_list.addAll(cat_8)
cat_list.addAll(cat_9)
cat_list.addAll(cat_10)
cat_list.addAll(cat_11)
cat_list.addAll(cat_12)
cat_list.addAll(cat_13)
cat_list.addAll(cat_14)
cat_list.addAll(cat_15)
cat_list.addAll(cat_16)
var user_topic=""
for(item in cat_list){if(prof.getInt(item,3)==1){user_topic=user_topic+item}}
if(prof.getString("existing_topic","none")!=user_topic){
FirebaseMessaging.getInstance().unsubscribeFromTopic(prof.getString("existing_topic","none").toString())
FirebaseMessaging.getInstance().subscribeToTopic(user_topic).addOnCompleteListener { task ->
if (!task.isSuccessful) { } // 성공
}
writeNewUser(user_topic) // db에 쓰기
editor.putString("existing_topic",user_topic)
editor.commit()
}else{
}
var intent = Intent(this, SignInActivity::class.java)
startActivity(intent)
}
......
......@@ -175,6 +175,10 @@ class InputProfilFifthOneActivity : AppCompatActivity() {
}
nextButton.setOnClickListener {
editor.remove("fifth_one")
editor.remove("fifth_one_editText1")
editor.remove("fifth_one_editText2")
editor.commit()
if((editText1.text.toString()!="")&&(editText2.text.toString()!="")){editor.putString("fifth_one_editText1",editText1.text.toString());editor.putString("fifth_one_editText2",editText2.text.toString());editor.commit();editor.putString("fifth_one","done");editor.commit()}
var intent = Intent(this, InputProfilFifthTwoActivity::class.java)
......
......@@ -185,6 +185,11 @@ class InputProfilFifthThreeActivity : AppCompatActivity() {
}
nextButton.setOnClickListener {
editor.remove("fifth_three")
editor.remove("fifth_three_editText1")
editor.remove("fifth_three_editText2")
editor.remove("fifth_three_editText3")
editor.commit()
if((editText1.text.toString()!="")&&(editText2.text.toString()!="")&&(editText3.text.toString()!="")){editor.putString("fifth_three_editText1",editText1.text.toString());editor.putString("fifth_three_editText2",editText2.text.toString());editor.putString("fifth_three_editText3",editText3.text.toString());editor.commit();editor.putString("fifth_three","done");editor.commit()}
var intent = Intent(this, InputProfilFifthFourActivity::class.java)
......
......@@ -224,6 +224,15 @@ class InputProfilFifthTwoActivity : AppCompatActivity() {
}
nextButton.setOnClickListener {
editor.remove("fifth_two")
editor.remove("fifth_two_editText1")
editor.remove("fifth_two_jikjaangButton")
editor.remove("fifth_two_editText1")
editor.remove("fifth_two_jiyeokButton")
editor.remove("fifth_two_pibooyaangjikjaangButton")
editor.remove("fifth_two_pibooyaangjiyeokButton")
editor.remove("fifth_two_uieryoButton")
editor.commit()
if(jikjaangButton.isChecked&&(editText1.text.toString()!="")){editor.putString("fifth_two_editText1",editText1.text.toString());editor.putString("fifth_two_jikjaangButton","isChecked");editor.putString("fifth_two","done");editor.commit()}
if(jiyeokButton.isChecked&&(editText1.text.toString()!="")){editor.putString("fifth_two_editText1",editText1.text.toString());editor.putString("fifth_two_jiyeokButton","isChecked");editor.putString("fifth_two","done");editor.commit()}
if(pibooyaangjikjaangButton.isChecked){editor.putString("fifth_two_pibooyaangjikjaangButton","isChecked");editor.putString("fifth_two","done");editor.commit()}
......
......@@ -149,6 +149,10 @@ class InputProfilFirstFiveActivity : AppCompatActivity() {
}
nextButton.setOnClickListener {
editor.remove("first_five")
editor.remove("c1_2")
editor.remove("c1_3")
editor.commit()
......
......@@ -12,6 +12,23 @@ import com.google.firebase.database.FirebaseDatabase
import com.google.firebase.iid.FirebaseInstanceId
import kotlinx.android.synthetic.main.activity_input_profil_first_one.*
val global_cat_1=listOf("c1_1","c1_2","c1_3")
val global_cat_2=listOf("c2_1","c2_2","c2_3","c2_4","c2_5","c2_6","c2_7")
val global_cat_3=listOf("c3_1","c3_2","c3_3")
val global_cat_4=listOf("c4_1","c4_2","c4_3","c4_4","c4_5","c4_6","c4_7","c4_8","c4_9","c4_10","c4_11")
val global_cat_5=listOf("c5_1","c5_2","c5_3","c5_4","c5_5","c5_6","c5_7","c5_8","c5_9")
val global_cat_6=listOf("c6_1","c6_2","c6_3","c6_4","c6_5","c6_6","c6_7")
val global_cat_7=listOf("c7_1","c7_2","c7_3")
val global_cat_8=listOf("c8_1","c8_2","c8_3","c8_4","c8_5","c8_6","c8_7","c8_8","c8_9","c8_10","c8_11","c8_12","c8_13","c8_14","c8_15","c8_16","c8_17")
val global_cat_9=listOf("c9_1","c9_2","c9_3","c9_4","c9_5","c9_6","c9_7","c9_8","c9_9","c9_10","c9_11","c9_12","c9_13","c9_14","c9_15","c9_16","c9_17","c9_18","c9_19")
val global_cat_10=listOf("c10_1","c10_2","c10_3","c10_4","c10_5","c10_6","c10_7","c10_8","c10_9","c10_10","c10_11","c10_12","c10_13","c10_14","c10_15","c10_16","c10_17","c10_18")
val global_cat_11=listOf("c11_1","c11_2","c11_3","c11_4","c11_5","c11_6","c11_7","c11_8","c11_9","c11_10","c11_11","c11_12","c11_13","c11_14","c11_15","c11_16","c11_17","c11_18")
val global_cat_12=listOf("c12_1","c12_100","c12_101","c12_102","c12_103","c12_104","c12_105","c12_106","c12_107","c12_108","c12_109","c12_110","c12_111","c12_112","c12_113","c12_114","c12_115","c12_116","c12_117","c12_118","c12_119","c12_120","c12_121","c12_122","c12_123","c12_124","c12_125","c12_126","c12_127","c12_128","c12_129","c12_130","c12_131","c12_132","c12_133","c12_134","c12_135","c12_136","c12_137","c12_138","c12_139","c12_140","c12_141","c12_142","c12_143","c12_144","c12_145","c12_146","c12_147","c12_148","c12_149","c12_150","c12_151","c12_152","c12_153","c12_154","c12_155","c12_156","c12_157","c12_158","c12_159","c12_160","c12_161","c12_162","c12_163","c12_164","c12_165","c12_166","c12_167","c12_168","c12_169","c12_170","c12_171","c12_172","c12_173","c12_174","c12_175","c12_176","c12_177","c12_178","c12_179","c12_180","c12_181","c12_182","c12_183","c12_184","c12_185","c12_186","c12_187","c12_188","c12_189","c12_190","c12_191","c12_192","c12_193","c12_194","c12_195","c12_196","c12_197","c12_198","c12_199","c12_200","c12_201","c12_202","c12_203","c12_204","c12_205","c12_206","c12_207","c12_208","c12_209","c12_210","c12_211","c12_212","c12_213","c12_214","c12_215","c12_216","c12_217","c12_218","c12_219","c12_220","c12_221","c12_222","c12_223","c12_224","c12_225","c12_226","c12_227","c12_228","c12_229","c12_230","c12_231","c12_232","c12_233","c12_234","c12_235","c12_236","c12_237","c12_238","c12_239","c12_240","c12_241","c12_242","c12_243","c12_244","c12_245","c12_246","c12_247","c12_248","c12_249","c12_250","c12_251","c12_252","c12_253","c12_254","c12_255","c12_256","c12_257","c12_258","c12_259","c12_260","c12_261","c12_262","c12_263","c12_264","c12_265","c12_266","c12_267","c12_268","c12_269","c12_270","c12_271","c12_272","c12_273","c12_274","c12_275","c12_276","c12_277","c12_278","c12_279","c12_280","c12_281","c12_282","c12_283","c12_284","c12_285","c12_286","c12_287","c12_288","c12_289","c12_290","c12_291","c12_292","c12_293","c12_294","c12_295","c12_296","c12_297","c12_298","c12_299","c12_300","c12_301","c12_302","c12_303","c12_304","c12_305","c12_306","c12_307","c12_308","c12_309","c12_310","c12_311","c12_312","c12_313","c12_314","c12_315","c12_316","c12_317","c12_318","c12_319","c12_320","c12_321","c12_322","c12_323","c12_324","c12_325","c12_326","c12_327","c12_328","c12_329","c12_330","c12_331","c12_332","c12_333","c12_334","c12_335","c12_336","c12_337","c12_338","c12_339","c12_340","c12_341","c12_342","c12_343","c12_344","c12_345","c12_346","c12_347","c12_348","c12_349","c12_350")
val global_cat_13=listOf("c13_1","c13_2","c13_3")
val global_cat_14=listOf("c14_1","c14_2","c14_3")
val global_cat_15=listOf("c15_1","c15_2","c15_3")
val global_cat_16=listOf("c16_1","c16_2","c16_3","c16_4","c16_5","c16_6","c16_7")
val global_cat_list=mutableListOf<String>("c1_1","c1_2","c1_3","c2_1","c2_2","c2_3","c2_4","c2_5","c2_6","c2_7","c3_1","c3_2","c3_3","c4_1","c4_2","c4_3","c4_4","c4_5","c4_6","c4_7","c4_8","c4_9","c4_10","c4_11","c5_1","c5_2","c5_3","c5_4","c5_5","c5_6","c5_7","c5_8","c5_9","c6_1","c6_2","c6_3","c6_4","c6_5","c6_6","c6_7","c7_1","c7_2","c7_3","c8_1","c8_2","c8_3","c8_4","c8_5","c8_6","c8_7","c8_8","c8_9","c8_10","c8_11","c8_12","c8_13","c8_14","c8_15","c8_16","c8_17","c9_1","c9_2","c9_3","c9_4","c9_5","c9_6","c9_7","c9_8","c9_9","c9_10","c9_11","c9_12","c9_13","c9_14","c9_15","c9_16","c9_17","c9_18","c9_19","c10_1","c10_2","c10_3","c10_4","c10_5","c10_6","c10_7","c10_8","c10_9","c10_10","c10_11","c10_12","c10_13","c10_14","c10_15","c10_16","c10_17","c10_18","c11_1","c11_2","c11_3","c11_4","c11_5","c11_6","c11_7","c11_8","c11_9","c11_10","c11_11","c11_12","c11_13","c11_14","c11_15","c11_16","c11_17","c11_18","c12_1","c12_100","c12_101","c12_102","c12_103","c12_104","c12_105","c12_106","c12_107","c12_108","c12_109","c12_110","c12_111","c12_112","c12_113","c12_114","c12_115","c12_116","c12_117","c12_118","c12_119","c12_120","c12_121","c12_122","c12_123","c12_124","c12_125","c12_126","c12_127","c12_128","c12_129","c12_130","c12_131","c12_132","c12_133","c12_134","c12_135","c12_136","c12_137","c12_138","c12_139","c12_140","c12_141","c12_142","c12_143","c12_144","c12_145","c12_146","c12_147","c12_148","c12_149","c12_150","c12_151","c12_152","c12_153","c12_154","c12_155","c12_156","c12_157","c12_158","c12_159","c12_160","c12_161","c12_162","c12_163","c12_164","c12_165","c12_166","c12_167","c12_168","c12_169","c12_170","c12_171","c12_172","c12_173","c12_174","c12_175","c12_176","c12_177","c12_178","c12_179","c12_180","c12_181","c12_182","c12_183","c12_184","c12_185","c12_186","c12_187","c12_188","c12_189","c12_190","c12_191","c12_192","c12_193","c12_194","c12_195","c12_196","c12_197","c12_198","c12_199","c12_200","c12_201","c12_202","c12_203","c12_204","c12_205","c12_206","c12_207","c12_208","c12_209","c12_210","c12_211","c12_212","c12_213","c12_214","c12_215","c12_216","c12_217","c12_218","c12_219","c12_220","c12_221","c12_222","c12_223","c12_224","c12_225","c12_226","c12_227","c12_228","c12_229","c12_230","c12_231","c12_232","c12_233","c12_234","c12_235","c12_236","c12_237","c12_238","c12_239","c12_240","c12_241","c12_242","c12_243","c12_244","c12_245","c12_246","c12_247","c12_248","c12_249","c12_250","c12_251","c12_252","c12_253","c12_254","c12_255","c12_256","c12_257","c12_258","c12_259","c12_260","c12_261","c12_262","c12_263","c12_264","c12_265","c12_266","c12_267","c12_268","c12_269","c12_270","c12_271","c12_272","c12_273","c12_274","c12_275","c12_276","c12_277","c12_278","c12_279","c12_280","c12_281","c12_282","c12_283","c12_284","c12_285","c12_286","c12_287","c12_288","c12_289","c12_290","c12_291","c12_292","c12_293","c12_294","c12_295","c12_296","c12_297","c12_298","c12_299","c12_300","c12_301","c12_302","c12_303","c12_304","c12_305","c12_306","c12_307","c12_308","c12_309","c12_310","c12_311","c12_312","c12_313","c12_314","c12_315","c12_316","c12_317","c12_318","c12_319","c12_320","c12_321","c12_322","c12_323","c12_324","c12_325","c12_326","c12_327","c12_328","c12_329","c12_330","c12_331","c12_332","c12_333","c12_334","c12_335","c12_336","c12_337","c12_338","c12_339","c12_340","c12_341","c12_342","c12_343","c12_344","c12_345","c12_346","c12_347","c12_348","c12_349","c12_350","c13_1","c13_2","c13_3","c14_1","c14_2","c14_3","c15_1","c15_2","c15_3","c16_1","c16_2","c16_3","c16_4","c16_5","c16_6","c16_7")
class InputProfilFirstOneActivity : AppCompatActivity() {
private val firebaseAuth = FirebaseAuth.getInstance()
......
......@@ -130,6 +130,10 @@ class InputProfilFirstSixActivity : AppCompatActivity() {
}
nextButton.setOnClickListener {
editor.remove("first_six")
editor.remove("c13_2")
editor.remove("c13_3")
editor.commit()
......
......@@ -144,6 +144,12 @@ class InputProfilFirstThreeActivity : AppCompatActivity() {
}
nextButton.setOnClickListener {
editor.remove("c3_2")
editor.remove("c3_3")
editor.remove("first_three")
editor.commit()
var intent = Intent(this, InputProfilFirstFourActivity::class.java)
startActivity(intent)
......@@ -156,12 +162,14 @@ class InputProfilFirstThreeActivity : AppCompatActivity() {
//마지막장에 상관없음 추가
}
else{
else if(womanButton.isChecked){
editor.putInt("c3_3",1)
editor.putString("gender", "여자")
editor.commit()
editor.putString("first_three","done");editor.commit()
}else{
}
}
......
......@@ -132,64 +132,78 @@ class InputProfilFirstTwoActivity : AppCompatActivity() {
//editor.putString("birthdate","none")
previousButton.setOnClickListener {
var intent = Intent(this, InputProfilFirstOneActivity::class.java)
startActivity(intent)
}
nextButton.setOnClickListener {
editor.remove("c1_2")
editor.remove("c1_3")
editor.remove("c1_4")
editor.remove("c1_5")
editor.remove("c1_6")
editor.remove("c1_7")
editor.remove("first_two")
editor.commit()
var birthdateinput=findViewById<EditText>(R.id.editText).text.toString()
var birthdateint = 0
var birthdateint:Int
if (birthdateinput == "") {
birthdateint = 0
}
else {
birthdateint = birthdateinput.toInt()
}
if ((2019-birthdateint)<19){
editor.putInt("c1_2",1)
editor.commit()
if ((2019-birthdateint)<19){
editor.putInt("c1_2",1)
editor.commit()
editor.putString("first_two","done");editor.commit()
Toast.makeText(baseContext, prof.getInt("c1_2",0).toString(), Toast.LENGTH_SHORT).show()
//마지막장에 상관없음 추가
FirebaseMessaging.getInstance().subscribeToTopic("c1_2")
.addOnCompleteListener { task ->
var msg = getString(R.string.msg_subscribed)
if (!task.isSuccessful) {
msg = getString(R.string.msg_subscribe_failed)
}
}
}
else if((2019-birthdateint)<34){
editor.putInt("c1_3",1)
editor.commit()
editor.putString("first_two","done");editor.commit()
editor.putString("first_two","done");editor.commit()
}
else if((2019-birthdateint)<40){
editor.putInt("c1_4",1)
editor.commit()
editor.putString("first_two","done");editor.commit()
Toast.makeText(baseContext, prof.getInt("c1_2",0).toString(), Toast.LENGTH_SHORT).show()
//마지막장에 상관없음 추가
FirebaseMessaging.getInstance().subscribeToTopic("c1_2")
.addOnCompleteListener { task ->
var msg = getString(R.string.msg_subscribed)
if (!task.isSuccessful) {
msg = getString(R.string.msg_subscribe_failed)
}
}
}
else if((2019-birthdateint)<34){
editor.putInt("c1_3",1)
editor.commit()
editor.putString("first_two","done");editor.commit()
}
else if((2019-birthdateint)<49){
editor.putInt("c1_5",1)
editor.commit()
editor.putString("first_two","done");editor.commit()
}
else if((2019-birthdateint)<40){
editor.putInt("c1_4",1)
editor.commit()
editor.putString("first_two","done");editor.commit()
}
else if((2019-birthdateint)<59){
editor.putInt("c1_6",1)
editor.commit()
editor.putString("first_two","done");editor.commit()
}
else if((2019-birthdateint)<49){
editor.putInt("c1_5",1)
editor.commit()
editor.putString("first_two","done");editor.commit()
}
else{
editor.putInt("c1_7",1)
editor.commit()
editor.putString("first_two","done");editor.commit()
}
}
else if((2019-birthdateint)<59){
editor.putInt("c1_6",1)
editor.commit()
editor.putString("first_two","done");editor.commit()
}
else{
editor.putInt("c1_7",1)
editor.commit()
editor.putString("first_two","done");editor.commit()
}
var intent = Intent(this, InputProfilFirstThreeActivity::class.java)
startActivity(intent)
......
......@@ -161,6 +161,14 @@ class InputProfilFourthFiveActivity : AppCompatActivity() {
}
nextButton.setOnClickListener {
editor.remove("fourth_five")
editor.remove("c8_1")
editor.remove("c8_12")
editor.remove("c8_13")
editor.remove("c8_14")
editor.remove("c8_17")
editor.commit()
if(nothingButton.isChecked){editor.putInt("c8_1",1); editor.commit();editor.putString("fourth_five","done");editor.commit()}
if(iljaeButton.isChecked){editor.putInt("c8_12",1); editor.commit();editor.putString("fourth_five","done");editor.commit()}
if(specialpihaeButton.isChecked){editor.putInt("c8_13",1); editor.commit();editor.putString("fourth_five","done");editor.commit()}
......
......@@ -163,6 +163,18 @@ class InputProfilFourthFourActivity : AppCompatActivity() {
startActivity(intent)
}
nextButton.setOnClickListener {
editor.remove("fourth_four")
editor.remove("c8_1")
editor.remove("c8_9")
editor.remove("c8_9")
editor.remove("c8_9")
editor.remove("c8_9")
editor.remove("c8_15")
editor.remove("c8_9")
editor.remove("c8_16")
editor.remove("c5_9")
editor.remove("c8_17")
editor.commit()
if(nothingButton.isChecked){editor.putInt("c8_1",1); editor.commit();editor.putString("fourth_four","done");editor.commit()}
if(pokryukButton.isChecked){editor.putInt("c8_9",1); editor.commit();editor.putString("fourth_four","done");editor.commit()}
......
......@@ -190,6 +190,16 @@ class InputProfilFourthOneActivity : AppCompatActivity() {
}
nextButton.setOnClickListener {
editor.remove("fourth_one")
editor.remove("c14_2")
editor.remove("c14_3")
editor.remove("c16_2")
editor.remove("c16_3")
editor.remove("c16_4")
editor.remove("c16_5")
editor.remove("c16_6")
editor.remove("c16_7")
editor.commit()
if(yesButton.isChecked){
editor.putInt("c14_2",1)
......@@ -199,7 +209,7 @@ class InputProfilFourthOneActivity : AppCompatActivity() {
if(noButton.isChecked){
editor.putInt("c14_3",1)
editor.commit()
editor.putString("fourth_one","done");editor.commit()
//editor.putString("fourth_one","done");editor.commit()
}
if(jeonsaeButton.isChecked){
editor.putInt("c16_2",1)
......
......@@ -132,6 +132,20 @@ class InputProfilFourthThreeActivity : AppCompatActivity() {
nextButton.setOnClickListener {
editor.remove("fourth_three")
editor.remove("c8_1")
editor.remove("c8_3")
editor.remove("c8_7")
editor.remove("c8_5")
editor.remove("c8_4")
editor.remove("c8_2")
editor.remove("c7_1")
editor.remove("c8_10")
editor.remove("c8_11")
editor.remove("c8_6")
editor.remove("c8_8")
editor.remove("c8_17")
editor.commit()
if(nothingButton.isChecked){editor.putInt("c8_1",1); editor.commit();editor.putString("fourth_three","done");editor.commit()}
if(jeosodeukButton.isChecked){editor.putInt("c8_3",1); editor.commit();editor.putString("fourth_three","done");editor.commit()}
if(hanboomoButton.isChecked){editor.putInt("c8_7",1); editor.commit();editor.putString("fourth_three","done");editor.commit()}
......
......@@ -165,8 +165,21 @@ class InputProfilFourthTwoActivity : AppCompatActivity() {
nextButton.setOnClickListener {
editor.remove("fourth_two")
editor.remove("c15_2")
editor.remove("c15_3")
editor.remove("c16_2")
editor.remove("c16_3")
editor.remove("c16_4")
editor.remove("c16_5")
editor.remove("c16_6")
editor.remove("c16_7")
editor.commit()
if(yesButton.isChecked){editor.putInt("c15_2",1); editor.commit();editor.putString("fourth_two","done");editor.commit()}
if(noButton.isChecked){editor.putInt("c15_3",1); editor.commit();editor.putString("fourth_two","done");editor.commit()}
if(noButton.isChecked){editor.putInt("c15_3",1); editor.commit();
//editor.putString("fourth_two","done");
editor.commit()}
if(jeonsaeButton.isChecked){editor.putInt("c16_2",1); editor.commit();editor.putString("fourth_two","done");editor.commit()}
if(wolseButton.isChecked){editor.putInt("c16_3",1); editor.commit();editor.putString("fourth_two","done");editor.commit()}
if(kongkongButton.isChecked){editor.putInt("c16_4",1); editor.commit();editor.putString("fourth_two","done");editor.commit()}
......
......@@ -154,6 +154,25 @@ class InputProfilSecondOneActivity : AppCompatActivity() {
nextButton.setOnClickListener {
editor.remove("second_one")
editor.remove("with_brothersister")
editor.remove("with_child")
editor.remove("c10_2")
editor.remove("c10_3")
editor.remove("c10_4")
editor.remove("c10_5")
editor.remove("c10_6")
editor.remove("c10_7")
editor.remove("c10_8")
editor.remove("c10_9")
editor.remove("c10_10")
editor.remove("c10_11")
editor.remove("c10_12")
editor.remove("c10_13")
editor.remove("c10_14")
editor.remove("c10_15")
editor.remove("c10_18")
editor.commit()
if(baewoojaButton.isChecked){editor.putInt("c10_2",1); editor.commit();editor.putString("second_one","done");editor.commit()}
if(baewoojaboomoButton.isChecked){editor.putInt("c10_3",1); editor.commit();editor.putString("second_one","done");editor.commit()}
......@@ -178,15 +197,15 @@ class InputProfilSecondOneActivity : AppCompatActivity() {
){
var intent = Intent(this, InputProfilSecondTwoActivity::class.java)
startActivity(intent)
}else if(janyeoButton.isChecked==false&&brotherButton.isChecked==true){
var intent = Intent(this, InputProfilSecondThreeActivity::class.java)
startActivity(intent)
}else{
var intent = Intent(this, InputProfilThirdOneActivity::class.java)
startActivity(intent)
}
if(janyeoButton.isChecked==false&&brotherButton.isChecked==true){
var intent = Intent(this, InputProfilSecondThreeActivity::class.java)
startActivity(intent)
}
}
nothingButton.setOnClickListener {
......
......@@ -129,18 +129,38 @@ class InputProfilSecondThreeActivity : AppCompatActivity() {
previousButton.setOnClickListener {
var intent = Intent(this, InputProfilSecondTwoActivity::class.java)
startActivity(intent)
if(prof.getString("with_child","none")=="yes"){
var intent = Intent(this, InputProfilSecondTwoActivity::class.java)
startActivity(intent)
}
else{
var intent = Intent(this, InputProfilSecondOneActivity::class.java)
startActivity(intent)
}
}
nextButton.setOnClickListener {
var numOfBS=findViewById<EditText>(R.id.bsNumberEditText).text.toString().toInt()
if(numOfBS>=2){
editor.putInt("c10_16",1); editor.commit();editor.putString("second_three","done");editor.commit()
}
if(numOfBS<2){
editor.putInt("c10_17",1); editor.commit();editor.putString("second_three","done");editor.commit()
editor.remove("second_three")
editor.remove("c10_16")
editor.remove("c10_17")
editor.commit()
var numOfBS:Int
if(findViewById<EditText>(R.id.bsNumberEditText).text.toString()==""){
numOfBS=0
}else{
numOfBS=findViewById<EditText>(R.id.bsNumberEditText).text.toString().toInt()
if(numOfBS>=2){
editor.putInt("c10_16",1); editor.commit();editor.putString("second_three","done");editor.commit()
}else if(numOfBS<2){
editor.putInt("c10_17",1); editor.commit();editor.putString("second_three","done");editor.commit()
}else{
}
}
var intent = Intent(this, InputProfilThirdOneActivity::class.java)
startActivity(intent)
}
......
......@@ -130,16 +130,31 @@ class InputProfilSecondTwoActivity : AppCompatActivity() {
startActivity(intent)
}
nextButton.setOnClickListener {
var numOfChild=findViewById<EditText>(R.id.childNumberEditText).text.toString().toInt()
if(numOfChild>=3){
editor.putInt("c10_16",1); editor.commit();editor.putString("second_two","done");editor.commit()
}
if(numOfChild<3){
editor.putInt("c10_17",1); editor.commit();editor.putString("second_two","done");editor.commit()
editor.remove("second_two")
editor.remove("c10_16")
editor.remove("c10_17")
editor.commit()
var numOfChild:Int
if(findViewById<EditText>(R.id.childNumberEditText).text.toString()==""){
numOfChild=0
}else{
numOfChild=findViewById<EditText>(R.id.childNumberEditText).text.toString().toInt()
if(numOfChild>=3){
editor.putInt("c10_16",1); editor.commit();editor.putString("second_two","done");editor.commit()
}else if(numOfChild<3){
editor.putInt("c10_17",1); editor.commit();editor.putString("second_two","done");editor.commit()
}else{
}
}
/*
editor.putString(childRecyclerView.circleformButton.text.toString()+"st janyeo birth", childRecyclerView.childBirthEditText.text.toString()); editor.commit()
if(childRecyclerView.womanButton.isChecked){
......@@ -163,23 +178,28 @@ class InputProfilSecondTwoActivity : AppCompatActivity() {
childNumberInputButton.setOnClickListener {
childList.clear()
if(findViewById<EditText>(R.id.childNumberEditText).text.toString().toInt()>0){
var childNum=findViewById<EditText>(R.id.childNumberEditText).text.toString().toInt()
var cnt=1
while(childNum>=cnt){
childList.add(
ChildItem(cnt)
)
cnt++
if(findViewById<EditText>(R.id.childNumberEditText).text.toString().toInt()>0){
var childNum=findViewById<EditText>(R.id.childNumberEditText).text.toString().toInt()
var cnt=1
while(childNum>=cnt){
childList.add(
ChildItem(cnt)
)
cnt++
}
//Toast.makeText(this, cnt.toString(), Toast.LENGTH_SHORT).show()
}
//Toast.makeText(this, cnt.toString(), Toast.LENGTH_SHORT).show()
}
else{
var childNum=0
}
else{
var childNum=0
}
val adapter = ChildAdapter(childList)
childRecyclerView.adapter = adapter
val adapter = ChildAdapter(childList)
childRecyclerView.adapter = adapter
......
......@@ -169,6 +169,14 @@ class InputProfilThirdFiveActivity : AppCompatActivity() {
}
nextButton.setOnClickListener {
editor.remove("third_four")
editor.remove("c8_1")
editor.remove("c7_2")
editor.remove("c9_17")
editor.remove("c9_18")
editor.remove("c9_19")
editor.remove("c8_17")
editor.commit()
if(nothingButton.isChecked){editor.putInt("c8_1",1); editor.commit();editor.putString("third_four","done");editor.commit()}//DB,pref 뻑 주의
if(imshinButton.isChecked){editor.putInt("c7_2",1); editor.commit();editor.putString("third_four","done");editor.commit()}
......
......@@ -133,6 +133,24 @@ class InputProfilThirdFourActivity : AppCompatActivity() {
}
nextButton.setOnClickListener {
editor.remove("third_four")
editor.remove("c8_2")
editor.remove("c9_2")
editor.remove("c9_3")
editor.remove("c9_4")
editor.remove("c9_5")
editor.remove("c9_6")
editor.remove("c9_7")
editor.remove("c9_8")
editor.remove("c9_9")
editor.remove("c9_10")
editor.remove("c9_11")
editor.remove("c9_12")
editor.remove("c9_13")
editor.remove("c9_14")
editor.remove("c9_15")
editor.remove("c9_16")
editor.commit()
if(yesButton.isChecked){
editor.putInt("c8_2",1); editor.commit()
......
......@@ -184,11 +184,29 @@ class InputProfilThirdOneActivity : AppCompatActivity() {
}
previousButton.setOnClickListener {
var intent = Intent(this, InputProfilSecondThreeActivity::class.java)
startActivity(intent)
if(prof.getString("with_brothersister","none")=="yes"){
var intent = Intent(this, InputProfilSecondThreeActivity::class.java)
startActivity(intent)
}else if(prof.getString("with_child","none")=="yes"){
var intent = Intent(this, InputProfilSecondTwoActivity::class.java)
startActivity(intent)
}else{
var intent = Intent(this, InputProfilSecondOneActivity::class.java)
startActivity(intent)
}
}
nextButton.setOnClickListener {
editor.remove("third_one")
editor.remove("c6_2")
editor.remove("c6_3")
editor.remove("c6_4")
editor.remove("c6_5")
editor.remove("c6_6")
editor.remove("c6_7")
editor.commit()
if(elementaryButton.isChecked){
editor.putInt("c6_2",1); editor.commit();editor.putString("third_one","done");editor.commit()
}else if(middleButton.isChecked){
......
......@@ -129,6 +129,19 @@ class InputProfilThirdThreeActivity : AppCompatActivity() {
}
nextButton.setOnClickListener {
editor.remove("third_three")
editor.remove("c4_11")
editor.remove("c4_2")
editor.remove("c4_3")
editor.remove("c4_4")
editor.remove("c4_5")
editor.remove("c4_6")
editor.remove("c4_7")
editor.remove("c4_8")
editor.remove("c4_9")
editor.remove("c4_10")
editor.commit()
if(nothingButton.isChecked){ editor.putInt("c4_11",1); editor.commit();editor.putString("third_three","done");editor.commit()}
if(mipilButton.isChecked){ editor.putInt("c4_2",1); editor.commit();editor.putString("third_three","done");editor.commit()}
if(myunjaeButton.isChecked){ editor.putInt("c4_3",1); editor.commit();editor.putString("third_three","done");editor.commit()}
......
......@@ -156,6 +156,13 @@ class InputProfilThirdTwoActivity : AppCompatActivity() {
}
nextButton.setOnClickListener {
editor.remove("third_two")
editor.remove("c5_6")
editor.remove("c5_7")
editor.remove("c5_9")
editor.remove("c5_5")
editor.remove("c5_5")
editor.commit()
if(companyButton.isChecked){ editor.putInt("c5_6",1); editor.commit();editor.putString("third_two","done");editor.commit()}
if(workerButton.isChecked){ editor.putInt("c5_7",1); editor.commit();editor.putString("third_two","done");editor.commit()}
if(entireButton.isChecked){ editor.putInt("c5_9",1); editor.commit();editor.putString("third_two","done");editor.commit()}
......
......@@ -20,19 +20,17 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="3"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:background="@drawable/inputlogo" />
android:background="@drawable/profile_logo"
android:scaleType="centerCrop" />
</LinearLayout>
<LinearLayout
......