[앰플엔 히알루론샷 앰플 선 케어]
#코리아나 #앰플엔 #VC샷


여름에 맞춰 안그래도 선크림이 필요했던 찰나, 코리아나에서 뷰티테스터에 선정되어 선크림을 받게 되었습니다ㅎㅎ




테스터 선정되자마자 아주 빠르게 배송 되었습니다!



[제품정보]

앰플엔 

히알루론샷 앰플 선 케어 40ml

아이알에프 20 

SPF50+ PA++++


여기에 아이알에프 20 이라는 생소한 단어가 있었는데 마침 아래에 


+IRF란? Infrared radiation Reflectance Factor (적외선 반사율지수)의 약자로 태양열이 피부에 닿을 때 반사하여 차단하는 정도를 뜻합니다.


라고 친절하게 설명되어 있어서 이해가 되었습니다. 

이 제품은 아이알에프 20이므로 적외선 반사율 지수는 20%!


너무 적은 것 같아보이지만! 자외선 차단이아니고 적외선 반사율 지수이며, 둘은 별개로 동시에 차단 됩니다.



제가 딱 마침 양양으로 서핑을 하러 가게되어, 바닷물에 반사되는 자외선을 직빵으로 받을 수 있는 테스트 조건이 갖추어졌습니다.ㅎㅎㅎ 얼마나 피부로 느꼈는지 후기를 적어볼까 합니다.




수트를 착용하고 한컷!



그럼, 히알루론샷 앰플 선케어를 꺼내어 발라보도록 하겠습니다!



주우욱! 자외선 맞을 생각에 너무 듬뿍 발라버렸네요..ㅎㅎㅎ

남자는 손가락 마디에 바르고 마디별로 찍어서 얼굴에 바르면 좋다고 하네요! 꿀팁!!


바르는 느낌은 일반적으로 쓰던 선크림과는 달리 아주 부드럽게 로션? 바르는 느낌이었어요. 끈적한 느낌도 없어서 그런지 더 잘발렸던 것 같습니다. 왠지 폼클렌징 없이 물세안만 해도 될 것 같았습니다.


그리고 워터드롭 제형이라 그런지 확실히 촉촉했어요~ 



밖으로 나가보니 햇살이 따가운 날씨는 아니라 그나마 자외선이 덜한 날씨였습니다.


하지만 바람도 안불고 파도도 치지않는 날이라 보드위에 계속 누워있었네요 ... 서핑은 대 실패했지만 하루종일 바다에 가만히 떠있는 제 피부는 대성공 한 것 같네요ㅠㅠ


참고로 이 제품은 워터프루프가 아니기 때문에 물에 묻으면 쉽게 지워지는 것 같습니다.

그래서 덧 바르게 되면 아래와 같은 참사가 . . 일어납니다.



수분이 느껴지시나요...? 

이미 워터드롭 제형으로 수분이 만땅인 상태에서 물이 닿다보니 미끄러지고 발림성도 떨어지는 것 같습니다. 

그래도 건조한 피부에는 정말 정말 좋겠죠~? 


> 물놀이 때만 주의하셔서 다른 제품 사용하시면 좋을 것 같습니다!







서핑을 다녀오고 얼마 지나지않아 일본에 다녀오게 되었습니다.

아이스크림도 녹아내리는 무더운 더위인 7월 일본에 다시 제품을 사용해보았습니다.



일본이 덥고 습한 나라인데 끈적하지 않은 앰플 선케어를 바르고 외출하니까 찝찝함이 없어서 정말 좋았고

가지고 다니며 땀에 젖은 피부를 닦고 바르는데 처음 바르는 듯한 느낌이 좋았습니다 ㅎㅎ 아무리 생각해도 끈적이지 않는건 대박이에요!!


피부는 꼭 마른상태로!


    

마른 피부


땀에 젖은 피부



다가오는 무더위, 찝찝함으로 부터 벗어나고 싶으시다면 히알루론샷앰플 선케어로 자외선, 적외선도 차단하고 상쾌한 하루 보내시면 좋을 것 같습니다!




[Kotlin Logo]


