Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.content.Context
import android.content.Intent
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import android.view.View
import android.view.WindowManager
import android.widget.EditText
Expand All @@ -20,6 +21,8 @@ class DetailsActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_details)

println("${javaClass.simpleName} - onCreate")

val intent = intent
data = intent.getSerializableExtra("object") as ImageData
val context = this
Expand All @@ -37,6 +40,8 @@ class DetailsActivity : AppCompatActivity() {
override fun onStart() {
super.onStart()

println("${javaClass.simpleName} - onStart")

image.setImageURI(data?.fileUri)
// image.setImageDrawable(getResources().getDrawable(android.R.drawable.btn_star));
text_name.text = data?.name
Expand All @@ -54,4 +59,30 @@ class DetailsActivity : AppCompatActivity() {
setResult(Activity.RESULT_OK, resultIntent)
finish()
}


override fun onResume() {
super.onResume()
println("${javaClass.simpleName} - onResume")
}

override fun onPause() {
super.onPause()
println("${javaClass.simpleName} - onPause")
}

override fun onStop() {
super.onStop()
println("${javaClass.simpleName} - onStop")
}

override fun onDestroy() {
super.onDestroy()
println("${javaClass.simpleName} - onDestroy")
}

override fun onRestart() {
super.onRestart()
println("${javaClass.simpleName} - onRestart")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import android.net.Uri
import android.os.Bundle
import android.os.Handler
import android.support.v7.app.AppCompatActivity
import android.util.Log
import android.view.MotionEvent
import android.view.View
import android.widget.ImageView
Expand Down Expand Up @@ -56,6 +57,8 @@ class FullscreenActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

println("${javaClass.simpleName} - onCreate")

val stringArray = arrayOfNulls<String>(5)

setContentView(R.layout.activity_fullscreen)
Expand Down Expand Up @@ -145,4 +148,37 @@ class FullscreenActivity : AppCompatActivity() {
*/
private val UI_ANIMATION_DELAY = 300
}


override fun onStart() {
super.onStart()
println("${javaClass.simpleName} - onStart")
}

override fun onResume() {
super.onResume()
println("${javaClass.simpleName} - onResume")
}

override fun onPause() {
super.onPause()
println("${javaClass.simpleName} - onPause")
}

override fun onStop() {
super.onStop()
println("${javaClass.simpleName} - onStop")
}

override fun onDestroy() {
super.onDestroy()
println("${javaClass.simpleName} - onDestroy")
}

override fun onRestart() {
super.onRestart()
println("${javaClass.simpleName} - onRestart")
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)

println("${javaClass.simpleName} - onCreate")

val context = this

imageList = ArrayList()

///Lines 38-44 when the button is clicked it sets the intent to an image type then requests an image.///TB
button_add.setOnClickListener {
val intent = Intent(Intent.ACTION_GET_CONTENT)
intent.type = "image/*"
Expand Down Expand Up @@ -58,7 +62,7 @@ class MainActivity : AppCompatActivity() {
private fun refreshListView() {
listAdapter!!.notifyDataSetChanged()
}

///Function adds image to a list and tells what position it is in.//TB
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
if (requestCode == REQUEST_IMAGE_GET && resultCode == RESULT_OK) {
val fullPhotoUri = data!!.data
Expand Down Expand Up @@ -86,4 +90,34 @@ class MainActivity : AppCompatActivity() {
internal const val REQUEST_IMAGE_GET = 1
internal const val EDIT_IMAGE_REQUEST = 2
}

override fun onStart() {
super.onStart()
println("${javaClass.simpleName} - onStart")
}

override fun onResume() {
super.onResume()
println("${javaClass.simpleName} - onResume")
}

override fun onPause() {
super.onPause()
println("${javaClass.simpleName} - onPause")
}

override fun onStop() {
super.onStop()
println("${javaClass.simpleName} - onStop")
}

override fun onDestroy() {
super.onDestroy()
println("${javaClass.simpleName} - onDestroy")
}

override fun onRestart() {
super.onRestart()
println("${javaClass.simpleName} - onRestart")
}
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.android.tools.build:gradle:3.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"


Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Oct 11 14:14:46 MDT 2018
#Tue Aug 06 13:06:15 MDT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip