-
Notifications
You must be signed in to change notification settings - Fork 3
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
base: next
Are you sure you want to change the base?
Conversation
// 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mToast ?.let 이나 run으로 처리가능지만, 시인성이 어디가 좋을지는 매번 어려운부분같네요
…, if not , doesn't work
|
|
||
val ss = SpannableString( | ||
"text4: Manually created spans. Click here to dial the phone.") | ||
val ss = SpannableString( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setSpan
을 Apply로 하는 방법도 가능해요
view>text 폴더를 코틀린으로 변환했습니다.
Link에서는 버전에 따라 html.fromHtml(string ) 혹은 html.fromHtml(string, flag )가 되도록 수정했습니다.