안드로이드 뿐만 아니라 코드를 작성하다보면 보일러플레이트 코드가 생기기 마련이다.

예를들면 Java에서 Getter, Setter를 추가 한다던지, 안드로이드에서 findViewById를 사용한다던지..

반복되는 작업이지만 안할 수도 없는 것들이라 언제나 고민거리다. 하지만 나의 생각은 또 다른 누군가의 생각인 법!

이를 해결하기 위해 다양한 언어에서 다양한 방법이 나와있으니, 꼭 사용하여 반복되는 코드를 피할 수 있으면 피하는 것이 좋다.


안드로이드를 기준으로 Java에서는 Lombok과 ButterKnife의 어노테이션을 사용하여 위의 코드들을 제거할 수 있다.

코틀린에서는 data class와 kotlin android extensions(synthetic)를 사용하여 제거가 가능하다. (butterKnife -> kotterKnife도 있음)



이제 본론으로..예제

오늘은 코틀린에서 XML을 템플릿 처럼 사용하는 방법을 알아보려고 한다.

[toolbar의 title을 사용하지 않고 toolbar 내부에 textView를 넣어 textView의 값을 변경하는 예제]


1. toolbar.xml (템플릿처럼 사용 할 toolbar layout)

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/cardView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
card_view:cardCornerRadius="0dp"
card_view:cardElevation="4dp">

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:minHeight="?attr/actionBarSize"
app:contentInsetLeft="0dp"
app:contentInsetStart="0dp"
app:contentInsetRight="0dp"
app:contentInsetEnd="0dp" >

<TextView
android:id="@+id/toolbar_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="@string/toolbar_title"
android:textColor="@color/md_black_1000"
android:textSize="18sp"
android:textStyle="bold" />

</android.support.v7.widget.Toolbar>
</android.support.v7.widget.CardView>

2. MainActivity.kt

import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import kotlinx.android.synthetic.main.toolbar.*

class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)

toolbar_title.text = "제목이 들어갑니다."

}
}

3. activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<include
android:id="@+id/topView"
layout="@layout/toolbar" />

<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/topView">

</android.support.v7.widget.RecyclerView>
</RelativeLayout>


toolbar.xml을 만들어두고 사용할 화면에서 <include>를 해준 다음 Activity코드에서 toolbar.xml로 바로 접근이 가능하다.

toolbar의 설정을 변경하고 싶으면 toolbar.xxx , 내부에 textView를 변경하고 싶으면 toolbar_title.xxx 

물론 recyclerView도 바로 접근이 가능하여 recyclerView.xxx를 사용할 수 있다.

(일반적인 자바로 작성했었다면 findViewById ... toolbar ... recyclerView....... 이제 findViewById는 잊어도 된다.)


이와 비슷한 방법으로 Button을 만들어두고 Style을 지정하여 xml로 만들어두면 반복잡업 뿐만 아니라 다양한 어플리케이션에서도 활용할 수 있으니 얼마나 편한가!

또한 이러한 작업을 해두면 똑같은 버튼이라도 1px, 1dp가 다른 버튼이 생겨 전체의 틀이 망가지는 일을 없어 더욱 더 깔끔한 앱이 나올 것이다.


Issue


Pageable로 받아오는 데이터가  대부분이었는데. 클래스를 하나 작성하여 재사용하기 위해 Generics를 사용하던 중 다음과 같은 이슈가 발생하였다.

Kotlin에서 Generics (<*>, <Any>)를 사용했을 때 Gson으로 변환하여 클래스에 매핑하려고 하면 'com.google.gson.internal.LinkedTreeMap' 이슈가 발생한다.

(Java에서는 <?>를 사용했을 때 동일한 이슈가 발생함)



Solution


in Kotlin

val type = object : TypeToken<List<클래스>>() {}.type
val className = Gson().fromJson<List<클래스>>(json... , type)





자바에서도 처음에는 타입토큰을 이용하여 변환을 하였다가 Collections를 이용했었는데

코틀린에서도 더 간소화하여 사용하는 방법을 생각해봐야겠다.

[Issue] "Unable to create Debug Bridge"


Dev&Prog/Android

