title: Create Lifecycle-Aware Component
description: ...
[Slide 01]
So let's explore how we create a lifecycle-aware component.
# macOS files | |
.DS_Store | |
.AppleDouble | |
.LSOverride | |
# Files that might appear in the root of a volume | |
.DocumentRevisions-V100 | |
.fseventsd | |
.Spotlight-V100 | |
.TemporaryItems |
package com.sriyank.composecomponents | |
import android.os.Bundle | |
import android.widget.Toast | |
import androidx.activity.ComponentActivity | |
import androidx.activity.compose.setContent | |
import androidx.compose.foundation.layout.Arrangement | |
import androidx.compose.foundation.layout.Column | |
import androidx.compose.foundation.layout.fillMaxSize | |
import androidx.compose.material.Button |
package com.sriyank.composecomponents | |
import android.content.Context | |
import android.os.Bundle | |
import android.widget.Toast | |
import androidx.activity.ComponentActivity | |
import androidx.activity.compose.setContent | |
import androidx.compose.foundation.BorderStroke | |
import androidx.compose.foundation.layout.* | |
import androidx.compose.material.* |
package com.sriyank.mdccomponents | |
import android.content.Context | |
import android.util.AttributeSet | |
import android.view.MotionEvent | |
import android.view.View | |
import androidx.coordinatorlayout.widget.CoordinatorLayout | |
import androidx.customview.widget.ViewDragHelper | |
import java.util.* |
package com.sriyank.mdccomponents | |
import android.os.Bundle | |
import android.widget.Toast | |
import androidx.appcompat.app.AppCompatActivity | |
import com.google.android.material.snackbar.Snackbar | |
import kotlinx.android.synthetic.main.activity_main.* | |
class MainActivity : AppCompatActivity() { |
package com.sriyank.mdccomponents | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import android.widget.Toast | |
import androidx.core.widget.NestedScrollView | |
import kotlinx.android.synthetic.main.activity_main.* | |
class MainActivity : AppCompatActivity() { |
package com.sriyank.mdccomponents | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import android.view.View | |
import android.widget.Toast | |
import kotlinx.android.synthetic.main.activity_main.* | |
class MainActivity : AppCompatActivity() { |
package com.sriyank.mdccomponents | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import android.view.View | |
import android.widget.Toast | |
import kotlinx.android.synthetic.main.activity_main.* | |
class MainActivity : AppCompatActivity() { |
package com.sriyank.mdccomponents | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import android.view.View | |
import android.widget.Toast | |
import kotlinx.android.synthetic.main.activity_main.* | |
class MainActivity : AppCompatActivity() { |