본문 바로가기

position

[Android] RecyclerView 에서 Scroll 정보 형태 intcomputeHorizontalScrollExtent()Compute the horizontal extent of the horizontal scrollbar's thumb within the horizontal range.intcomputeHorizontalScrollOffset()Compute the horizontal offset of the horizontal scrollbar's thumb within the horizontal range.intcomputeHorizontalScrollRange()Compute the horizontal range that the horizontal scrollbar represents.intcomputeVerticalScrollExtent()Compute.. 더보기
[Android] RecyclerView last position listener https://guides.codepath.com/android/Endless-Scrolling-with-AdapterViews-and-RecyclerView 위 URL을 가보시면 ListView와 GridView 그리고 RecyclerView에서 Last Position을 알아보는 소스가 공유 되어 있습니다. 아래 2016년 1월 버전보다 업데이트가 된 내용이라 공유 해드립니다.(참고로 이전 버전은 ScrollListener를 초기화 하는데 문제가 있었습니다.) 아래 소스는 RecyclerView에 적용 할 수 있는 소스 입니다. public abstract class EndlessRecyclerViewScrollListener extends RecyclerView.OnScrollListener { /.. 더보기
[Android Opengl es 2.0 ] 여러 Object를 한 번에 그리기. 코딩을 하는 도중... 만약에 1000개 이상의 Object들을 한꺼번에 그릴 려고 할 때, For문으로 1000개를 돌려야 할까요???? 개발 요구사항에 따라 다르겠지만, 만약 전체적인 회전이나 컬러 알파 정도는 수정할 수 있는 방법이 있었습니다. 바로!!! 1000개의 Object의 Vertex를 지정하고, 한번에 그리는 것입니다.!!! ( 제가 초보라서.. 이제 알게됨..^^;) Vertex와 Index 배열을 잘 이용하면 쉽게 그릴 수 있습니다. 먼저 테스트 해본 배열은 private final float[] mVerticesData = { // X, Y, Z, U, V,alpha,colorR,colorG,colorB,colorA 0.0f, 0.5f, 0, 1.0f, 0.0f,1.0f,0.0f,0.. 더보기