This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.pivincii.blogging | |
| import android.app.Activity | |
| import android.content.Context | |
| import android.content.Intent | |
| import android.util.AttributeSet | |
| import android.widget.Button | |
| import android.widget.FrameLayout | |
| import android.widget.TextView | |
| import com.pivincii.blogging.activityresult.ActivityResultObserver |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.pivincii.blogging | |
| import android.content.Intent | |
| import android.support.v7.app.AppCompatActivity | |
| import com.pivincii.blogging.activityresult.ActivityResultObserver | |
| import com.pivincii.blogging.activityresult.ActivityResultObservable | |
| abstract class ActivityResultObservableActivity: AppCompatActivity(), ActivityResultObservable { | |
| private val activityObserverList = mutableListOf<ActivityResultObserver>() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.pivincii.blogging.activityresult | |
| interface ActivityResultObservable { | |
| fun addObserver(activityResultObserver: ActivityResultObserver) | |
| fun removeObserver(activityResultObserver: ActivityResultObserver) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package blogging.pivincii.activitylifecycle; | |
| import android.app.Activity; | |
| import android.os.Bundle; | |
| import android.util.Log; | |
| public class SecondActivity extends Activity { | |
| private static String TAG = "LifeCycle " + SecondActivity.class.getSimpleName(); | |
| @Override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package blogging.pivincii.activitylifecycle; | |
| import android.app.Activity; | |
| import android.content.Intent; | |
| import android.os.Bundle; | |
| import android.util.Log; | |
| import android.view.View; | |
| public class MainActivity extends Activity { | |
| private static String TAG = "LifeCycle " + MainActivity.class.getSimpleName(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git clone https://github.com/pivincii/Article-Activity-LifeCycle.git |
NewerOlder