본문 바로가기
[android] ListView scroll 할 때 Toolbar 감추기 [android] ListView scroll 할 때 Toolbar 감추기 https://mzgreen.github.io/2015/06/23/How-to-hideshow-Toolbar-when-list-is-scrolling%28part3%29 -Design Support Library 의 CoordinatorLayout 과 Behavior 를 사용하여 쉽게 구현 가능하다. -Design Support Library 를 사용하기 위해 dependencies 에 compile 을 추가해 넣어야 한다. compile 'com.android.support:appcompat-v7:22.2.0'compile 'com.android.support:recyclerview-v7:22.2.0'compile 'com.an.. 2017. 8. 5.
[android] design support library [android] design support library https://android-developers.googleblog.com/2015/05/android-design-support-library.html -android design support library 를 통해서 navigation drawer view, floating labels for editing text, floating action button, snackbar, tabs, motion & scroll framework 등을 2.1 이상 버전에서 사용 가능하다. -gradle 에 아래를 추가하자! compile 'com.android.support:design:22.2.0' 이 녀석은 Support v4 와 AppCompat .. 2017. 8. 4.
[android] RecyclerView 에 대한 맛보기 이야기 [android] RecyclerView 에 대한 맛보기 이야기 참조 : https://www.bignerdranch.com/blog/recyclerview-part-1-fundamentals-for-listview-experts/ -RecyclerView 는 ListView 에 대비하여 다음과 같은 일들을 하지 않는다. 1. List Item 들을 화면에 배치하지 않는다. -> LayoutManager 가 이 일을 맡아서 한다.2. View 들의 animation 을 관장하지 않는다. -> ItemAnimator 가 이 일을 맡아서 한다.3. Scrolling 외의 touch event 를 관장하지 않는다. -RecyclerView 는 가급적 listview 본연의 일에만 집중하고 view, anima.. 2016. 9. 23.
[iOS Study] 터치 이벤트와 UIResponder [iOS Study] 터치 이벤트와 UIResponder 출처 : 아론 힐리가스의 iOS 프로그래밍 -UIView 는 UIResponder 의 하위 클래스로서 각각 다른 터치 이벤트를 처리할 네 개의 메소드를 재정의할 수 있다. - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event; -화면을 .. 2016. 2. 24.
android - drag and drop sort ( reordering ) listview android - drag and drop sort ( reordering ) listview 안드로이드를 사용하다 보면, 가끔씩 drag and drop 을 통해 reordering 을 하는 list view 를 사용하는 앱들을 볼 수 있었다. 혹 기본 컴퍼넌트인데 내가 사용 안 하고 있었던가 하고 찾아봤는데, 기본 component 는 아닐 뿐더러 open source 로 나와있는 녀석의 소스를 대충 훑어봐도 간단하게 구현되어 있지는 않았다. drag and drop sort 를 구현하기 위해서는 onInterceptTouchEvent 는 물론 onTouchEvent 들을 override 해서 touch event 를 다뤄야 하고, 상황에 맞는 action 을 하면서 list 를 꼬이지 않게 해야 하.. 2014. 5. 31.
[android] Long Press ( Long Click ) 직접 구현하기 안드로이드 Long Press (Long Click) 직접구현하기 안드로이드를 사용하다 보면 가끔 view 끼리의 focus 나 touch event 문제 등에 봉착하여Long Press ( Long Click ) 을 직접 구현해야 할 때가 있다.그래서 한번 구현해보았다. public class LongPressChecker {public interface OnLongPressListener{public void onLongPressed();} private Handler mHandler = new Handler();private LongPressCheckRunnable mLongPressCheckRunnable = new LongPressCheckRunnable();private int mLongPre.. 2013. 7. 7.
반응형