본문 바로가기

white

[Android] Toolbar 화살표가 검은색으로 변할 때 혹시 Toolbar 화살표를 잘 사용하다가 Android SDK 나 Android Studio를 업데이트 한 이후로갑자기 검은색으로 변하는 현상이 발생 한다면 아래와 같이 해보세요. build.gradleAdd following lines to your build gradleGradle 2.0 (I did not tested):android { defaultConfig { vectorDrawables.useSupportLibrary = true } } Gradle 1.5 (I'm using this.. it works):android { defaultConfig { generatedDensities = [] } aaptOptions { additionalParameters "--no-version-vec.. 더보기
[Android] Notification icon Lollipop 이후 Notification Icon을 좀 다른 형태로 바꿔야 한다. 이전에는 대부분 App icon을 그대로 사용하여서 뿌렸었지만,Lollipop 부터는 배경색을 지정하고 가운데에 특정 icon만 넣을 수 있습니다.FloatingActionButton 이랑 똑같다고 보면 될듯 하네요. 아래 내용을 참고 하세요. For instance:Notification notification = new Notification.Builder(context) .setAutoCancel(true) .setContentTitle("My notification") .setContentText("Look, white in Lollipop, else color!") .setSmallIcon(getNotifica.. 더보기
[Android] 강제적으로 Toolbar arrow 변경 Toolbar arrow가 AppbarLayout에 포함 되지 않거나 단독으로 쓰고자 할 경우,검은색으로 고정되어 버리는 경우가 있다. 이럴 경우, 강제적으로 arrow를 바꿔줄 수 있는데 아래 소스 같이 하면 된다.if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) getSupportActionBar().setHomeAsUpIndicator(getResources().getDrawable(R.drawable.abc_ic_ab_back_mtrl_am_alpha, null)); else getSupportActionBar().setHomeAsUpIndicator(getResources().getDrawable(R.drawable.abc_ic_ab_bac.. 더보기