팅김
358
작성한 질문수 3
선생님 혹시 제가 사진 띄우기하다가 다만들고 6번사진을 누르면 에물레이터가 팅기는 현상이있는데 왜그런지 알수있을까요? 혹시 제 파일을 보실수 있는 방법이있을까요?
답변 12
0
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="120dp">
<ImageView
android:id="@+id/bo_image_1"
android:src="@drawable/bo_1"
android:layout_width="120dp"
android:layout_height="120dp">
</ImageView>
<ImageView
android:id="@+id/bo_image_2"
android:src="@drawable/bo_2"
android:layout_width="120dp"
android:layout_height="120dp">
</ImageView>
<ImageView
android:id="@+id/bo_image_3"
android:src="@drawable/bo_3"
android:layout_width="120dp"
android:layout_height="120dp">
</ImageView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="120dp">
<ImageView
android:id="@+id/bo_image_4"
android:src="@drawable/bo_4"
android:layout_width="120dp"
android:layout_height="120dp">
</ImageView>
<ImageView
android:id="@+id/bo_image_5"
android:src="@drawable/bo_5"
android:layout_width="120dp"
android:layout_height="120dp">
</ImageView>
<ImageView
android:id="@+id/bo_image_6"
android:src="@drawable/bo_6"
android:layout_width="120dp"
android:layout_height="120dp">
</ImageView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="120dp">
<ImageView
android:id="@+id/bo_image_7"
android:src="@drawable/bo_7"
android:layout_width="120dp"
android:layout_height="120dp">
</ImageView>
</LinearLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
0
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Bts7Activity">
<ImageView
android:src="@drawable/bo_7"
android:layout_width="match_parent"
android:layout_height="match_parent">
</ImageView>
</androidx.constraintlayout.widget.ConstraintLayout>
0
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Bts6Activity">
<ImageView
android:src="@drawable/bo_6"
android:layout_width="match_parent"
android:layout_height="match_parent">
</ImageView>
</androidx.constraintlayout.widget.ConstraintLayout>
0
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Bts5Activity">
<ImageView
android:src="@drawable/bo_5"
android:layout_width="match_parent"
android:layout_height="match_parent">
</ImageView>
</androidx.constraintlayout.widget.ConstraintLayout>
0
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Bts4Activity">
<ImageView
android:src="@drawable/bo_4"
android:layout_width="match_parent"
android:layout_height="match_parent">
</ImageView>
</androidx.constraintlayout.widget.ConstraintLayout>
0
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Bts3Activity">
<ImageView
android:src="@drawable/bo_3"
android:layout_width="match_parent"
android:layout_height="match_parent">
</ImageView>
</androidx.constraintlayout.widget.ConstraintLayout>
0
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Bts2Activity">
<ImageView
android:src="@drawable/bo_2"
android:layout_width="match_parent"
android:layout_height="match_parent">
</ImageView>
</androidx.constraintlayout.widget.ConstraintLayout>
0
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Bts1Activity">
<ImageView
android:src="@drawable/bo_1"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
0
package com.minu.bts
import android.content.Intent
import android.os.Bundle
import android.widget.ImageView
import android.widget.Toast
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
// 1. 화면이 클릭되었다는 것을 알아야 합니다! (프로그램이)
val image1 = findViewById<ImageView>(R.id.bo_image_1)
image1.setOnClickListener {
Toast.makeText(this, "1번 사진 클릭 완료", Toast.LENGTH_LONG).show()
// 2. 화면이 클릭되면, 다음 화면으로 넘어가서, 사진을 크게 보여줌!
val intent = Intent(this, Bts1Activity::class.java)
startActivity(intent)
}
//2번째 사진 띄우기
val image2 = findViewById<ImageView>(R.id.bo_image_2)
image2.setOnClickListener {
Toast.makeText(this, "2번 사진 클릭 완료", Toast.LENGTH_LONG).show()
val intent1 = Intent(this, Bts2Activity::class.java)
startActivity(intent1)
}
//3번째 사진 띄우기
val image3 = findViewById<ImageView>(R.id.bo_image_3)
image3.setOnClickListener {
Toast.makeText(this, "3번 사진 클릭 완료", Toast.LENGTH_LONG).show()
val intent2 = Intent(this, Bts3Activity::class.java)
startActivity(intent2)
}
//4번째 사진 띄우기
val image4 = findViewById<ImageView>(R.id.bo_image_4)
image4.setOnClickListener {
Toast.makeText(this, "4번 사진 클릭 완료", Toast.LENGTH_LONG).show()
val intent3 = Intent(this, Bts4Activity::class.java)
startActivity(intent3)
}
//5번 화면 띄우기
val image5 = findViewById<ImageView>(R.id.bo_image_5)
image5.setOnClickListener {
Toast.makeText(this, "5번 사진 클릭 완료", Toast.LENGTH_LONG).show()
val intent4 = Intent(this, Bts5Activity::class.java)
startActivity(intent4)
}
//6번 화면 띄우기
val image6 = findViewById<ImageView>(R.id.bo_image_6)
image6.setOnClickListener {
Toast.makeText(this, "6번 사진 클릭 완료", Toast.LENGTH_LONG).show()
val intent5 = Intent(this, Bts6Activity::class.java)
startActivity(intent5)
}
//7번 화면 띄우기
val image7 = findViewById<ImageView>(R.id.bo_image_7)
image7.setOnClickListener {
Toast.makeText(this, "7번 사진 클릭 완료", Toast.LENGTH_LONG).show()
val intent6 = Intent(this, Bts7Activity::class.java)
startActivity(intent6)
}
}
}
주사위앱 소개 및 레이아웃 설정 문제
0
79
2
안드로이드 에뮬레이터가 실행이 안 되요...ㅠ
0
133
2
30 강 소스 좀 올려 주십시요
0
94
2
onBackPressed 함수가 동영상 하고 다르게 동작합니다.
0
105
2
ListView 초기 실행 안됩니다.
0
108
2
코딩을 완료하고난후 앱 실행시 자동 종료
0
82
2
datavinding에서 오류가 납니다.
0
63
1
안드로이드 스튜디오 버전 차이로 초기 empyt activity 선택하면 안됩니다.
0
132
2
context의 구별에 대하여
0
81
2
"프롤로그에서 ..." 오류 관련해 직전 질문에 대한 추가 질문입니다.
0
78
2
"프롤로그에서 콘텐츠가 허용되지 않습니다." 오류
0
174
3
해결완료
1
198
2
databinding 설정후 run하면 에러(해결)
0
231
2
databinding 설정 이후 실행시 에러
0
287
4
안드로이드 입문하는 사람입니다.
0
76
1
Firebase uid
0
88
3
activity_main 화면 다름
0
125
2
강의화면과 다른데 맞게진행되는것인가요...????
0
115
2
파이어베이스 질문
0
82
2
ActivityMainBinding에 오류가 납니다
0
143
2
선생님 onBackPressed 작동이 안되는거 같습니다
0
126
2
>app>res>layout 이 존재하지 않습니다.
0
122
2
안드로이드 스튜디오 미어캣 버전 사용 한글 깨짐
0
775
2
안드로이드 스튜디오 오류 발생 시 대처 방법은 요?
0
304
2






