본문 바로가기

Touch

[Android] Viewpager swipe disable ViewPager에 Touch로 인한 Page 이동을 막고자 할 때 아래와 같이 Custom한 ViewPager를 사용 하세요. package com.namuon.ringq.widget.viewpager; import android.content.Context; import android.support.v4.view.MotionEventCompat; import android.support.v4.view.ViewPager; import android.util.AttributeSet; import android.view.MotionEvent; public class SwipeViewPager extends ViewPager { private boolean enabled; public SwipeViewPag.. 더보기
[Android] RatingBar touch disable RatingBar를 그냥 사용하게 되면, 기본적으로 사용자가 터치시 Rating이 변경되어 버린다. Rating을 변경 시키지 않고 유지할려면 아래와 같이 XML에 한줄만 추가해주면 된다. isIndicator를 true로 해주면 이 Rating은 그냥 보여주기 용으로 사용하겠다는 의미이다. 참고하세요. 더보기
[Android] Material Design Ripple Animation Material Design을 진행 하는동안에 Android 에서 기본적으로 Click Animation을 지원해주는 View가 있는 반면에,그렇게 되지 않는 View 일 경우 해당 Animation을 만들어야만 합니다.이때 사용할만한 좋은 Library가 있어서 공유하고자 합니다. https://github.com/traex/RippleEffect 아래와 같이 표현하고자 하는 View나 Layout을 감싸주기만 하면 됩니다.IntegrationThe lib is available on Maven Central, you can find it with Gradle, pleasedependencies { compile 'com.github.traex.rippleeffect:library:1.3' } Usag.. 더보기