Skip to content

View/List #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 56 commits into
base: next
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
62c2ee6
Add component to .gitignore file
snowflake-1117 Jul 22, 2017
8d1c82b
Convert Animation1 Java file into Kotiln file
snowflake-1117 Jul 22, 2017
42805f0
Use android:inputType instead of android:password
snowflake-1117 Jul 22, 2017
bda3d38
Convert Animation2 Java file into Kotlin file
snowflake-1117 Jul 22, 2017
e18c428
Convert Animation3 Java file into Kotiln file
snowflake-1117 Jul 22, 2017
7354a7e
Remove unnecessary variable declaration using let
snowflake-1117 Jul 22, 2017
f1a413d
Move variables declaration location for readability
snowflake-1117 Jul 22, 2017
a85e84c
Remove unnecessary variable declaration using let
snowflake-1117 Jul 22, 2017
96e8577
Initialize variable a using apply
snowflake-1117 Jul 22, 2017
979763c
Variable names were replaced by meaningful names
snowflake-1117 Jul 22, 2017
cf57be4
extensions 플러그인 추가
snowflake-1117 Jul 29, 2017
ddf3b00
extensions 적용
snowflake-1117 Jul 29, 2017
3c23056
AutoComplete1~3 코틀린으로 변환
snowflake-1117 Jul 29, 2017
01beed7
불필요한 run 적용 제거
snowflake-1117 Jul 31, 2017
7f7f3a1
when 내부 pair 처리를 위해 arrayOf 사용
snowflake-1117 Aug 8, 2017
946312a
animation.interpolator에 when의 결과 값을 할당해 코드를 간결하게 함
snowflake-1117 Aug 8, 2017
8a75e66
alpha9 업데이트 적용
snowflake-1117 Aug 8, 2017
35d6972
AutoComplete6 코틀린으로 변환
snowflake-1117 Aug 11, 2017
8cbc27e
AutoComplete4 코틀린으로 변환
snowflake-1117 Aug 11, 2017
d5f167f
READ_CONTACTS 권한 permission 기능 구현
snowflake-1117 Aug 11, 2017
0976384
자동완성이 되지 않는 버그 수정
snowflake-1117 Aug 11, 2017
5cebd04
권한 허용 여부를 체크하는 checkPermission 함수 분리
snowflake-1117 Aug 11, 2017
7a333c5
코드 리팩토링
snowflake-1117 Aug 11, 2017
0e9192e
권한허용 함수 적용
snowflake-1117 Aug 11, 2017
455f740
Baseline 파일들 코틀린으로 변환
snowflake-1117 Aug 11, 2017
44dbe66
BaselineNaested 파일들 코틀린으로 변환
snowflake-1117 Aug 12, 2017
4f2fe65
자바파일 코틀린 파일로 변환
snowflake-1117 Aug 12, 2017
1a3786c
gradle 업데이트 적용
snowflake-1117 Aug 12, 2017
62f5b35
매니페스트 파일에 맞춰 minSdkVersion 23으로 변경
snowflake-1117 Aug 12, 2017
661b8d9
Revert "자바파일 코틀린 파일로 변환"
snowflake-1117 Aug 12, 2017
7d0d69d
다이얼로그 출력 문자열 리소스 파일로 이동 후 적용
snowflake-1117 Aug 12, 2017
68718ab
입력받는 문자열이 빈칸일 때, non-null로 추정되는 변수가 null인 예외 발생문제 해결
snowflake-1117 Aug 12, 2017
8875a26
buildToolsVersion 26.0.1 적용
snowflake-1117 Aug 12, 2017
3a276cf
연락처 Permission 체크를 위한 공통 클래스 생성
snowflake-1117 Aug 12, 2017
cafbc32
ContactPermission 클래스 적용
snowflake-1117 Aug 12, 2017
10d3ea7
gradle 업데이트
snowflake-1117 Aug 26, 2017
7d59dcf
List1 코틀린으로 변환
snowflake-1117 Aug 26, 2017
599362a
List2 코틀린으로 변환
snowflake-1117 Aug 26, 2017
d6175f4
lazy 사용해서 var -> val 변수로 전환
snowflake-1117 Aug 26, 2017
4fbd268
List3 코틀린으로 변환
snowflake-1117 Aug 26, 2017
acf9ddb
List4 코틀린으로 변환
snowflake-1117 Aug 26, 2017
0a15bbe
List5 코틀린으로 변환
snowflake-1117 Aug 26, 2017
bdcf79d
List6 코틀린으로 변환
snowflake-1117 Aug 26, 2017
bbf63ab
List7 코틀린으로 변환
snowflake-1117 Aug 26, 2017
50ed3dc
List8 코틀린으로 변환
snowflake-1117 Aug 26, 2017
b34cbe3
List8 getView 파라미터 convertView Nullable로 전환
snowflake-1117 Aug 26, 2017
67049c2
List9 코틀린으로 변환
snowflake-1117 Aug 26, 2017
8a05af5
List10 코틀린으로 변환
snowflake-1117 Aug 26, 2017
4a307ed
List11 코틀린으로 변환
snowflake-1117 Aug 26, 2017
da72941
List12 코틀린으로 변환
snowflake-1117 Aug 26, 2017
a6eb26a
List13 코틀린으로 변환
snowflake-1117 Aug 26, 2017
1cb8fb7
List14 코틀린으로 변환
snowflake-1117 Aug 26, 2017
e85416e
List15 코틀린으로 변환
snowflake-1117 Aug 26, 2017
1048766
List16 코틀린으로 변환
snowflake-1117 Aug 26, 2017
dd0c899
사용하지 않는 import 삭제
snowflake-1117 Aug 26, 2017
de7fa04
List17 코틀린으로 변환
snowflake-1117 Aug 26, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -6,3 +6,10 @@
/build
/gradle
/captures
.idea
build/
.DS_Store
*.iml
*.apk
*.aar
*.zip
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -2,11 +2,13 @@
// vim: ts=4 sts=4 sw=4 expandtab