Written by 블럭 on 2016. 4. 1. 19:06

Issue


Android Studio 2.1 Preview 4~5 를 설치 직후 다음과 같은 이슈가 발생하였다. 


Unable to create Debug Bridge: Unable to start adb server: Unable to obtain result of 'adb version'



Solution


1. 터미널에 접속하여 안드로이드가 설치 된 폴더 ( sdk - platform-tools )로 이동한다.

2. adb tcpip 5555를 입력한다. 

3. 안드로이드 스튜디오를 재시작한다. 

4. 정상적으로 작동된다.


참고한 주소 : http://stackoverflow.com/questions/33557845/android-studio-show-the-dialog-unable-to-create-debug-bridge-unable-to-start



아래 목록 중 한가지라도 해당이 된다면 이 포스팅의 내용이 해결책이 될 수 있음.

1. Fatal Signal 6 (SIGABRT) 
2. 
android INVOKE_INTERFACE || instr_code == Instruction::INVOKE_INTERFACE_RANGE Unexpected call into interface trampoline: invoke-virtual
3. ART Runtime ArrayIndexOutOfBoundsException
4. Retrofit을 사용중인 경우.

.........

이번 오류는 Retrofit과 gradle version으로 인한 것으로, Retrofit interface를 사용하여 rest통신을 실행할 때 예외가 발생하였다.
주 된 오류는 다음과 같다.

A/art: art/runtime/thread.cc:1344] Throwing new exception 'length=248; index=1273' with unexpected pending exception: java.lang.ArrayIndexOutOfBoundsException: length=248; index=1273

Check failed: count_ == 0 (count_=-1, 0=0) Attempted to destroy barrier with non zero count
A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 21705

위와 같은 오류가 발생한다면 다음의 사항을 의심해보아도 좋다.


1. Retrofit을 사용중이거나 최근에 버전을 업데이트 하였음.
2. Android Project Level의 Build.gradle 내용 중 com.android.tools.build:gradle:x.x.x 의 버전을 수정하였다.

해결책

from classpath 'com.android.tools.build:gradle:2.0.0-alpha8' to classpath 'com.android.tools.build:gradle:2.0.0-alpha3' // 2.0.0-alpha3 이하 버전으로 수정.


단말기 자급제, 20% 요금할인 IMEI 확인은 어떻게?

단말기 자급제로 인해 요금을 20%할인 받을 수 있게 되었습니다.

http://단말기자급제.한국   << 여기에 접속하셔서 조회하시면 되는데

IMEI (단말기 식별번호)가 필요합니다.


IMEI 번호 확인 방법

일부 안드로이드 단말기에서 IMEI 번호가 15자리로 표시되지 않는 경우가 있습니다. 

이는 설정 - 휴대폰 정보에서 확인이 가능하며 대부분의 단말기에서는 다이얼 창에서 *#06# 을 누르시면 팝업창에서 확인 가능합니다.

14자리로 표기 된다면 다른 방법을 이용하세요! 


또한 단통법이 시행 되기 이전에 개통하고 2년이 지난 단말기와 지원금을 받지 않고 개통한 단말기에 한해 (24개월 지나면 할인 가능) 요금 할인이 가능합니다.


Android Studio 2.0 Preview !


카테고리 없음

Written by 블럭 on 2015. 11. 26. 11:58

Android Studio 2.0 Preview.

Start by downloading and installing Android Studio 2.0 from the Canary Channel. 

Added Instant-Run

Check this website,  https://sites.google.com/a/android.com/tools/tech-docs/instant-run


The dress which color White & Gold or Blue & Black.


controversial dress. 현재 논란이 많은 이 드레스. 원래 색은 파란, 검정이 맞다. 미국 온오프라인 매장에서 벌써 매진이 된 상품

여러명을 대상으로 실험해본 결과 하얀색보다는 파란색(보랏빛)으로 보는 사람이 많다. 

과학적으로 분석한 글 


