본문 바로가기
[ios/tutorial] TabBar 기본 [ios/tutorial] TabBar 기본 Tab Bar https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/Bars.html -Tab bar 는 tab bar controller 안에 포함되어 있으며, custom view 들에 대한 display 를 담당한다. -Tab bar 는... 투명하다. 항상 화면 최하단에 위치한다. 한번에 5개 이상 표시하지 않는다. (폰에서) 만약 5개 이상의 아이템이 있다면 4개가 표시되고, More tab 을 두어 나머지 리스트를 표시해야 한다. 모든 orientation 에 대해 같은 높이를 유지한다. badge 를 표시할 수 있다. ( badge 는 빨간 .. 2017. 12. 5.
[ios] UIView 에 대한 이야기 [ios] UIView 에 대한 이야기 참조 : https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/ -UIView 는 다른 View 를 가질 수 있다. -보통 Subview 는 superView 의 bound 에 clip 되지 않지만 clipsToBounds property 를 사용하면 clip 시킬 수 있다. -view 의 geometry 는 frame, bounds, 그리고 center property 에 의해 결정된다.frame 은 superview 기준의 position 과 size 를 결정할 때 사용된다.center 는 size 변화 없이 position 변경할 때 사용된다.bounds 는 view.. 2017. 11. 10.
[android] Tinting drawables [android] Tinting drawables http://andraskindler.com/blog/2015/tinting_drawables/ -Tinting drawable 은 현재의 theme 에 맞춘 drawable 을 만들 때 유용하게 사용할 수 있다.apk size 도 줄일 수 있는 장점이 있다. -v4 support library 에 DrawableCompat 이라는 class 가 있다.이 녀석은 원래 LOS 이상에서 가능한 tinting (색깔 입히기, 물들이기) 기능을 활용할 수 있게 한다. 그러나 이 녀석은 아직도 wrap() 라는 함수를 통해 wrap 해주어야 하는 단점이 있다.그래서 TintedBitmapDrawable 을 구현해서 사용하는 것이 추천된다. -TintedBitmap.. 2017. 9. 15.
[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] Lollipop (LOS) 부터는 Notification Icon 에 색상을 넣을 수 없다? [android] Lollipop (LOS) 부터는 Notification Icon 에 색상을 넣을 수 없다? 출처 : https://developer.android.com/intl/ko/about/versions/android-5.0-changes.html#BehaviorNotifications #Lollipop ( Android 5.0 ) 부터는 Notification 의 Icon 의 Color 값을 전부 무시하며, Non-Alpha Channel 은 모두 White 로 바꾸어 버린다.즉, Alpha 가 있는 부분은 transparent 로, Alpha 가 없는 부분은 모두 흰색으로 표시한다. ( Material Design 의 영향 ) #만약 기존과 같이 색상이 있는 Notification Icon.. 2016. 2. 14.
[android] 일반적이지 않은 사진(이미지) 모양 만들기 #1 - 모서리가 둥근 사각형 일반적이지 않은 사진(이미지) 모양 만들기 #1 - 모서리가 둥근 사각형 출처 : http://blog.stylingandroid.com/archives/2656 2가지 이미지를 합성해, 사각형의 이미지를 다른 모양으로 바꿀 수 있다.이번에 알아볼 것은 모서리가 둥근 사각형을 이용하여, 사각형 이미지를 둥근 사각형 모양으로 masking 하는 것이다. public Bitmap combineImages(Bitmap bgd, Bitmap fg) { Bitmap bmp; int width = bgd.getWidth() > fg.getWidth() ? bgd.getWidth() : fg.getWidth(); int height = bgd.getHeight() > fg.getHeight() ? bgd.getHei.. 2015. 4. 11.
android:foreground 속성은 언제 쓰이는가? android:foreground 는 android:background 와 반대되는 개념이다. android:foreground 의 경우는 main contents 를 가리면 안 되기 때문에 보통 alpha 를 먹인 이미지나 색상 등을 사용하며,어떤 item 을 선택했을 때 background selector 와 같은 효과를 볼 수 있지만, 앞쪽(컨텐츠보다 z 축으로 우리 눈쪽에 가깝게)에서 press 된 상태를 보기 위해 보통 사용된다. 말인 즉슨, 만약 어떤 버튼을 클릭하는데, 그 버튼의 컨텐츠가 버튼의 거의 전부를 cover 하고 있다면,selector를 background 로 설정했을 때, 해당 버튼을 press 하면 해당 버튼이 눌렸는지 판단하기 어렵다.이 경우 selector 를 foregro.. 2014. 4. 14.
반응형