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
16 changes: 13 additions & 3 deletions JokeApp/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ apply plugin: 'androidx.navigation.safeargs'


android {
compileSdk 31
compileSdk 30

defaultConfig {
applicationId "com.example.jokeapp"
minSdk 24
targetSdk 31
targetSdk 30
versionCode 1
versionName "1.0"

Expand All @@ -41,22 +41,32 @@ android {
dataBinding{
enabled = true
}

testOptions.unitTests {
includeAndroidResources = true
}
}



dependencies {

implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.test.ext:junit-ktx:1.1.3'
testImplementation 'junit:junit:4.+'
testImplementation 'org.hamcrest:hamcrest:2.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
testImplementation "org.robolectric:robolectric:4.5.1"
testImplementation "androidx.arch.core:core-testing:2.1.0"
implementation "android.arch.navigation:navigation-fragment-ktx:$version_navigation"
implementation "android.arch.navigation:navigation-ui-ktx:$version_navigation"
implementation 'com.jakewharton.timber:timber:5.0.1'

implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'

}

Expand Down
28 changes: 0 additions & 28 deletions JokeApp/app/src/main/java/com/example/jokeapp/Comedian.kt

This file was deleted.

59 changes: 0 additions & 59 deletions JokeApp/app/src/main/java/com/example/jokeapp/HeaderFragment.kt

This file was deleted.

30 changes: 0 additions & 30 deletions JokeApp/app/src/main/java/com/example/jokeapp/JokeBook.kt

This file was deleted.

116 changes: 0 additions & 116 deletions JokeApp/app/src/main/java/com/example/jokeapp/JokeFragment.kt

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.jokeapp
package com.example.jokeapp.screens.home

import android.os.Bundle
import android.view.*
Expand All @@ -8,19 +8,21 @@ import androidx.databinding.DataBindingUtil
import androidx.navigation.Navigation
import androidx.navigation.findNavController
import androidx.navigation.ui.NavigationUI
import com.example.jokeapp.R
import com.example.jokeapp.databinding.FragmentHomeBinding
import kotlin.random.Random

// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER


/**
* A simple [Fragment] subclass.
* Use the [HomeFragment.newInstance] factory method to
* create an instance of this fragment.
*/
class HomeFragment : Fragment() {

/*
Note: the HomeFragment doesn't follow the MVVM architecture to demonstrate the alternatives
The Homefragment still uses savedInstanceState and clickListeners with DataBinding
*/

lateinit var binding: FragmentHomeBinding
var numberOfOncreates = 0
var numberOfOncreateViews = 0
Expand Down
Loading