문제 상속받기 위해 아래와 같이 코드를 작성해보자.class BaseResponse { var rstCode:Int = 0 }class TestResponse : BaseResponse() { } TestResponse Class 가 BaseResponse Class 를 상속받게 되어있다.그러나 이대로 실행하게 되면 아래와 같은 에러메세지를 만날 수 있다. This type is final, So it cannot be inherited from.. 왜 ? Kotlin 에서는 기본적으로 모든 Class 가 final 이다.따라서 상속하여 재정의 하려면, 상속을 허용하는 open 키워드를 붙여주어야 한다. 해결 아래와 같이 BaseResponse Class 에 open 키워드를 삽입해준다. open cla..
android { compileSdkVersion 24 buildToolsVersion '25.0.0' defaultConfig { .... setProperty("archivesBaseName", "test-$versionName") } signingConfigs { ... } buildTypes { ... } ... } setProperty("archivesBaseName", "test-$versionName") 요롷게 하면 app-debug.apk 대신.. test-(versionName)-debug.apk 파일이 생성된다. ( 2018.05.17. 추가 ) TimeStamp 찍는 법 import java.text.DateFormat import java.text.SimpleDateFormat an..
2018/04/30 - [Computer/Android&iOS] - ( Android ) Kotlin - 1. 시작하기2018/05/02 - [Computer/Android&iOS] - ( Android ) Kotlin - 2. View 에 대해 알아보기2018/05/04 - [Computer/Android&iOS] - ( Android ) Kotlin - 3. implement (구현) 받기 함수 선언 fun addAB(a:Int, b:Int):Int{ return a + b } fun 함수명(변수명:변수타입...):리턴타입 {...} 반복문 -- JAVAArrayList arrayList = new ArrayList(); for (String s : arrayList) { Log.d("TAG", "s..
2018/04/30 - [Computer/Android&iOS] - ( Android ) Kotlin - 1. 시작하기2018/05/02 - [Computer/Android&iOS] - ( Android ) Kotlin - 2. View 에 대해 알아보기 상속 (extend) Kotlin 의 상속은 아래와 같았다.class MainActivity : AppCompatActivity() { ... } 구현 (implement) implement 는 아래와 같이 상속뒤에 콤마 (,) 로 구현한다.class MainActivity : AppCompatActivity() , View.OnClickListener { ... } 몸체 구현 implement 를 받게 되면 당연히, 메소드를 override 하라는 경..
2018/04/30 - [Computer/Android&iOS] - ( Android ) Kotlin - 1. 시작하기 뷰의 Visibility 관리 아래와 같이 관리할 수 있다.if(txv_hello.visibility == View.GONE) txv_hello.visibility = View.VISIBLE else if(txv_hello.visibility == View.VISIBLE) txv_hello.visibility = View.GONE 뷰의 Background Color 변경txv_hello.setBackgroundColor(Color.parseColor("#ff0000")) 코틀린의 setBackgroundColor 함수에 진입해보면 아래와 같이 JAVA 코드를 볼 수 있다./** * Se..
- Total
- Today
- Yesterday
- Kotlin
- Phaser
- 리눅스
- linux
- php
- IOS
- Swift
- 노드
- mysql
- nodejs
- git hub
- 앵커브리핑
- 안드로이드
- 서버
- xcode
- C언어
- 점유율
- 손석희
- CentOS
- 스위프트
- Node
- node.js
- Asterisk
- 깃헙
- 배열
- BBC 가쉽
- 뉴스룸
- Android
- C
- GIT
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |