안드로이드 5.0 롤리팝이 업데이트 된 후, 여러가지 변화가 생겼습니다. 특히 이전까지는 리스트형태를 만들기 위해 사용했던 리스트뷰를 사용하고, 그리드 형태를 만들기 위해 사용했던 그리드뷰를 사용하였습니다. 이렇게 사용한 뷰들은 뷰 내의 아이템들을 동적으로 사용할 수 없다는 점에서 많이 불편했습니다.
한동안 바쁜 일이 많다보니 새로운 글을 포스팅한다 하고 못하고 있었네요. 그동안 포스팅하려 계획했던 것 중 하나인 RadioButton 관련된 것입니다.
RadioButton과 Checkbox를 혼동하여 사용하는 경우가 종종 있는데, RadioButton은 다수의 그룹에서 하나의 아이템만 택할 때 사용하고 CheckBox는 다수의 그룹에서 복수의 아이템을 택할 때 사용합니다. 이 점을 유의하여 알맞는 곳에 선택하여…
앱을 이용하거나 만들다 보면 가장 처음에 로고가 뜨는 화면을 보거나 필요할 때가 있습니다. 이 액티비티를 스플래시 액티비티라 합니다. 이번 포스팅은 저번 포스팅인 인텐트를 활용한 부분이 되겠네요.
이번 포스팅에서 만들 예제는 스플래시 액티비티에서 2초 정도 멈춰 있다 메인 액티비티로 넘어가는 것입니다.
대부분의 안드로이드 앱들은 여러 액티비티로 나눠져 많은 양의 정보를 적절한 액티비티에 나누어 보여줍니다. 이 때 한 액티비티에서 뷰들에 액션을 취해 다른 액티비티로 전환을 하게 되는 경우가 많습니다. 이 때 사용되는 것이 Intent 입니다.
Intent란, 액티비티 등의 전환이 일어날 때 호출이나 메시지를 전달하는 매개체입니다. 한마디로 이사를 갈 때 이삿짐 센터 차량과 같다고 생각하면 편할 것 같네요.
네비게이션 드로어는 쉽게 설명하자면 평소에는 숨어있다가 슬라이드나 버튼을 눌렀을 때 왼쪽이나 오른쪽(주로 왼쪽)에서 서랍처럼 등장하는 뷰입니다.
안드로이드 앱 중 좌우로 슬라이드하여 사용하는 액티비티가 있는 앱들이 있습니다. 이런 앱들에 사용되는 것들이 ViewFlipper나 ViewPager를 사용합니다. ViewFlipper의 경우 하나의 레이아웃에 뷰들이 많이 들어가게 되면 성능이 저하되는 점이 있어서 ViewPager를 많이 이용합니다. 따라서 ViewPager에 대해 알아보도록 하겠습니다.
안드로이드 어플을 쓰다보면 같은 형태의 뷰들이 나열되어 있는 리스트 구조가 많이 있습니다. 이번 포스팅엔 리스트구조를 만드는 ListView에 대해 소개하려 하는데, 리스트뷰를 만드는 코드 중 일반적으로 어느 내용이 들어가든 사용할 수 있는 커스텀 리스트뷰에 대해 설명하려합니다. 텍스트만 들어가는 리스트를 만들 경우도 있지만 복합적인 아이템이 들어간 리스트를 만드는 경우가 많고, 텍스트만 들어간 경우에도 사용이 가능하므로 커스텀 리스트뷰에 대해 소개하겠습니다.
이번 포스팅에는 안드로이드 앱에서 텍스트를 입력하고 출력하는 간단한 방법에 대해 소개하려 합니다. 이번에 쓰일 뷰는 텍스트를 입력받을 EditText와 입력받을 텍스트를 출력할 TextView, EditText에서 TextView로 텍스트를 넘겨주는 이벤트를 처리할 Button이 있습니다. 완성한 앱은 아래와 같습니다. 이번 포스팅에는 SDK버전을 21로 사용하여 원래(킷캣이나 그 이하버전) 안드로이드 ui와는 다른 ui로 나오게…
오랫만에 글을 시작하기 전에 구차한 변명을 조금 하고 시작하겠습니다. 그 동안 기말고사에 공모전 마무리 등 여러 일로 인해 바빠서 포스팅을 못했습니다. 앞으론 꾸준히 하도록 하겠습니다.(꾸벅)
저번 포스팅에 안드로이드에서 쓰이는 레이아웃과 뷰들에 대해 언급을 하였습니다. 이번 포스팅에는 그런 레이아웃과 뷰들을 액티비티 안에 원하는 위치에 배치하는 방법에 대해 배워보도록 하겠습니다.
이번 포스팅은 안드로이드 개발에서 기초가 되는 부분을 다뤄볼까 합니다. Activity와 Layout, View에 관련된 포스팅으로 기본적인 구조를 짜는데 필요한 부분이라 생각이 됩니다.
Actvitiy에 대해 저번 포스팅에 잠깐 다뤘지만 이번엔 조금 더 자세히 다루겠습니다.안드로이드 디바이스는 컴퓨터의 모니터보다 많이 작은 편으로 한 화면에…