buildscript {
ext.kotlin_version = '1.1.4-2'
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.android.tools.build:gradle:3.0.0-beta2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
14 changes: 10 additions & 4 deletions mobile/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
buildToolsVersion '26.0.1'

defaultConfig {
applicationId "com.example.android.apis"
minSdkVersion 15
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
@@ -25,6 +27,10 @@ android {

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:support-v4:26.0.0-beta2'
compile 'com.android.support:appcompat-v7:26.0.0-beta2'
compile 'com.android.support:support-v4:26.0.1'
compile 'com.android.support:appcompat-v7:26.0.1'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
}
repositories {
mavenCentral()
}
Original file line number Diff line number Diff line change
@@ -14,32 +14,29 @@
* limitations under the License.
*/

package com.example.android.apis.view;
package com.example.android.apis.view

// Need the following import to get access to the app resources, since this
// class is in a sub-package.
import com.example.android.apis.R;
import com.example.android.apis.R

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.app.Activity
import android.os.Bundle
import android.view.View
import android.view.animation.AnimationUtils
import kotlinx.android.synthetic.main.animation_1.*

public class Animation1 extends Activity implements View.OnClickListener {
class Animation1 : Activity(), View.OnClickListener {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.animation_1);

View loginButton = findViewById(R.id.login);
loginButton.setOnClickListener(this);
public override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.animation_1)
login.setOnClickListener(this)
}

public void onClick(View v) {
Animation shake = AnimationUtils.loadAnimation(this, R.anim.shake);
findViewById(R.id.pw).startAnimation(shake);
override fun onClick(v: View) {
val shake = AnimationUtils.loadAnimation(this, R.anim.shake)
pw.startAnimation(shake)
}

}
90 changes: 0 additions & 90 deletions mobile/src/main/java/com/example/android/apis/view/Animation2.java

This file was deleted.

81 changes: 81 additions & 0 deletions mobile/src/main/java/com/example/android/apis/view/Animation2.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.example.android.apis.view

// Need the following import to get access to the app resources, since this
// class is in a sub-package.
import com.example.android.apis.R

import android.app.Activity
import android.os.Bundle
import android.view.View
import android.view.animation.AnimationUtils
import android.widget.AdapterView
import android.widget.ArrayAdapter
import android.widget.ViewFlipper
import kotlinx.android.synthetic.main.animation_2.*


class Animation2 : Activity(), AdapterView.OnItemSelectedListener {

private val mStrings = arrayOf("Push up", "Push left", "Cross fade", "Hyperspace")

lateinit private var mFlipper: ViewFlipper

public override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.animation_2)

mFlipper = this.flipper
mFlipper.startFlipping()

ArrayAdapter(this,
android.R.layout.simple_spinner_item, mStrings).let {
it.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
spinner.run {
adapter = it
onItemSelectedListener = this@Animation2
}
}
}

override fun onItemSelected(parent: AdapterView<*>, v: View, position: Int, id: Long) {
val (inAnim, outAnim) = when (position) {

0 -> {
arrayOf(AnimationUtils.loadAnimation(this, R.anim.push_up_in)
, AnimationUtils.loadAnimation(this, R.anim.push_up_out))
}
1 -> {
arrayOf(AnimationUtils.loadAnimation(this, R.anim.push_left_in)
, AnimationUtils.loadAnimation(this, R.anim.push_left_out))
}
2 -> {
arrayOf(AnimationUtils.loadAnimation(this, android.R.anim.fade_in)
, AnimationUtils.loadAnimation(this, android.R.anim.fade_out))
}
else -> {
arrayOf(AnimationUtils.loadAnimation(this, R.anim.hyperspace_in)
, AnimationUtils.loadAnimation(this, R.anim.hyperspace_out))
}
}
mFlipper.inAnimation = inAnim
mFlipper.outAnimation = outAnim
}

override fun onNothingSelected(parent: AdapterView<*>) {}
}
101 changes: 0 additions & 101 deletions mobile/src/main/java/com/example/android/apis/view/Animation3.java

This file was deleted.

Loading