Skip to content

Commit e064bce

Browse files
committed
updated constructor signature to use findViewById<> as targeting Android O
1 parent b3087a2 commit e064bce

File tree

1 file changed

+4
-4
lines changed
  • aztec/src/main/kotlin/org/wordpress/aztec

1 file changed

+4
-4
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/Aztec.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ open class Aztec private constructor(val visualEditor: AztecText, val toolbar: A
3232

3333
private constructor(activity: Activity, @IdRes aztecTextId: Int,
3434
@IdRes sourceTextId: Int, @IdRes toolbarId: Int,
35-
toolbarClickListener: IAztecToolbarClickListener) : this(activity.findViewById(aztecTextId) as AztecText,
36-
activity.findViewById(sourceTextId) as SourceViewEditText, activity.findViewById(toolbarId) as AztecToolbar, toolbarClickListener)
35+
toolbarClickListener: IAztecToolbarClickListener) : this(activity.findViewById<AztecText>(aztecTextId),
36+
activity.findViewById<SourceViewEditText>(sourceTextId), activity.findViewById<AztecToolbar>(toolbarId), toolbarClickListener)
3737

3838
private constructor(activity: Activity, @IdRes aztecTextId: Int,
3939
@IdRes toolbarId: Int,
40-
toolbarClickListener: IAztecToolbarClickListener) : this(activity.findViewById(aztecTextId) as AztecText,
41-
activity.findViewById(toolbarId) as AztecToolbar, toolbarClickListener)
40+
toolbarClickListener: IAztecToolbarClickListener) : this(activity.findViewById<AztecText>(aztecTextId),
41+
activity.findViewById<AztecToolbar>(toolbarId), toolbarClickListener)
4242

4343
private constructor(visualEditor: AztecText, sourceEditor: SourceViewEditText,
4444
toolbar: AztecToolbar, toolbarClickListener: IAztecToolbarClickListener) : this(visualEditor, toolbar, toolbarClickListener) {

0 commit comments

Comments
 (0)