본문 바로가기
[android] list view 의 아이템 하나씩 나타나는 animation 효과 주기 [android] list view 의 아이템 하나씩 나타나는 animation 효과 주기 http://frogermcs.github.io/Instagram-with-Material-Design-concept-part-2-Comments-transition/ -// view 는 list의 itemViewview.setTranslationY(100); // 원래 등장하는 위치보다 조금 더 내려주고..view.setAlpha(0.f); // visibility 를 꺼준 후..view.animate() .translationY(0) .alpha(1.f) .setStartDelay(delayEnterAnimation ? 20 * (position) : 0) // position 마다 시간차를 조금 주고.. .s.. 2017. 7. 11.
[android] click 위치로부터 화면(Activity) 전개하는 animation 넣기 [android] click 위치로부터 화면(Activity) 전개하는 animation 넣기 http://frogermcs.github.io/Instagram-with-Material-Design-concept-part-2-Comments-transition/ -y 값을 새로 open 되는 Activity 에 전달한다. -Activity 의 theme 에 background transparent 를 넣고, root view 를 scaleY 로 0.1f 정도 놓는다. -onCreate() 단계에서 scaleY 를 1.f, pivotY 를 전달받은 값, duration 을 200 정도로 설정한 animation 을 root view 에 주면 된다. activity, Android, animation, ba.. 2017. 7. 10.
[android] Material Support Library [android] Material Support Library http://code.hootsuite.com/tips-and-tricks-for-android-material-support-libraryhttps://android-developers.googleblog.com/2014/10/material-design-on-android-checklist.html -material support lib 을 사용하기 위해서는 build.gradle 에 dependency 를 추가해주어야 한다. dependencies { compile 'com.android.support:appcompat-v7:21.0.+'} -App theme 도 바꿔주자. -Activity 도 ActionBarActivity 를 상속받.. 2017. 7. 8.
[android] AbstractAccountAuthenticator 에 대해 알아보자. [android] AbstractAccountAuthenticator 에 대해 알아보자. http://developer.android.com/reference/android/accounts/AbstractAccountAuthenticator.html - 계정을 생성하기 위해서는 AbstractAccountAuthenticator 를 구현한 녀석을 가지고 있어야 한다. 또한 android.accounts.AccountAuthenticator action 을 처리하는 Service 도 구현해야 한다. 해당 service 에서는 Authenticator 의 getIBinder() 를 수행한 녀석을 IBinder 로 return 해주어야 한다. - AuthenticationService 는 다음과 같은 inte.. 2017. 7. 6.
[android] sign key hash key (sha) print out [android] sign key hash key (sha) print out https://developers.facebook.com/docs/android/getting-started try {PackageInfo info = getPackageManager().getPackageInfo("com.example", PackageManager.GET_SIGNATURES); for (Signature signature : info.signatures) { MessageDigest md = MessageDigest.getInstance("SHA"); md.update(signature.toByteArray()); Log.e("ck", "MMM" + Base64.encodeToString(md.digest(.. 2017. 6. 7.
[android] VectorDrawable 에 대한 이야기 [android] VectorDrawable 에 대한 이야기 https://blog.stylingandroid.com/vectordrawables-part-1/ -LOS 부터 등장한 녀석으로 SVG 형식으로 xml 을 정의하여 drawable 로 사용할 수 있다. -V 1.4. 이전에서는 android studio 에서는 preview 를 제대로 그리지 못하는 이슈가 있지만, 이후버전에서는 수정됨. -VectorDrawable 을 사용하면 각 해상도에 필요한 res 를 넣어주지 않아도 되서 app size 가 많이 절약된다. -drawable/android.xml 위의 코드는 이 녀석을 그린다. -vector 로 animation 을 하려면 animated-vector 를 정의하여 assign 해줘야 한.. 2017. 6. 2.
[android] xml 의  tool 을 사용하자 [android] xml 의 tool 을 사용하자 https://medium.com/sebs-top-tips/tools-of-the-trade-part-1-f3c1c73de898https://developer.android.com/studio/write/tool-attributes.html -xmlns:tools="http://schemas.android.com/tools" aapt 는 tools: attribute 를 ignore 한다.그래서 실제 apk 에는 들어가지 않는다. - 위와 같이 tools: 를 사용하면 실제 xml 에서 pre draw 할 때는 tools:text 가 android:text 처럼 작동하지만,apk 는 들어가지 않는다. aapt( android asset packaging .. 2017. 5. 30.
[android] LOS visibility change & ripple animation glitch (잔상문제) [android] LOS visibility change & ripple animation glitch (잔상문제) LOS 이상에서 버튼 클릭을 하면 기본적으로 ripple animation 이 발생한다.Animation 도중 visibility 를 gone 으로 만들었다가 나중에 visible 로 다시 만들면,gone 당시 진행중이던 ripple 이 남아있게 되서 visible 이 되는 순간 남아있던 ripple effect 가 보이게 되어 ugly 하다. 이것을 해결하려면..아래의 함수를 통해 해결할 수 있다!! ViewCompat.jumpDrawablesToCurrentState( View ); // examplemyButtonContainer.setVisibility(View.VISIBLE);Vi.. 2017. 5. 29.
[android] CircularRevealEffect Basic Simple Example [android] Circular Reveal Effect Basic Simple Example - API Level 21 에 등장! ( 5.0, MOS ) - Animator animator = ViewAnimationUtils.createCircularReveal( shape, // animation target view shape.getWidth(), // circle center x 0, // circle center y 0, // circle start radius (float) Math.hypot(shape.getWidth(), shape.getHeight())); // circle end radiusanimator.setInterpolator(new AccelerateDecelerateInt.. 2017. 5. 24.
반응형