Skip to content
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

Checking out every service of the project #2

Open
wants to merge 34 commits into
base: next
Choose a base branch
from

Conversation

lynring24
Copy link

view>text 폴더를 코틀린으로 변환했습니다.
Link에서는 버전에 따라 html.fromHtml(string ) 혹은 html.fromHtml(string, flag )가 되도록 수정했습니다.

// respond to user input. To make them active, you need to
// call setMovementMethod() on the TextView object.

val t2 = findViewById<View>(R.id.text2) as TextView
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lazy 를 이용해서 findViewById 를 해보는 방법도 추천드려요

} });
class LogTextBox1 : Activity() {

private var mText: LogTextBox? = null
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lazy이용시 nullable 표기 문제를 해소가능해서
아래 mText!!도 쉽게 해결되요

setContentView(R.layout.alarm_controller)

// Watch for button clicks.
var button = findViewById<View>(R.id.one_shot) as (Button)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

별도로 Button 캐스팅을 하지않아도 ClickListener 처리할 수도 있지요

am.cancel(sender)

// Tell the user about what we did.
if (mToast != null) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mToast ?.let 이나 run으로 처리가능지만, 시인성이 어디가 좋을지는 매번 어려운부분같네요

@lynring24 lynring24 changed the title Convert ' View>Text ' java to Kotlin Ongoing Fragment of App Aug 12, 2017
@lynring24
Copy link
Author

  • converted AlarmService.kt and FragmentAlertDialog.kt
  • applied kotlin extension to project and codes

@lynring24 lynring24 changed the title Ongoing Fragment of App [Ongoing] App/Fragment Aug 12, 2017

val ss = SpannableString(
"text4: Manually created spans. Click here to dial the phone.")
val ss = SpannableString(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setSpan 을 Apply로 하는 방법도 가능해요

@lynring24 lynring24 changed the title [Ongoing] App/Fragment Checking out every service of the project Aug 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants