์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 |
- JavaScript
- ๊ฐ์ดํ ์ข ๋ญ๊ฐ๋น
- ํ์ด์ฌ
- ์ค๋ธ์
- ์ ๋ฆฌํธ๋ฆฌํธ
- ๋๊ฐ
- ๋ฐฐ์์ ๋ฐฐ์
- ์๋ฐ
- ๊น๋ฏธ๊ฒฝ์๋งํ์์
- Python
- ์นํผ๋ธ๋ฆฌ์ฑ
- ์ํ์ฃผ
- ์ํ
- ์ค๋ผํด
- ๊ฐ๋ฐ
- Java
- ๋ ์
- ์ฝ๋ฉ
- ํฐ์คํ ๋ฆฌ์ฑ๋ฆฐ์ง
- ํ๋ก๊ทธ๋๋ฐ
- ์๋ฐ์คํฌ๋ฆฝํธ
- ํ์ฒ์ ๋ฆฌํธ๋ฆฌํธ
- html
- ์นดํ๋๊ฐ
- ์ฑ
- database
- ๋ฐ์ํ
- K๋ฐฐํฐ๋ฆฌ๋ ๋ณผ๋ฃจ์
- ๋ฐ์ดํฐ๋ฒ ์ด์ค
- css
- Today
- Total
๋ชฉ๋ก๋ถ๋ฅ ์ ์ฒด๋ณด๊ธฐ (233)
JiYoung Dev ๐ฅ
์ ์ฅํ๋ ค๋ ํค-๊ฐ ์ปฌ๋ ์ ์ด ๋น๊ต์ ์์ ๊ฒฝ์ฐ SharedPreferences API๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค. SharedPreferences ๊ฐ์ฒด๋ ํค-๊ฐ ์์ด ํฌํจ๋ ํ์ผ์ ๊ฐ๋ฆฌํค๋ฉฐ ํค-๊ฐ ์์ ์ฝ๊ณ ์ธ ์ ์๋ ๊ฐ๋จํ ๋ฉ์๋๋ฅผ ์ ๊ณตํฉ๋๋ค. ๊ฐ SharedPreferences ํ์ผ์ ํ๋ ์์ํฌ์์ ๊ด๋ฆฌํ๋ฉฐ ๋น๊ณต๊ฐ์ด๊ฑฐ๋ ๊ณต์ ์ผ ์ ์์ต๋๋ค. SharedPreferences ์์ฑ //url๊ฐ ์ ์ฅํ๊ธฐ (SharedPreference -> ๋ด๋ถ ๋ฉ๋ชจ๋ฆฌ์ ์ ์ฅ -> ๋ชจ๋ fragment์์ ์ฌ์ฉ๊ฐ๋ฅ) // - editor ์ฌ์ฉ // ์๋ ๋ก๊ทธ์ธ์ ํ์ฉ ๊ฐ๋ฅ!! (์ดํ์ ๊บผ๋ ๊ณ์ ์ ์ฅ๋จ) val spf = requireActivity().getSharedPreferences("mySPF",Context.MODE..
Handler ์ฌ์ฉ package com.sjy.fragment import android.content.Intent import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.os.Handler class IntroActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_intro) val handler = Handler() //postDelayed(๋ญํ ๊ฑด์ง(action), ๋๋ ์ด์๊ฐ(ms)..

ํฐํธ ๋ค์ด๋ก๋ ํ font ๋ฆฌ์์ค ํด๋ ๋ง๋ค์ด์ ์ ์ฅ font resource file ์์ฑ(.xml) ์์ฑ๋ช : font family

ํ๋๊ทธ๋จผํธ(Fragment) https://developer.android.com/guide/components/fragments?hl=ko ํ๋๊ทธ๋จผํธ | Android ๊ฐ๋ฐ์ | Android Developers A Fragment represents a behavior or a portion of user interface in an Activity. You can combine multiple fragments in a single activity to build a multi-pane UI and reuse a fragment in multiple activities. You can think of a fragment as a modular section developer.android.com ํ..

MainActivity package com.sjy.pokemon import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.util.Log import android.widget.Toast import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.RecyclerView import com.android.volley.Request import com.android.volley.RequestQueue import com.android.volley.toolbox.StringRequest import com.a..

๋ฐ๋ณต๋๋ ๋ ์ด์ด ์คํฌ๋กค ArrayList → ๋ฐ์ดํฐ์ ์๋์ ์ ์ ์์ ๋ ์ฌ์ฉ ๋ฐฐ์ด → ๋ฐฐ์ด์ ํฌ๊ธฐ๊ฐ ๊ณ ์ ๋์ด ์์ ๋ (๋ฐ์ดํฐ์ ์๋์ด ์ ํด์ ธ ์์ ๋) ๋ฌด์กฐ๊ฑด ArrayList๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ด ์ข์ ๊ฒ์ ์๋! RecyclerView ์๋ฆฌ RecyclerView๋ ํ๋ฉด ํฌ๊ธฐ์์ ์ข๋ ์ฌ์ ์๊ฒ ๋ณต์ฌ ํ ์คํฌ๋กค์ ์ฌ๋ฆฌ๋ฉด view๋ฅผ ์ฌํ์ฉ → view๋ฅผ ์ฌํ์ฉํ๊ณ ๋ฐ์ดํฐ๋ง ์ ๋ฐ์ดํธํ๊ธฐ ๋๋ฌธ์ ์๋๊ฐ ๋น ๋ฆ ListView๋ ๋ฐ์ดํฐ๊ฐ 100๊ฐ๋ฉด ํ ํ๋ฆฟ๋ 100๊ฐ → ๋ฐ์ดํฐ๊ฐ ๋ง์์ง์๋ก ๋ถ๋ฌ์ค๋ ์๋๊ฐ ๋๋ ค์ง Recycler View๋ ์๋๋ก์ด๋ ์ฑ์์ ๋ฆฌ์คํธ์ ๊ทธ๋ฆฌ๋์ ๊ฐ์ ๋๋์ ๋ฐ์ดํฐ๋ฅผ ํจ์จ์ ์ผ๋ก ํ์ํ๊ณ ๊ด๋ฆฌํ๊ธฐ ์ํ ๋ทฐ(View) ๊ทธ๋ฃน์ ๋๋ค. ๊ธฐ์กด ListView์ ๋ฌธ์ ์ ์ ๊ฐ์ ํ๊ณ ์ฑ๋ฅ์ ํฅ์์ํค..
controller : ๋ทฐ๋ฐํ restcontroller : ๋ฐ์ดํฐ ๋ฐํ Application.java ์์น ๊ธฐ์ค ํ์์ ์๋ ๊ฒ๋ค๋ง ๊ฐ์ฒด ์์ฑ ๋ชจ๋ ์ปจํธ๋กค๋ฌ, ์๋น์ค ๋ฑ์ ๋ชจ๋ boot package ํ์์ ์กด์ฌํ ์ ์๋๋ก ๋ง๋ค์ด์ผ ํจ spring์์ ์ฌ์ฉํ๋ class => ์ด๋ ธํ ์ด์ @์ ๋ถ์ฌ์ผํจ. ์ด๋ค ๊ธฐ๋ฅ์ ํ๋์ง JPA object์ ๊ด๊ณํ ํ ์ด๋ธ ๋งคํ jpa ์ฌ์ฉ์ ์ฃผ์์ - ์์ฒด์ ์ผ๋ก ๊ฐ๊ฐ์ ๊ฐ๋ค์ ๊ตฌ๋ถํ ์ ์๋ (ex.sequence)๋ฅผ ์์ฑํ์ฌ ์ด ์์ด๋ฅผ primary ํค๋ก ์ฌ์ฉ ์ญ์จ object-json ์ฝ๊ฒ ๋ณํ ๊ฐ๋ฅํ๋๋ก ๋์์ฃผ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ Stringํํ์ json์ java Object๋ก ๋ณํํ๊ธฐ ์ํด ์ฌ์ฉ ๋ฐํ์ ์๋ฌ ์ฒ๋ฆฌ 1. throw : ์ฝ๋๊ฐ ๊น๋ํ๋ค 2. try-..

enabled ๋ฒํผ ํ์ฑํ : true ๋ฒํผ ๋นํ์ฑํ : false visibility gone : ์์ ์ฌ๋ผ์ ธ ๋ฒ๋ฆผ invision : ์๋ฆฌ๋ ํ๋ณด. ํฌ๋ช ๋๋ง ๋ถ์ฌํ ๊ฒ

ArrayList : ๋ช๊ฐ์ VO๊ฐ ์๋์ง ๋ชจ๋ฅด๊ธฐ ๋๋ฌธ์ ์ฌ์ฉ ArrayList๋ ์๋ฐ์์ ์ฌ์ฉํ๋ ๊ฐ์ฒด๋ก ํต์ ์ฉ ๊ตฌ์กฐ๊ฐ ์๋ ํต์ ์ ์ฌ์ฉํ๋ ์๋ฃํ : ํ(Queue) ArrayList๋ java์ ๊ฐ์ฒด ํต์ ์ ์ํด ๊ฐ์ฒด๋ฅผ ํ๋ก ๋ณํํด์ผ ํจ ArrayList๋ฅผ ์ ์ก์ฉ์ผ๋ก ๋ณํํด์ค์ผ ํจ → jsonArray json์ String ํ์ JSON ํค-๊ฐ ์์ผ๋ก ์ด๋ฃจ์ด์ง ๋ฐ์ดํฐ ์ค๋ธ์ ํธ๋ฅผ ์ ๋ฌํ๊ธฐ ์ํด ์ธ๊ฐ์ด ์ฝ์ ์ ์๋ ํ ์คํธ๋ฅผ ์ฌ์ฉํ๋ ๊ฐ๋ฐฉํ ํ์ค ํฌ๋งท GSON ArrayList๋ฅผ JSONArray๋ก ๋ณํ์์ผ์ฃผ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ

ํ์๊ฐ์ , ๋ก๊ทธ์ธ ์ค์ต github ์ฐธ์กฐ node, android code https://github.com/sin6338ki/Nodejs/tree/master/Ex13Android https://github.com/sin6338ki/android/tree/main/AndServer object : ๊ตฌํ์ฒด๋ฅผ 1ํ์ฑ์ผ๋ก ์ฌ์ฉํ๊ณ ์ถ์ ๋ ์ฌ์ฉ //object: -> ๋ฌด๋ช ๊ฐ์ฒด๋ฅผ ์์ฑํ๋ ํค์๋ // StringRequest๋ฅผ ๊ตฌํํ๋ ๊ฐ์ฒด๋ฅผ ์์ฑํ๊ฒ ๋ค! // ์ผ๋ฐ์ ์ผ๋ก๋ ์ธํฐํ์ด์ค์์๋ ๊ฐ์ฒด ์์ฑ ๋ถ๊ฐ -> ๊ตฌํ์ ์ํ ํด๋์ค๋ฅผ ๋ง๋ค์ด์ ๊ฐ์ฒด๋ฅผ ์์ฑํจ // ๊ทธ๋ฐ๋ฐ Bํ์ ์ ๊ฐ์ฒด๋ฅผ ํ๋๋ง ์ฐ๊ณ ์ถ์ ๋ ํด๋์ค๋ฅผ ๋ง๋ค๊ธฐ์๋ ๋นํจ์จ์ ์ // ์ด๋ object ์ฌ์ฉ > ํ๋ฒ๋ง ์ธ ๊ฐ์ฒด๋ฅผ ๊ตฌํํ ๋ ์ฌ์ฉ! val r..