Skip to content

Commit

Permalink
Replace kotlin extension with view bindings in NoDriveActivity
Browse files Browse the repository at this point in the history
  • Loading branch information
LunarX committed Oct 18, 2023
1 parent 5ca2921 commit 8612a5a
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.infomaniak.drive.R
import com.infomaniak.drive.data.api.ApiRoutes
import com.infomaniak.drive.databinding.ActivityNoDriveBinding
import com.infomaniak.lib.core.utils.UtilsUi.openUrl
import kotlinx.android.synthetic.main.activity_no_drive.anotherProfileButton
import kotlinx.android.synthetic.main.activity_no_drive.noDriveActionButton
import kotlinx.android.synthetic.main.activity_no_drive.noDriveIconLayout
import kotlinx.android.synthetic.main.empty_icon_layout.view.icon

class NoDriveActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {

private val binding by lazy { ActivityNoDriveBinding.inflate(layoutInflater) }

override fun onCreate(savedInstanceState: Bundle?) = with(binding) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_no_drive)
setContentView(root)

noDriveIconLayout.icon.setImageResource(R.drawable.ic_no_drive)

Expand All @@ -40,4 +40,4 @@ class NoDriveActivity : AppCompatActivity() {
}
anotherProfileButton.setOnClickListener { onBackPressed() }
}
}
}

0 comments on commit 8612a5a

Please sign in to comment.