Color Palette

2014. 10. 23. 18:10·Android Development
반응형

1.     Color palette 관련 (google-io-2014-master.zip)

http://office.pantech.com:80/ohd/pm/disk/linkdown.html?reginfo=20141023150923975360

 

DetailActivity.java 중 부분 발췌

private void colorize(Bitmap photo) {

    Palette palette;

    palette = Palette.generate(photo);

    applyPalette(palette);

}

private void applyPalette(Palette palette) {

    getWindow().setBackgroundDrawable(new ColorDrawable(palette.getDarkMutedColor().getRgb()));

 

    TextView titleView = (TextView) findViewById(R.id.title);

    titleView.setTextColor(palette.getVibrantColor().getRgb());

 

    TextView descriptionView = (TextView) findViewById(R.id.description);

    descriptionView.setTextColor(palette.getLightVibrantColor().getRgb());

 

    colorRipple(R.id.info, palette.getDarkMutedColor().getRgb(),

        palette.getDarkVibrantColor().getRgb());

    colorRipple(R.id.star, palette.getMutedColor().getRgb(),

        palette.getVibrantColor().getRgb());

 

    View infoView = findViewById(R.id.information_container);

    infoView.setBackgroundColor(palette.getLightMutedColor().getRgb());

 

    AnimatedPathView star = (AnimatedPathView) findViewById(R.id.star_container);

    star.setFillColor(palette.getVibrantColor().getRgb());

    star.setStrokeColor(palette.getLightVibrantColor().getRgb());

}

2.     Vector animation 관련

AnimatedVectorDrawable

http://developer.android.com/intl/ko/reference/android/graphics/drawable/AnimatedVectorDrawable.html#AnimatedVectorDrawable()

 

아래 페이지도 같이 참고하시면 될 것 같습니다.

Defining Custom Animations

http://developer.android.com/intl/ko/training/material/animations.html

저작자표시 비영리 변경금지 (새창열림)

'Android Development' 카테고리의 다른 글

모바일 UI 디자인 가이드 라인 모음  (0) 2016.10.28
java.lang.incompatibleclasschangeerror android.support.v4.content.contextcompat  (0) 2016.09.23
Activity 방향 고정하기  (0) 2014.10.01
SQLiteOpenHelper Singleton instance creating.  (0) 2013.07.04
ndk-stack 으로 so 파일 debugging 하기  (0) 2013.05.13
'Android Development' 카테고리의 다른 글
  • 모바일 UI 디자인 가이드 라인 모음
  • java.lang.incompatibleclasschangeerror android.support.v4.content.contextcompat
  • Activity 방향 고정하기
  • SQLiteOpenHelper Singleton instance creating.
fogthegreat
fogthegreat
아주 오랫동안 이것 저것 개발하면서 배우고 찾아 본 것들을 적거나 모았습니다. 불편한 점이 있다면 알려주세요. (과거에 불펌한 글들을 모두 제거하고 있는 중이에요. 🙏)
  • fogthegreat
    꿈소년의 개발 이야기
    fogthegreat
  • 전체
    오늘
    어제
    • 전체보기 (242)
      • Software Engineering (56)
      • Android Development (78)
      • 일상다반사 (63)
      • 책에 대한 거의 모든 것 (11)
      • 영어공부 (1)
      • ETC (0)
      • 챌린지 (1)
      • Do it 스터디! (32)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

    • 향로
    • 청하가 제안하는 소프트웨어 엔지니어로써 재미있게 사는 …
    • WhoRU? Story...♡
    • Snapshot
    • 두잇! - 이지스퍼블리싱
    • 제이펍의 참 똑똑한 2비트 책 이야기
    • Inpa Dev
  • 공지사항

  • 인기 글

  • 태그

    gradle
    코틀린
    html
    안드로이드
    노개북
    JavaScript
    탐지기법
    개발
    하버드
    kotlin
    build.gradle
    hcj
    ActiveX
    js
    구글
    google
    안드로이드 개발
    linux
    Android 4.1
    css
    리눅스
    OOM
    Android
    java
    Eclipse
    안철수
    자바
    git
    C++
    보안
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.6
fogthegreat
Color Palette
상단으로

티스토리툴바