InfoActivity.kt
1.91 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
package com.example.vip
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.content.SharedPreferences
import android.os.Build
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.Window
import android.view.WindowManager
import android.widget.ImageView
import android.widget.Toast
import kotlinx.android.synthetic.main.activity_info.*
import android.graphics.drawable.ColorDrawable
import androidx.core.content.ContextCompat
class InfoActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_info)
// statusbar color chacnge
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
getWindow().setStatusBarColor(getResources().getColor(R.color.infomainColor));
}
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)
accountImage.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
}
}