bokchi
@bokchi
Students
6,309
Reviews
413
Course Rating
4.8
2015๋ ์คํํธ์ ์ฐฝ์ ์ ๊ณ๊ธฐ๋ก ๋ค์ํ ๊ฐ๋ฐ ํ๋ก์ ํธ๋ฅผ ์งํํ์์ต๋๋ค.
ํ์ฌ๋ ํ๋ฒํ ์ง์ฅ์ธ ๊ฐ๋ฐ์์ ๋๋ค
Courses
Reviews
- [Intermediate] Friendly Introduction to JETPACK <Part 1> (Android Kotlin)
- [Beginner Level] Learn Android Kotlin by Building 8 Apps
- [Introductory] Kotlin Syntax for Android
- [Beginner Level] Learn Android Kotlin by Building 8 Apps
- [Beginner Level] Learn Android Kotlin by Building 8 Apps
Posts
Q&A
์๋๋ก์ด๋ ์๋ฎฌ๋ ์ดํฐ๊ฐ ์คํ์ด ์ ๋์...ใ
์๋ ํ์ธ์AI ์ธํด์ ๋ง์ฒ๋ผ ํ๊ฒฝ๋ณ์๋ฅผ ๋ค์ ์ค์ ํ๋ ๋ฐฉ๋ฒ์ด ์์ต๋๋ค๋ง๊ฐ์ฅ ์ฌ์ด ๋ฐฉ๋ฒ์ ๊ทธ๋ฅ ์ค์ ๊ธฐ๊ธฐ๋ฅผ ์ฐ๊ฒฐํด๋ฒ๋ฆฌ๋ฉด ๊ฐ์ฅ ์ฝ์ต๋๋ค.https://www.youtube.com/watch?v=MaY3bCkNTpMํน์ ์๋๋ก์ด๋ ๊ธฐ๊ธฐ๊ฐ ์๋ค๋ฉด ํด๋ณด์๊ฒ ์ด์?
- 0
- 2
- 83
Q&A
30 ๊ฐ ์์ค ์ข ์ฌ๋ ค ์ฃผ์ญ์์
package com.bokchi.goodwords import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.BaseAdapter import android.widget.TextView class ListViewAdpater(val List : MutableList) : BaseAdapter() { override fun getCount(): Int { return List.size } override fun getItem(position: Int): Any { return List[position] } override fun getItemId(position: Int): Long { return position.toLong() } override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View { var convertView = convertView if (convertView == null) { convertView = LayoutInflater.from(parent?.context).inflate(R.layout.listview_item, parent, false) } val listviewText = convertView?.findViewById(R.id.listViewTextArea) listviewText!!.text = List[position] return convertView!! } }package com.bokchi.goodwords import android.content.Intent import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.util.Log import androidx.databinding.DataBindingUtil import com.bokchi.goodwords.databinding.ActivityMainBinding class MainActivity : AppCompatActivity() { private lateinit var binding : ActivityMainBinding override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val sentenceList = mutableListOf() sentenceList.add("๊ฒ์ ํ๋ฉด์ ๋์ถฉ ํฐ๊ธ์จ ์ฐ๋ฉด ๋ช ์ธ๊ฐ๋ค.") sentenceList.add("์ฌ๋์๊ฒ ํ๋์ ์ ๊ณผ ๋ ๊ฐ์ ๊ท๊ฐ ์๋ ๊ฒ์ ๋งํ๊ธฐ๋ณด๋ค ๋ฃ๊ธฐ๋ฅผ ๋ ๋ฐฐ๋ก ํ๋ผ๋ ๋ป์ด๋ค.") sentenceList.add("๊ฒฐ์ ์ด ์๋ ์น๊ตฌ๋ฅผ ์ฌ๊ท๋ ค๊ณ ํ๋ค๋ฉด ํ์ ์น๊ตฌ๋ฅผ ๊ฐ์ง ์ ์์ ๊ฒ์ด๋ค.") sentenceList.add("์๊ธฐ ์์ด์๊ฒ ์ก์ฒด์ ๋ ธ๋์ ๊ฐ๋ฅด์น์ง ์๋ ๊ฒ์ ์ฝํ๊ณผ ๊ฐ๋๋ฅผ ๊ฐ๋ฅด์น๋ ๊ฒ๊ณผ ๋ง์ฐฌ๊ฐ์ง๋ค.") sentenceList.add("์น์๋ ๋์ ๋ฐ์ ๊ธธ์ ๋ง๋ค์ง๋ง ํจ์๋ ๋์ด ๋ น๊ธฐ๋ฅผ ๊ธฐ๋ค๋ฆฐ๋ค.") sentenceList.add("๋ ๊ฐ์ ํ์ด์ ๊ฐ์ง ๋ง๋ผ. ๋ ๋ฒ์งธ ํ์ด์ด ์๊ธฐ ๋๋ฌธ์ ์ฒซ ๋ฒ์งธ ํ์ด์ ์ง์คํ์ง ์๊ฒ ๋๋ค.") sentenceList.add("๊ทธ ์ฌ๋ ์ ์ฅ์ ์๊ธฐ ์ ๊น์ง ์ ๋ ๊ทธ ์ฌ๋์ ์ํ๊ฑฐ๋ ์ฑ ๋งํ์ง ๋ง๋ผ.") sentenceList.add("๋ฐ์ด๋ ๋ง์๊ฒ๋ ์ฑ์ฐ์ด ํ์ํ๋ค.") Log.e("MainActivity", sentenceList.random()) binding = DataBindingUtil.setContentView(this, R.layout.activity_main) binding.showAllSentenceBtn.setOnClickListener { val intent = Intent(this, SentenceActivity::class.java) startActivity(intent) } binding.goodWordTextArea.setText(sentenceList.random()) } }package com.bokchi.goodwords import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.widget.ListView class SentenceActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_sentence) val sentenceList = mutableListOf() sentenceList.add("๊ฒ์ ํ๋ฉด์ ๋์ถฉ ํฐ๊ธ์จ ์ฐ๋ฉด ๋ช ์ธ๊ฐ๋ค.") sentenceList.add("์ฌ๋์๊ฒ ํ๋์ ์ ๊ณผ ๋ ๊ฐ์ ๊ท๊ฐ ์๋ ๊ฒ์ ๋งํ๊ธฐ๋ณด๋ค ๋ฃ๊ธฐ๋ฅผ ๋ ๋ฐฐ๋ก ํ๋ผ๋ ๋ป์ด๋ค.") sentenceList.add("๊ฒฐ์ ์ด ์๋ ์น๊ตฌ๋ฅผ ์ฌ๊ท๋ ค๊ณ ํ๋ค๋ฉด ํ์ ์น๊ตฌ๋ฅผ ๊ฐ์ง ์ ์์ ๊ฒ์ด๋ค.") sentenceList.add("์๊ธฐ ์์ด์๊ฒ ์ก์ฒด์ ๋ ธ๋์ ๊ฐ๋ฅด์น์ง ์๋ ๊ฒ์ ์ฝํ๊ณผ ๊ฐ๋๋ฅผ ๊ฐ๋ฅด์น๋ ๊ฒ๊ณผ ๋ง์ฐฌ๊ฐ์ง๋ค.") sentenceList.add("์น์๋ ๋์ ๋ฐ์ ๊ธธ์ ๋ง๋ค์ง๋ง ํจ์๋ ๋์ด ๋ น๊ธฐ๋ฅผ ๊ธฐ๋ค๋ฆฐ๋ค.") sentenceList.add("๋ ๊ฐ์ ํ์ด์ ๊ฐ์ง ๋ง๋ผ. ๋ ๋ฒ์งธ ํ์ด์ด ์๊ธฐ ๋๋ฌธ์ ์ฒซ ๋ฒ์งธ ํ์ด์ ์ง์คํ์ง ์๊ฒ ๋๋ค.") sentenceList.add("๊ทธ ์ฌ๋ ์ ์ฅ์ ์๊ธฐ ์ ๊น์ง ์ ๋ ๊ทธ ์ฌ๋์ ์ํ๊ฑฐ๋ ์ฑ ๋งํ์ง ๋ง๋ผ.") sentenceList.add("๋ฐ์ด๋ ๋ง์๊ฒ๋ ์ฑ์ฐ์ด ํ์ํ๋ค.") val sentenceAdapter = ListViewAdpater(sentenceList) val listview = findViewById(R.id.sentenceListView) listview.adapter = sentenceAdapter } } ์๋ ํ์ธ์์ด๋ ๊ฒ ๋๋ฆฌ๋ฉด ๋ ๊น์?์ ์๋์๋ฉด ์ ์ฒด ์ฝ๋๋ฅผ ๊ตฌ๊ธ ๋๋ผ์ด๋ธ์ ์ฌ๋ฆฌ์ ํ ๊ณต์ ํด์ฃผ์ธ์~
- 0
- 2
- 72
Q&A
onBackPressed ํจ์๊ฐ ๋์์ ํ๊ณ ๋ค๋ฅด๊ฒ ๋์ํฉ๋๋ค.
์๋ ํ์ธ์์ฒจ๋ถ์ฃผ์ ์ฝ๋์onBackPressed๊ฐ ์๋๋ฐ ์ ๋ชป ์ฌ๋ ค์ฃผ์ ๊ฒ ์๋๊น ์ถ์ต๋๋ค.
- 0
- 2
- 79
Q&A
ListView ์ด๊ธฐ ์คํ ์๋ฉ๋๋ค.
์๋ ํ์ธ์ ์ฐ์ ์๊ฐ์ ๋ถํธ์ ๋๋ ค ์ฃ์กํฉ๋๋ค.์ต์ ๋ฒ์ ์ผ๋ก ๊ฐ์๋ฅผ ์ค๋นํ๊ณ ์๊ณ 1-2์ฃผ ๋ด๋ก ๊ณต๊ฐ ์์ ์ด๋, ์ ์๋ง ๊ธฐ๋ค๋ ค์ฃผ์๊ฒ ์ด์? ๊ทธ๋ฆฌ๊ณ ์ ์ฒด ํ๋ก์ ํธ๋ฅผ ์์ถํด์ ๊ตฌ๊ธ ๋๋ผ์ด๋ธ์ ์ฌ๋ ค์ฃผ์๋ฉด ์ ๊ฐ ๋ค์ด๋ฐ์์ ์คํํด๋ณด๊ฒ ์ต๋๋ค.
- 0
- 2
- 86
Q&A
dataBinding ์ ์ค๋ฅ
(์ฌ์ง)์ฌ๊ธฐ kotlin ๋ฒ์ ์ ๋ฐ๊พธ์๊ณ sync now๋ฅผ ๋๋ฌ๋ณด์๊ฒ ์ด์?
- 0
- 2
- 63
Q&A
์๋๋ก์ด๋ ์คํ๋์ค ๋ฒ์ ์ฐจ์ด๋ก ์ด๊ธฐ empyt activity ์ ํํ๋ฉด ์๋ฉ๋๋ค.
์๋ ํ์ธ์ ์ง์ ์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค3. [2024.05 ์ ๋ฐ์ดํธ](์์ด๋ณด ํ์์์ฒญ - 1) ์ต์ ์๋๋ก์ด๋ ์คํ๋์ค๋ก ์ฒ์ ํ๋ก์ ํธ๋ฅผ ๋ง๋ค ๋inflearn.com/courses/lecture?courseId=327096&unitId=157884ํด๋น ๋ถ๋ถ์ ๊ด๋ จ ๋ณด์ถฉ์ ๋ฃ์ด๋๊ธด ํ๋๋ฐ, ๋ง์ํ์ ๋๋ก ํผ๋์ด ์์ผ์ค ์๋ ์์ ๊ฒ ๊ฐ์ต๋๋ค1-2๊ฐ์ ์ด๋ด๋ก ์ ์ฒด ๊ฐ์ ๋ฆฌ๋ด์ผ์ ์งํํ๊ฒ ์ต๋๋ค!
- 0
- 2
- 89
Q&A
context์ ๊ตฌ๋ณ์ ๋ํ์ฌ
์๋ ํ์ธ์ํน์ ๊ฐ์ ์ค ์ด๋ค ์ผ์ด์ค๋ฅผ ๋ณด๊ณ ๋ง์์ฃผ์๋ ๊ฒ์ผ๊น์?๋ฒ์ฉ์ ์ธ ์ผ์ด์ค์์๋(์ฑ ์ ์ฒด ๋ผ์ดํ์ฌ์ดํด์์๋ applicationContext)๊ทธ๋ฅ activity์์๋ this, fragment์์๋ activity์ context๋ฅผ ๊ฐ์ ธ์ค๋ requireContextํํ๋ก ์ฌ์ฉํฉ๋๋ค. ์๋๋ก์ด๋ ๋ผ์ดํ ์ฌ์ดํด๊ณผ ๊ด๋ จ์ด ์๋๋ฐactivity๋ผ๋ ํ๋ฉดfragment๋ ํ๋ฉด ์์ ์์ ๋ถ๋ถapplication์ ์ฑ ์ ์ฒด ์ด๋ ๊ฒ ์๋ช ์ฃผ๊ธฐ๋ฅผ ๊ด๋ฆฌํ๊ณ ๊ฐ ์๋ช ์ฃผ๊ธฐ๋ณ ์ฐธ์กฐํ๋ context๊ฐ ๋ฌ๋ผ์ ์ฌ์ฉํ๋ ๊ฒ์ด๋ผ๊ณ ์๊ฐํ์๋ฉด ๋ ๊ฒ ๊ฐ์๋ฐ์ฌ์ค ์ด๋ฐ ๋ถ๋ถ์ ์กฐ๊ธ ๋ ๋ฉ๋ชจ๋ฆฌ๊ด๋ฆฌ๋ฅผ ์ ๊ฒฝ์ฐ๊ฒ ๋๋ ์๊ฐ๋ถํฐ ์ค์ํ ๊ฒ์ด๋ผ์ผ๋จ ์ง๊ธ ํ๋ฉด(activity)์ context๋ฅผ this๋ก ์ฐธ๊ณ ํ๊ณ ์ด ์์์๋ requireContext ํํ๋ก fragment์์ ์ฐธ๊ณ ํ๋ค ์ ๋๋ก ์ดํดํ์๋ฉด ๋ ๊ฒ ๊ฐ์ต๋๋ค๋ง, ํน์ ์ถฉ๋ถํ ๋ต๋ณ์ด ๋์ จ์๊น์? ์๋ฅผ ๋ค์ฌ n๋ฒ์งธ ๊ฐ์์์๋ ์ด๋ ๊ฒ ์ฌ์ฉํ๋๋ฐ k๋ฒ์งธ ๊ฐ์์์๋ ์ด๋ ๊ฒ ์ฌ์ฉํด์์ ๊ทธ๋ฐ๊ฒ์ธ์ง ๊ถ๊ธํ์ ์ง ๋ฌธ์์ฃผ์๋ฉด ํด๋น ๋ถ๋ถ ๋ต๋ณ๋๋ฆด ์ ์์ ๊ฒ ๊ฐ์ต๋๋ค!
- 0
- 2
- 60
Q&A
"ํ๋กค๋ก๊ทธ์์ ..." ์ค๋ฅ ๊ด๋ จํด ์ง์ ์ง๋ฌธ์ ๋ํ ์ถ๊ฐ ์ง๋ฌธ์ ๋๋ค.
์๋ ํ์ธ์์ง๋ฌธ์ AI์ธํด์ ๋ต๋ณ ์ฐธ๊ณ ํ์๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค.์ ๋ ์ฒ์์ ํ๋ ์๊ฐ์ ๋๋ค ๋ค๋ง, LinearLayout ์ ์ฐ๋ฉด์ ์กฐ๊ธ ๋ ๋ํ ์ผํ๊ณ ๋ณต์กํ UI๋ฅผ ๊ตฌ์ฑํ ๋ constraintLayout ์ด ๋ ์ ์ ํ๋ค๊ณ ๋๊ปด์ง ์๊ฐ์ด ๋ช๋ฒ ์์์ต๋๋ค. ๊ตฌํ์ ๋์ด๋์ ๋ฐ๋ผ ์ ํํ์๋ฉด ๋ ๊ฒ ๊ฐ์ต๋๋ค.
- 0
- 2
- 60
Q&A
"ํ๋กค๋ก๊ทธ์์ ์ฝํ ์ธ ๊ฐ ํ์ฉ๋์ง ์์ต๋๋ค." ์ค๋ฅ
ํ์ธํด๋ดค์ต๋๋ค.ConstraintLayout์์ ์ ์ฝ์กฐ๊ฑด(์ํ/์์ง) ๋ชจ๋ ์ ์ฝ์กฐ๊ฑด์ด ์์ด์ผํฉ๋๋ค android:layout_width="match_parent" android:layout_height="wrap_content" app:layout_constraintTop_toTopOf="parent" /> layout_constraintTop_toTopOf ์์ง ์กฐ๊ฑด์ด ์์ง๋ง ์ํ ๊ด๋ จ๋ ์กฐ๊ฑด์ด ์์ต๋๋ค.์๋์ ๊ฐ์ด ๋ณ๊ฒฝํด๋ณด์๊ฒ ์ด์?
- 0
- 3
- 134
Q&A
"ํ๋กค๋ก๊ทธ์์ ์ฝํ ์ธ ๊ฐ ํ์ฉ๋์ง ์์ต๋๋ค." ์ค๋ฅ
์๋ ํ์ธ์~Activity์ fragment๋ฅผ ํฌํจํ ๋ชจ๋ ์ฝ๋๋ฅผ ๊ณต์ ํด์ฃผ์๋ฉด ์ ๋ ์ดํด๋ณด๊ฒ ์ต๋๋ค!์์ถํ์ผ ํํ๋ก ๊ตฌ๊ธ ๋๋ผ์ด๋ธ๊ฐ์ ๊ณณ์ ์ ๋ก๋ ํ ๋ค์ด๋ฐ์ ์ ์๋ ๋งํฌ๋ฅผ ๊ณต์ ์ฃผ์ ๋ ๋๊ณ ์ฝ๋ ์ ์ฒด๋ฅผ ๋ณต์ฌ ๋ถ์ฌ๋ฃ๊ธฐ ํด์ฃผ์ ๋ ์ข์ต๋๋ค!
- 0
- 3
- 134





![Thumbnail image of the [Intermediate] Friendly Introduction to JETPACK <Part 1> (Android Kotlin)](https://cdn.inflearn.com/public/courses/328890/cover/f3412340-280b-42e6-aa53-3e43c79c4d0d/327096-eng.png?w=148)
![Thumbnail image of the [Beginner Level] Learn Android Kotlin by Building 8 Apps](https://cdn.inflearn.com/public/courses/327096/cover/fa1cbc3c-c0e8-4a3d-9f2a-1150b67f6457/327096-eng.png?w=148)
![Thumbnail image of the [Introductory] Kotlin Syntax for Android](https://cdn.inflearn.com/public/courses/328032/cover/b566fea7-2dce-49cf-bd5a-911e33af1f31/328032-eng.png?w=148)