InfoActivity.kt
1.54 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
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.widget.ImageView
import android.widget.Toast
import kotlinx.android.synthetic.main.activity_info.*
class InfoActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_info)
val prof: SharedPreferences =getSharedPreferences("profdata", Context.MODE_PRIVATE)
val editor: SharedPreferences.Editor=prof.edit()
Toast.makeText(applicationContext,prof.getString("manorwoman","nothing"),
Toast.LENGTH_SHORT).show()
//temp
var accountImage: ImageView =findViewById(R.id.infoAccountImage)
var profilImage: ImageView =findViewById(R.id.InfoProfilImage)
accountImage.setImageResource(R.drawable.image01)
profilImage.setImageResource(R.drawable.image01)
//temp
InfoButtonLaw.setOnClickListener {
var intent = Intent(this, SettingActivity::class.java)
startActivity(intent)
}
//pushing test start
InfoButtonSettings.setOnClickListener {
//var intent = Intent(this, SettingActivity::class.java)
//test start
var intent = Intent(this, InputProfilFirstOneActivity::class.java)
//test end
startActivity(intent)
}
//pushing test end
}
}