Skip to content

Commit d2b82fe

Browse files
authored
Update MainActivity.kt
1 parent 5569573 commit d2b82fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/src/main/java/com/rabimi/javaskinchanger/MainActivity.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class MainActivity : Activity() {
4444
super.onCreate(savedInstanceState)
4545
setContentView(R.layout.activity_main)
4646

47+
// UI 接続
4748
txtUsername = findViewById(R.id.txtUsername)
4849
btnSelect = findViewById(R.id.btnSelect)
4950
btnUpload = findViewById(R.id.btnUpload)
@@ -52,7 +53,7 @@ class MainActivity : Activity() {
5253
switchModel = findViewById(R.id.switchModel)
5354
lblModel = findViewById(R.id.lblModel)
5455
progressBar = findViewById(R.id.progressBar)
55-
skinView = findViewById(R.id.imgSkin) // ← ここを ImageView に修正
56+
skinView = findViewById(R.id.imgSkin) // ImageView に接続
5657

5758
setupUI()
5859
checkLogin()
@@ -65,9 +66,9 @@ class MainActivity : Activity() {
6566
btnUpload.visibility = View.GONE
6667
progressBar.visibility = View.GONE
6768

69+
// モデル切替(ラベルのみ変更、画像は同じ)
6870
switchModel.setOnCheckedChangeListener { _, isChecked ->
6971
lblModel.text = if (isChecked) "モデル: Alex" else "モデル: Steve"
70-
currentSkinBitmap?.let { skinView.setImageBitmap(it) }
7172
}
7273

7374
btnSelect.setOnClickListener { selectSkinImage() }

0 commit comments

Comments
 (0)