일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- java
- permission
- ViewGroup
- Anko SQLite
- android
- LinearLayout
- react
- RecyclerView
- props
- Retrofit2
- 안드로이드
- http
- Eclipse
- block scope
- RelativeLayout
- view
- ReactDOM
- Git
- javascript
- function scope
- ConstraintLayout
- cardview
- intent
- Anro Coroutines
- .kt
- Kotlin
- linux
- component
- vim
- layout
- Today
- Total
목록안드로이드 (7)
이것저것 다 개발
OpenWeatherMap을 이용한 날씨 APP을 만들어보겠습니다.사용한 라이브러리는 Http 통신을 위해 Retrofit2을 사용하였습니다.먼저 OpenWeatherMap에 회원가입을 하고 API 호출을 위한 Key가 필요합니다. https://openweathermap.org/ Key를 얻었다면 안드로이드 프로젝트를 만들고 AndroidManifest.xml에 Internet Permission을 주겠습니다.다음으로 Retrofit2를 Dependency로 추가하겠습니다.compile 'com.squareup.retrofit2:retrofit:2.4.0' compile 'com.squareup.retrofit2:converter-gson:2.4.0'http://yongyi1587.tistory.com..
Android Studio 의 AVD에서 커스텀 스킨을 입힌 Device를 추가하는 방법입니다.AVD는 Android Virtual Device를 뜻하며 Android 휴대폰을 가지고 있지 않아도가상의 Android Device를 만들어 빌드&디버깅을 할 수 있습니다. 예제로 갤럭시 S7을 추가해보겠습니다. 1. 새로 만들 Device의 스킨을 다운받고 Device의 하드웨어 프로필을 확인합니다.Samsung Developer 에서 Skin 다운로드http://developer.samsung.com/technical-doc/view.do?v=T000000287 2. 받은 zip파일의 압축을 풀어줍니다.3. Android Studio 를 실행하여 메뉴의 Tools - Android - AVD Manager..
Fragment에서 Activity의 method를 사용하는 법입니다.간단한 예제로 설명하겠습니다. MainActivity.javapublic class MainActivity extends AppCompatActivity {...private Button btn;...public void testMethod() {Log.d("MainActivity", "Test Method 입니다..");}...}TestFragment.javapublic class TestFragment extends Fragment {...((MainActivity) getActivity()).testMethod();...}MainActivity의 public method를 사용할 수 있습니다. ((MainActivity) getA..
인텐트(Intent)란?? 액티비티를 포함한 각종 컴포넌트를 동작시키기 위한 매개체 입니다.Intent intent = new Intent(this, BActivity.class);startActivity(intent);위의 간단한 코드처럼 화면을 이동할때도 쓰이지만Intent intent = new Intent(this, BActivity.class);intent.putExtra("key", value);startActivity(intent);이처럼 Activity간 데이터를 전달하는 역할도 합니다. 이때 한가지 의문점으로 AActivity와 BActivity가 실행되면서 각각의 프로세스로 2개가 실행되는데서로 다른 프로세스는 서로의 메모리를 절대 참조할 수 없습니다.하지만 Kernel Space(커널..
RecyclerView + CardView 사용법입니다. RecyclerView는 ListView 보다 더욱 향상되고 유연해진 View 입니다.RecyclerView는 위와 같은 구조로 되어있습니다. 먼저 프로젝트를 생성해줍니다. Alt + Ctrl + Shift + s 를 누르게 되면 아래와 같이 Project Structure 화면이 뜹니다. recyclerview 를 선택한 후 OK 버튼을 누릅니다.마찬가지로 CardView도 추가해줍니다.위와 같이 build.gradle 파일에 dependencies가 추가 됩니다. (CardView 추가된게 빠졌네요..) 프로젝트의 전체적인 구조는 MainActivity, RvAdapter, activity_main.xml, list_item.xml 입니다. M..
ViewGroup의 편의성, 성능, 유연성에 대한 글 입니다. LinearLayout 편의성 ★★★★★성능 ★★☆☆☆유연성 ★★★★☆ RelativeLayout편의성 ★★★☆☆성능 ★★★★☆유연성 ★★★★☆ AbsoluteLayout편의성 ☆☆☆☆☆성능 ★★★★★유연성 ☆☆☆☆☆ FrameLayout 평가불가 GridLayout편의성 ★★☆☆☆성능 ★★★★☆유연성 ★★☆☆☆ TableLayout편의성 ★★☆☆☆성능 ★☆☆☆☆유연성 ★★★☆☆ 개인적으로 LinearLayout, RelativeLayout 을 많이 사용하고 다른 개발자 분들도 마찬가지 일거라고 생각합니다. 직접 사용해보니 처음 접할때는 LinearLayout이 View를 배치하기엔 편리하고 이해하기 쉬웠습니다. 하지만 점점 복잡한 화면을 구..