본문 바로가기
[Kotlin] 장점, 단점, 그리고 아쉬운 점 이야기 [Kotlin] 장점, 단점, 그리고 아쉬운 점 이야기 https://medium.com/keepsafe-engineering/lessons-from-converting-an-app-to-100-kotlin-68984a05dcb6https://medium.com/keepsafe-engineering/kotlin-the-good-the-bad-and-the-ugly-bf5f09b87e6f -위 링크의 글을 쓴 필자는 마켓에 출시된 Java 로 되어 있는 앱을 Kotlin 으로 전환했다.많은 사람들이 Kotlin lib 때문에 dex method limit 이 걸릴 것을 걱정하지만,실제 converting 후 proguard 적용시 method count 는 10% 줄어들고, code line 은 30% 줄.. 2018. 1. 15.
[Kotlin Tutorial] 클래스, objects, 그리고 인터페이스 #1 - Chap4. Classes, objects, and interfaces [Kotlin Tutorial] 클래스, objects, 그리고 인터페이스 #1 - Chap4. Classes, objects, and interfaces 참조 : Kotlin in Action 4.1. Defining class hierarchies 4.1.1. Interface in Kotlin -Kotlin 의 interface 는 Java8 과 비슷하다.abstract method 를 가질수도 있고, Java8의 default method 도 가질 수 있다. ( Java8 과는 다르게 default keyword 는 필요없다 )단, state 는 여전히 가질 수 없다. ( 실제 variable ) -Kotlin 에서 interface 정의는 아래와 같다.interface Clickable{ fun.. 2017. 8. 11.
[Effecitve Objective-C] #4 전처리기 #define 보다는 타입이 있는 상수를 사용하라 [Effecitve Objective-C] #4 전처리기 #define 보다는 타입이 있는 상수를 사용하라 출처 : Effective Objective-C -#define 은 전처리기 지시어이다. (preprocessor) -#define 정의는 타입에 대한 정보가 없다. -#define 이 헤더 파일에 선언되어 있다면 그 헤더 파일을 포함하는 모든 곳에서 #define 으로 정의한 상수값을 치환한다. -preprocessor 보다는 상수를 정의하는 것이 항상 더 좋은 방법이다. // implementation static const NSTimeInterval kAnimatinoDuration = 0.3; @implementation @end -상수의 일반적인 표기법은 k 소문자를 상수 맨 앞에 붙이는 .. 2017. 7. 24.
[android] how to apply actionBarStyle and android:actionBarStyle both? android, how to apply actionBarStyle and android:actionBarStyle both? android developer reference 문서를 보면,actionbar 에 custom style 을 적용하면서 compatibility 이슈를 동시에 해결하려면android:actionBarStyle 과 actionBarStyle 을 동시에 적용할 것을 설명해준다. 하지만, Eclipse 에서 실제로 적용해보면 인식할 수 없다는 xml error 가 발생한다. 이는 다음과 같이 해결할 수 있다. 1. tools 라는 name space 를 정의해준다. xmlns:tools="http://schemas.android.com/tools" 2. android:actionBar.. 2014. 3. 5.
[android] ActionBar Compat 사용하기. android, ActionBar Compat 사용하기. ActionBar Compat 사용하기. 1. v7 이상의 support library 준비하기 2. Project 로 로드하여 library 로 설정 3. Activity theme 을 @style/Theme.AppCompat 으로 변경. 4. menu.xml 의 name space 변경해주기. ( actionbar 만의 feature를 사용할 경우 ) ... 5. Activity 가 ActionBarActivity 를 상속하도록 함. 6. getSupportedActionBar() 를 통해 actionbar 를 control 할 수 있고, 나머지는 같음. actionbar, actionbaractivity, actionbarcompat, act.. 2013. 11. 26.
반응형