분류 전체보기 썸네일형 리스트형 [Android][Git] commit failed with error bad signature commit failed with error bad signature ... 위와 같은 오류가 뜬 경우는 Git에 Index가 꼬였을 때 발생 합니다. 이럴 경우 Git을 reset 해야 합니다. 1. 윈도우 cmd 창을 연다.2. Android Studio Project 폴더로 이동 한다.3. 아래 명령어를 차례대로 입력하세요. cd .gitdel index ( 리눅스는 rm -rf index )cd .."c:\Program Files (x86)\Git\bin\git.exe" reset (또는 git 실행 파일을 Path 지정 하세요) 명령어가 완료 되고 나면 Android Studio에서 git 동작이 정상적으로 이뤄질껍니다. 참고하세요. 더보기 [Android] View Background를 Rounded corner 형태로 반영 RecyclerView나 ListView와 같은 여러 View가 묶어서 표현해야 하는 View에서 Corner 부분만 라운드를 시키고자 할때,가장 쉽게 생각할 수 있는 부분이 Background에 Rounded된 이미지를 넣는 것으로 어느정도 해결이 된다. 하지만, 이 외에도 한가지 더 좋은 방법이 있다.Rounded Corner 형태의 Drawable을 xml로 그리는 것이다.그게 아래 소스이다. 위 속성에서 corners 라는 값을 가지고 Corner에 Rounding 정도를 체크 할 수 있다. ## 위 형태로도 문제없이 동작이 가능 하면 좋지만, RecyclerView 나 ListView 등에서 row에 있는 View가 튀어 나오는 경우가 있습니다. 그럴 경우 아래와 같이 clip 을 한번 해줘보세.. 더보기 [Android] Background animation에 쓸만한 TransitionDrawable 혹시 RadioButton 이나 Switch 관련된 View를 사용하고자 할 경우, 한번 고려해보면 나쁘지 않을 것이다.그냥 xml로 정의 해서 background에 넣는 방법이 있고, 직접 코드에 넣을 수도 있다. 1. xml로 정의 res/drawable 폴더안에 btn_transition_drawable.xml 라는 xml 파일을 만들어 놓고, 아래 소스대로 코딩 합니다. 그 다음, 사용하고자 하는 View background에 위 xml로 설정 합니다.이로써 설정은 끝났습니다.이제 TransitionDrawable에 Animation을 동작하게 하는 코드만 넣어주면 됩니다.코드는 아래와 같습니다.// set background animation Drawable drawable = findViewB.. 더보기 [Android] getDrawable, getColor deprecated Resource로 Drawable이나 Color를 얻어오면 어떤 함수를 써야 할지 고민이 됩니다.그냥 아래 소스를 API로 만들어 놓은 후 호출하면 간편 합니다. public int getColor(Context context, int id) { final int version = Build.VERSION.SDK_INT; if (version >= Build.VERSION_CODES.M) { return context.getColor(id); } else { return context.getResources().getColor(id); } } public Drawable getDrawable(Context context, int id) { final int version = Build.VERSION.SD.. 더보기 [Android] Material Design Ripple Animation Material Design을 진행 하는동안에 Android 에서 기본적으로 Click Animation을 지원해주는 View가 있는 반면에,그렇게 되지 않는 View 일 경우 해당 Animation을 만들어야만 합니다.이때 사용할만한 좋은 Library가 있어서 공유하고자 합니다. https://github.com/traex/RippleEffect 아래와 같이 표현하고자 하는 View나 Layout을 감싸주기만 하면 됩니다.IntegrationThe lib is available on Maven Central, you can find it with Gradle, pleasedependencies { compile 'com.github.traex.rippleeffect:library:1.3' } Usag.. 더보기 [Android] Font Library 디폴트 폰트를 바꾸기에 좋은 Library가 있어 공유하고자 합니다. https://github.com/tsengvn/typekit 1. main/assets 폴더 를 만든 후, 해당 폴더에 ttf나 otf 같은 폰트 파일을 복사 합니다. Typekit is a library that help you quick change default font of your android application. You don't need to add any custom view or tag to your current xml layout file. You make a quick config in your application class and change the font that you need specific for.. 더보기 [Android] NavigationView 커스텀화 NavigationView를 커스텀화 하기에 좋은 설명이 있어서 공유하고자 글을 씁니다. itemBackground, itemIconTint and itemTextColor are simple xml-attributes that can be set, though you have to use a custom prefix instead of the android: one.Example So if you wan't to customize the color of the text (e.g. pink when unchecked and teal when checked) you should use a ColorStateList.ExampleCreate a new *.xml file in /res/color - let'.. 더보기 [Android] TextView에 HTML 코드를 넣을 때 TextView에 HTML 태그를 넣을 수 있습니다. 아래와 같은 태그들을 사용 되는 되요. http://commonsware.com/blog/Android/2010/05/26/html-tags-supported-by-textview.html간편하게 아래 소스 형태로 TextView에 넣으시면 문제 없이 태그가 적용이 되는 것을 확인 할 수 있습니다.SpannableString spanText = new SpannableString(Html.fromHtml(htmlText)); 하지만!!span 태그를 이용하여 Color를 넣고자 할 경우가 있습니다.이럴 경우에는 아래와 같이 font 태그로 replace 시켜 주세요. String htmlText = txt.replace("span style=\"col.. 더보기 이전 1 ··· 28 29 30 31 32 33 34 ··· 72 다음