Usually that system works just fine. This image, though, hits some kind of perceptual boundary. That might be because of how people are wired. Human beings evolved to see in daylight, but daylight changes color. That chromatic axis varies from the pinkish red of dawn, up through the blue-white of noontime, and then back down to reddish twilight. “What’s happening here is your visual system is looking at this thing, and you’re trying to discount the chromatic bias of the daylight axis,” says Bevil Conway, a neuroscientist who studies color and vision at Wellesley College. “So people either discount the blue side, in which case they end up seeing white and gold, or discount the gold side, in which case they end up with blue and black.” (Conway sees blue and orange, somehow.)


출처 http://www.wired.com/2015/02/science-one-agrees-color-dress/









안드로이드를 개발하면서 많이 보게되는 deprecated.. 이전버전에서 지원하였지만 문제나 최신 API로 인하여 더 이상은 필요가 없는 경우에 이클립스에서 Notification 이런식으로 취소선을 쫙 그어준다.

이번에 처음으로 제대로 된 어플을 제작하는데 출시 마무리단계에서 좀 더 완벽해지고 싶은 마음에 눈에 거슬리는 노란색 느낌표들 모두를 제거하기 위해 deprecated를 제거해보았다.

이번 포스팅의 목표는 안드로이드 알림창인 Notification Class의 메소드인  Notification(icon, message, when)을 변경해보는 것이다.

기존 소스 코드
...(Context context, String message){
int icon = R.drawable.logo; 
long when = System.currentTimeMillis();
NotificationManager notificationManager =(NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
Notification notification = new Notification(icon, message, when);
Intent nIntent = new Intent(context, MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
PendingIntent pIntent = PendingIntent.getActivity(context, 0, nIntent, 0);
notification.setLatestEventInfo(context, title, message, pIntent);
notification.flags |= Notification.FLAG_AUTO_CANCEL;
notificationManager.notify(1234, notification);      
}


수정 소스 코드
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
Notification notification = new NotificationCompat.Builder(getApplicationContext())
.setContentTitle("제목")
.setContentText("내용")
.setSmallIcon(R.drawable.ic_angle)
.setTicker("상태바제목")
.setAutoCancel(true)
.build();
notificationManager.notify(1234, notification);

두 코드의 메소드가 있고 없고 차이는 상관없음. ( 알림 하나 만들어두려면 수정 코드 처럼 정의해두고 Push처럼 Message를 전송하려면 메소드 정의해서 호출 후 notify하는 식으로 ...)

기존 코드에서는 Notification을 생성하며 정의 된 icon, message, when을 넣은 반면,
수정 코드에서는 Notification Builder를 이용하여 필요한 설정을 넣어주는 식이다.딱 봐도 훨씬 간결하고 수정하기 쉬워 보인다.


참조 
Notification - http://developer.android.com/reference/android/app/Notification.html
Intent - http://developer.android.com/reference/android/content/Intent.html
Context http://developer.android.com/reference/android/content/Context.html


학교 시간표 모듈을 제작하면서 중복되는 시간을 제거해주는 버튼을 만들었는데
for문을 사용해서 탐색하는 시간이 너무 오래 걸렸다.

어디선가 보았는데 자바스크립트를 사용하면서 걸리는 최대시간이 0.1초여야 한다고 한다.
생각해보니 JSON으로 파싱하여 데이터 받아오고 실시간으로 검색어 뿌려주는데 본래의 빠르게 데이터를
주고 받으려는 목적을 벗어난거 같아서 DOM 구조를 이용하기로 했다.

jQuery의 find()를 이용하면 DOM Tree 를 따라 특정 값을 모두 검색하여 출력이 가능하다.

변경 전

for(i=0;i<splitTime.length;i++){ // 자른 문자배열의 길이만큼
    for(j=0;j<$("table input").length;j++){ // 인풋의 갯수만큼
    }

변경 후

for(i=0;i<splitTime.length;i++){ // 자른 문자배열의 길이만큼
    $("table").find("input[value="+splitTime[i]+"]").~  // table의 input중 splitTime[i]의 값을 모두 찾는다.
}

변경 후 속도가 월등하게 개선 되었음

(등록 된 시간표의 시간 갯수) * (인풋의 갯수 * 등록 가능한 시간표) -> (등록 된 시간표의 시간 갯수)