Skip to content

Commit 103f5a8

Browse files
Fix part of #5344, Fix Part of #5422 and Fix Part of #5012: Implement Classroom List Screen with Jetpack Compose (#5437)
<!-- READ ME FIRST: Please fill in the explanation section below and check off every point from the Essential Checklist! --> ## Explanation <!-- - Explain what your PR does. If this PR fixes an existing bug, please include - "Fixes #bugnum:" in the explanation so that GitHub can auto-close the issue - when this PR is merged. --> Fixes part of #5344 Fixes part of #5422 Fixes part of #5012 This PR introduces the Classroom List Screen, which will replace the existing Home Screen. The new screen features a classroom carousel that remains sticky when the screen is scrolled. Various approaches were considered for implementing the sticky header, as detailed in [Decision 3: How to implement the sticky classroom carousel?](https://docs.google.com/document/d/1wGnoDS-8zHS5QSHufvTf9SXKi8N3lodirs51Xnehdvo/edit#heading=h.fv51u13soqp4). Ultimately, it was decided to use the `stickyHeader` component of Jetpack Compose. - **Introduce Jetpack Compose** - Sets the groundwork for migrating the codebase to Jetpack Compose. The Classroom List Screen uses a `ComposeView` to host the composable components. Appropriate tests have been set up to verify the functionality. - **Migrate away from `onActivityResult`** - Deprecates the use of `onActivityResult` and transitions to using `ActivityResultContracts` for handling activity results. - **Initiate Deprecation of Android KitKat** - The selected versions of Jetpack Compose dependencies require the `minSdkVersion` to be atleast 21. This PR initiates the process of deprecating support for Android 19 (KitKat). https://github.com/oppia/oppia-android/assets/84731134/2a2145e5-5bd0-4d80-9741-ff6baf20fd12 ## Screenshots ### Phone Light Mode |Potrait|Landscape| |--|--| |![image](https://github.com/oppia/oppia-android/assets/84731134/367fe033-833a-4c44-b9ae-05a79c872271)|![image](https://github.com/oppia/oppia-android/assets/84731134/771f3681-884b-45d4-91af-880b775a5937)| |![image](https://github.com/oppia/oppia-android/assets/84731134/921a136c-d84c-479f-a7e6-f40aa55e9b5b)|![image](https://github.com/oppia/oppia-android/assets/84731134/8783f5f8-3b09-4899-b286-09f1d9cfae2f)| ### Phone Dark Mode |Potrait|Landscape| |--|--| |![image](https://github.com/oppia/oppia-android/assets/84731134/2fd50b98-cd5e-45bb-aeff-8690886ddf28)|![image](https://github.com/oppia/oppia-android/assets/84731134/64053fd1-0c22-414a-9cbf-b6fcb615fe38)| |![image](https://github.com/oppia/oppia-android/assets/84731134/2d2160ba-c886-48c7-8832-f1b8327e4daa)|![image](https://github.com/oppia/oppia-android/assets/84731134/7c3974a0-0c4a-4de2-a39b-2239f27bdd64)| ### Tablet Light Mode |Potrait|Landscape| |--|--| |![image](https://github.com/oppia/oppia-android/assets/84731134/459907ce-4bdf-44dd-a84b-e9e50baaa53b)|![image](https://github.com/oppia/oppia-android/assets/84731134/fc3076de-35bf-493e-8b88-e74658285f61)| ||![image](https://github.com/oppia/oppia-android/assets/84731134/34d34a58-e173-488b-9ba4-5de28c2d1342)| ### Tablet Dark Mode |Potrait|Landscape| |--|--| |![image](https://github.com/oppia/oppia-android/assets/84731134/8eff1354-9faa-4717-93df-ae643db0131b)|![image](https://github.com/oppia/oppia-android/assets/84731134/1fe8232d-399f-4268-a889-854e9680529c)| ||![image](https://github.com/oppia/oppia-android/assets/84731134/c8b09dfe-00d9-4d1b-a991-dd2c049d4de1)| ## Essential Checklist <!-- Please tick the relevant boxes by putting an "x" in them. --> - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). ## For UI-specific PRs only <!-- Delete these section if this PR does not include UI-related changes. --> If your PR includes UI-related changes, then: - Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes - For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see [RTL guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines)) - Add a video showing the full UX flow with a screen reader enabled (see [accessibility guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide)) - For PRs introducing new UI elements or color changes, both light and dark mode screenshots must be included - Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing --------- Co-authored-by: Adhiambo Peres <[email protected]>
1 parent f53c7e5 commit 103f5a8

File tree

69 files changed

+4218
-225
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+4218
-225
lines changed

BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ package_group(
124124
{
125125
"flavor": "oppia_kitkat",
126126
"main_dex_list": "//:config/kitkat_main_dex_class_list.txt",
127-
"min_sdk_version": 19,
127+
"min_sdk_version": 21,
128128
"multidex": "manual_main_dex",
129129
"target_sdk_version": 33,
130130
},

app/BUILD.bazel

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,7 @@ android_library(
602602
"//model/src/main/proto:thumbnail_java_proto_lite",
603603
"//model/src/main/proto:version_java_proto_lite",
604604
"//third_party:androidx_annotation_annotation",
605+
"//third_party:androidx_compose_ui_ui",
605606
"//third_party:androidx_constraintlayout_constraintlayout",
606607
"//third_party:androidx_core_core",
607608
"//third_party:androidx_databinding_databinding-adapters",
@@ -763,6 +764,7 @@ kt_android_library(
763764
custom_package = "org.oppia.android.app.ui",
764765
enable_data_binding = 1,
765766
manifest = "src/main/AppAndroidManifest.xml",
767+
plugins = ["//tools/kotlin:jetpack_compose_compiler_plugin"],
766768
visibility = ["//visibility:public"],
767769
deps = [
768770
":binding_adapters",
@@ -787,6 +789,15 @@ kt_android_library(
787789
"//domain/src/main/java/org/oppia/android/domain/survey:gating_controller",
788790
"//domain/src/main/java/org/oppia/android/domain/survey:survey_controller",
789791
"//model/src/main/proto:arguments_java_proto_lite",
792+
"//third_party:androidx_activity_activity-compose",
793+
"//third_party:androidx_annotation_annotation",
794+
"//third_party:androidx_appcompat_appcompat",
795+
"//third_party:androidx_compose_foundation_foundation",
796+
"//third_party:androidx_compose_foundation_foundation-layout",
797+
"//third_party:androidx_compose_material_material",
798+
"//third_party:androidx_compose_runtime_runtime",
799+
"//third_party:androidx_compose_ui_ui",
800+
"//third_party:androidx_core_core-ktx",
790801
"//third_party:androidx_databinding_databinding-adapters",
791802
"//third_party:androidx_databinding_databinding-common",
792803
"//third_party:androidx_databinding_databinding-runtime",
@@ -800,6 +811,7 @@ kt_android_library(
800811
"//third_party:com_github_takusemba_spotlight",
801812
"//third_party:com_google_android_flexbox_flexbox",
802813
"//third_party:javax_annotation_javax_annotation-api_jar",
814+
"//third_party:org_jetbrains_kotlin_kotlin-stdlib-jdk8_jar",
803815
"//utility",
804816
"//utility/src/main/java/org/oppia/android/util/extensions:bundle_extensions",
805817
"//utility/src/main/java/org/oppia/android/util/parser/image:image_loader",
@@ -898,6 +910,7 @@ TEST_DEPS = [
898910
"//testing/src/main/java/org/oppia/android/testing/threading:test_module",
899911
"//testing/src/main/java/org/oppia/android/testing/time:test_module",
900912
"//third_party:androidx_annotation_annotation",
913+
"//third_party:androidx_compose_ui_ui-test-junit4",
901914
"//third_party:androidx_core_core",
902915
"//third_party:androidx_databinding_databinding-adapters",
903916
"//third_party:androidx_databinding_databinding-common",
@@ -956,7 +969,7 @@ MIGRATED_TESTS = [
956969
filtered_tests = MIGRATED_TESTS,
957970
manifest_values = {
958971
"applicationId": "org.oppia.android",
959-
"minSdkVersion": "19",
972+
"minSdkVersion": "21",
960973
"targetSdkVersion": "30",
961974
"versionCode": "0",
962975
"versionName": "0.1-alpha",
@@ -972,7 +985,7 @@ MIGRATED_TESTS = [
972985
filtered_tests = MIGRATED_TESTS,
973986
manifest_values = {
974987
"applicationId": "org.oppia.android",
975-
"minSdkVersion": "19",
988+
"minSdkVersion": "21",
976989
"targetSdkVersion": "30",
977990
"versionCode": "0",
978991
"versionName": "0.1-alpha",

app/build.gradle

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ apply plugin: 'kotlin-kapt'
66

77
android {
88
compileSdkVersion 33
9-
buildToolsVersion "29.0.2"
9+
buildToolsVersion "30.0.2"
1010
defaultConfig {
1111
applicationId "org.oppia.android"
12-
minSdkVersion 19
12+
minSdkVersion 21
1313
targetSdkVersion 33
1414
versionCode 1
1515
versionName "1.0"
@@ -30,6 +30,15 @@ android {
3030
}
3131
kotlinOptions {
3232
jvmTarget = JavaVersion.VERSION_1_8
33+
useIR = true
34+
freeCompilerArgs += ["-opt-in=kotlin.RequiresOptIn"]
35+
}
36+
buildFeatures {
37+
compose true
38+
}
39+
composeOptions {
40+
kotlinCompilerExtensionVersion compose_version
41+
kotlinCompilerVersion kotlin_version
3342
}
3443
buildTypes {
3544
release {
@@ -147,6 +156,13 @@ dependencies {
147156
implementation fileTree(dir: 'libs', include: ['*.jar'])
148157
implementation(
149158
'androidx.appcompat:appcompat:1.0.2',
159+
"androidx.compose.foundation:foundation:$compose_version",
160+
"androidx.compose.foundation:foundation-layout:$compose_version",
161+
"androidx.compose.material:material:$compose_version",
162+
"androidx.compose.runtime:runtime:$compose_version",
163+
"androidx.compose.runtime:runtime-livedata:$compose_version",
164+
"androidx.compose.ui:ui:$compose_version",
165+
"androidx.compose.ui:ui-tooling:$compose_version",
150166
'androidx.constraintlayout:constraintlayout:1.1.3',
151167
'androidx.core:core-ktx:1.0.2',
152168
'androidx.legacy:legacy-support-v4:1.0.0',
@@ -164,6 +180,7 @@ dependencies {
164180
'com.github.bumptech.glide:glide:4.11.0',
165181
'com.google.android.flexbox:flexbox:3.0.0',
166182
'com.google.android.material:material:1.3.0',
183+
"com.google.android.material:compose-theme-adapter:$compose_version",
167184
'com.google.dagger:dagger:2.41',
168185
'com.google.firebase:firebase-analytics:17.5.0',
169186
'com.google.firebase:firebase-analytics-ktx:17.5.0',
@@ -189,6 +206,7 @@ dependencies {
189206
'org.glassfish.jaxb:jaxb-runtime:2.3.2',
190207
)
191208
testImplementation(
209+
"androidx.compose.ui:ui-test-junit4:$compose_version",
192210
'androidx.test:core:1.2.0',
193211
'androidx.test.espresso:espresso-contrib:3.1.0',
194212
'androidx.test.espresso:espresso-core:3.2.0',
@@ -207,6 +225,7 @@ dependencies {
207225
project(":testing"),
208226
)
209227
androidTestImplementation(
228+
"androidx.compose.ui:ui-test-junit4:$compose_version",
210229
'androidx.test:core:1.2.0',
211230
'androidx.test.espresso:espresso-contrib:3.1.0',
212231
'androidx.test.espresso:espresso-core:3.2.0',

app/src/main/AndroidManifest.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,19 @@
332332
<activity
333333
android:name=".app.testing.ColorBindingAdaptersTestActivity"
334334
android:theme="@style/OppiaThemeWithoutActionBar" />
335+
<activity
336+
android:name=".app.classroom.ClassroomListActivity"
337+
android:label="@string/classroom_list_activity_title"
338+
android:theme="@style/OppiaThemeWithoutActionBar" />
335339

336340
<provider
337341
android:name="androidx.work.impl.WorkManagerInitializer"
338342
android:authorities="${applicationId}.workmanager-init"
339343
android:exported="false"
340344
tools:node="remove" />
345+
<provider
346+
android:name="androidx.startup.InitializationProvider"
347+
android:authorities="${applicationId}.androidx-startup"
348+
tools:node="remove" />
341349
</application>
342350
</manifest>

app/src/main/java/org/oppia/android/app/activity/ActivityComponentImpl.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import dagger.Subcomponent
66
import org.oppia.android.app.administratorcontrols.AdministratorControlsActivity
77
import org.oppia.android.app.administratorcontrols.appversion.AppVersionActivity
88
import org.oppia.android.app.administratorcontrols.learneranalytics.ProfileAndDeviceIdActivity
9+
import org.oppia.android.app.classroom.ClassroomListActivity
910
import org.oppia.android.app.completedstorylist.CompletedStoryListActivity
1011
import org.oppia.android.app.devoptions.DeveloperOptionsActivity
1112
import org.oppia.android.app.devoptions.forcenetworktype.ForceNetworkTypeActivity
@@ -218,4 +219,5 @@ interface ActivityComponentImpl :
218219
fun inject(walkthroughActivity: WalkthroughActivity)
219220
fun inject(surveyActivity: SurveyActivity)
220221
fun inject(colorBindingAdaptersTestActivity: ColorBindingAdaptersTestActivity)
222+
fun inject(classroomListActivity: ClassroomListActivity)
221223
}
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
package org.oppia.android.app.classroom
2+
3+
import android.content.Context
4+
import android.content.Intent
5+
import android.os.Bundle
6+
import org.oppia.android.R
7+
import org.oppia.android.app.activity.ActivityComponentImpl
8+
import org.oppia.android.app.activity.InjectableAutoLocalizedAppCompatActivity
9+
import org.oppia.android.app.activity.route.ActivityRouter
10+
import org.oppia.android.app.drawer.ExitProfileDialogFragment
11+
import org.oppia.android.app.drawer.TAG_SWITCH_PROFILE_DIALOG
12+
import org.oppia.android.app.home.RouteToRecentlyPlayedListener
13+
import org.oppia.android.app.home.RouteToTopicListener
14+
import org.oppia.android.app.home.RouteToTopicPlayStoryListener
15+
import org.oppia.android.app.model.DestinationScreen
16+
import org.oppia.android.app.model.ExitProfileDialogArguments
17+
import org.oppia.android.app.model.HighlightItem
18+
import org.oppia.android.app.model.ProfileId
19+
import org.oppia.android.app.model.RecentlyPlayedActivityParams
20+
import org.oppia.android.app.model.RecentlyPlayedActivityTitle
21+
import org.oppia.android.app.model.ScreenName.CLASSROOM_LIST_ACTIVITY
22+
import org.oppia.android.app.topic.TopicActivity
23+
import org.oppia.android.app.translation.AppLanguageResourceHandler
24+
import org.oppia.android.util.logging.CurrentAppScreenNameIntentDecorator.decorateWithScreenName
25+
import org.oppia.android.util.profile.CurrentUserProfileIdIntentDecorator.decorateWithUserProfileId
26+
import org.oppia.android.util.profile.CurrentUserProfileIdIntentDecorator.extractCurrentUserProfileId
27+
import javax.inject.Inject
28+
29+
/** The activity for displaying [ClassroomListFragment]. */
30+
class ClassroomListActivity :
31+
InjectableAutoLocalizedAppCompatActivity(),
32+
RouteToTopicListener,
33+
RouteToTopicPlayStoryListener,
34+
RouteToRecentlyPlayedListener {
35+
@Inject
36+
lateinit var classroomListActivityPresenter: ClassroomListActivityPresenter
37+
38+
@Inject
39+
lateinit var resourceHandler: AppLanguageResourceHandler
40+
41+
@Inject
42+
lateinit var activityRouter: ActivityRouter
43+
44+
private var internalProfileId: Int = -1
45+
46+
companion object {
47+
/** Returns a new [Intent] to route to [ClassroomListActivity] for a specified [profileId]. */
48+
fun createClassroomListActivity(context: Context, profileId: ProfileId?): Intent {
49+
return Intent(context, ClassroomListActivity::class.java).apply {
50+
decorateWithScreenName(CLASSROOM_LIST_ACTIVITY)
51+
profileId?.let { decorateWithUserProfileId(profileId) }
52+
}
53+
}
54+
}
55+
56+
override fun onCreate(savedInstanceState: Bundle?) {
57+
super.onCreate(savedInstanceState)
58+
(activityComponent as ActivityComponentImpl).inject(this)
59+
60+
internalProfileId = intent.extractCurrentUserProfileId().internalId
61+
classroomListActivityPresenter.handleOnCreate()
62+
title = resourceHandler.getStringInLocale(R.string.classroom_list_activity_title)
63+
}
64+
65+
override fun onRestart() {
66+
super.onRestart()
67+
classroomListActivityPresenter.handleOnRestart()
68+
}
69+
70+
override fun onBackPressed() {
71+
val previousFragment =
72+
supportFragmentManager.findFragmentByTag(TAG_SWITCH_PROFILE_DIALOG)
73+
if (previousFragment != null) {
74+
supportFragmentManager.beginTransaction().remove(previousFragment).commitNow()
75+
}
76+
val exitProfileDialogArguments =
77+
ExitProfileDialogArguments
78+
.newBuilder()
79+
.setHighlightItem(HighlightItem.NONE)
80+
.build()
81+
val dialogFragment = ExitProfileDialogFragment
82+
.newInstance(exitProfileDialogArguments = exitProfileDialogArguments)
83+
dialogFragment.showNow(supportFragmentManager, TAG_SWITCH_PROFILE_DIALOG)
84+
}
85+
86+
override fun routeToRecentlyPlayed(recentlyPlayedActivityTitle: RecentlyPlayedActivityTitle) {
87+
val recentlyPlayedActivityParams =
88+
RecentlyPlayedActivityParams
89+
.newBuilder()
90+
.setProfileId(ProfileId.newBuilder().setInternalId(internalProfileId).build())
91+
.setActivityTitle(recentlyPlayedActivityTitle).build()
92+
93+
activityRouter.routeToScreen(
94+
DestinationScreen
95+
.newBuilder()
96+
.setRecentlyPlayedActivityParams(recentlyPlayedActivityParams)
97+
.build()
98+
)
99+
}
100+
101+
override fun routeToTopic(internalProfileId: Int, topicId: String) {
102+
startActivity(TopicActivity.createTopicActivityIntent(this, internalProfileId, topicId))
103+
}
104+
105+
override fun routeToTopicPlayStory(internalProfileId: Int, topicId: String, storyId: String) {
106+
startActivity(
107+
TopicActivity.createTopicPlayStoryActivityIntent(
108+
this,
109+
internalProfileId,
110+
topicId,
111+
storyId
112+
)
113+
)
114+
}
115+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
package org.oppia.android.app.classroom
2+
3+
import android.view.View
4+
import androidx.appcompat.app.AppCompatActivity
5+
import androidx.appcompat.widget.Toolbar
6+
import androidx.drawerlayout.widget.DrawerLayout
7+
import org.oppia.android.R
8+
import org.oppia.android.app.drawer.NavigationDrawerFragment
9+
import javax.inject.Inject
10+
11+
/** Tag for identifying the [ClassroomListFragment] in transactions. */
12+
private const val TAG_CLASSROOM_LIST_FRAGMENT = "CLASSROOM_LIST_FRAGMENT"
13+
14+
/** The presenter for [ClassroomListActivity]. */
15+
class ClassroomListActivityPresenter @Inject constructor(private val activity: AppCompatActivity) {
16+
private var navigationDrawerFragment: NavigationDrawerFragment? = null
17+
18+
/**
19+
* Handles the creation of the activity. Sets the content view, sets up the navigation drawer,
20+
* and adds the [ClassroomListFragment] if it's not already added.
21+
*/
22+
fun handleOnCreate() {
23+
activity.setContentView(R.layout.classroom_list_activity)
24+
setUpNavigationDrawer()
25+
if (getClassroomListFragment() == null) {
26+
activity.supportFragmentManager.beginTransaction().add(
27+
R.id.classroom_list_fragment_placeholder,
28+
ClassroomListFragment(),
29+
TAG_CLASSROOM_LIST_FRAGMENT
30+
).commitNow()
31+
}
32+
}
33+
34+
/** Handles the activity restart. Re-initializes the navigation drawer. */
35+
fun handleOnRestart() {
36+
setUpNavigationDrawer()
37+
}
38+
39+
private fun setUpNavigationDrawer() {
40+
val toolbar = activity.findViewById<View>(R.id.classroom_list_activity_toolbar) as Toolbar
41+
activity.setSupportActionBar(toolbar)
42+
activity.supportActionBar!!.setDisplayShowHomeEnabled(true)
43+
navigationDrawerFragment = activity
44+
.supportFragmentManager
45+
.findFragmentById(
46+
R.id.classroom_list_activity_fragment_navigation_drawer
47+
) as NavigationDrawerFragment
48+
navigationDrawerFragment!!.setUpDrawer(
49+
activity.findViewById<View>(R.id.classroom_list_activity_drawer_layout) as DrawerLayout,
50+
toolbar, R.id.nav_home
51+
)
52+
}
53+
54+
private fun getClassroomListFragment(): ClassroomListFragment? {
55+
return activity.supportFragmentManager.findFragmentById(
56+
R.id.classroom_list_fragment_placeholder
57+
) as ClassroomListFragment?
58+
}
59+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package org.oppia.android.app.classroom
2+
3+
import android.content.Context
4+
import android.os.Bundle
5+
import android.view.LayoutInflater
6+
import android.view.View
7+
import android.view.ViewGroup
8+
import org.oppia.android.app.fragment.FragmentComponentImpl
9+
import org.oppia.android.app.fragment.InjectableFragment
10+
import org.oppia.android.app.home.classroomlist.ClassroomSummaryClickListener
11+
import org.oppia.android.app.home.topiclist.TopicSummaryClickListener
12+
import org.oppia.android.app.model.ClassroomSummary
13+
import org.oppia.android.app.model.TopicSummary
14+
import javax.inject.Inject
15+
16+
/** Fragment that displays the classroom list screen. */
17+
class ClassroomListFragment :
18+
InjectableFragment(),
19+
TopicSummaryClickListener,
20+
ClassroomSummaryClickListener {
21+
@Inject
22+
lateinit var classroomListFragmentPresenter: ClassroomListFragmentPresenter
23+
24+
override fun onAttach(context: Context) {
25+
super.onAttach(context)
26+
(fragmentComponent as FragmentComponentImpl).inject(this)
27+
}
28+
29+
override fun onCreateView(
30+
inflater: LayoutInflater,
31+
container: ViewGroup?,
32+
savedInstanceState: Bundle?
33+
): View? {
34+
return classroomListFragmentPresenter.handleCreateView(inflater, container)
35+
}
36+
37+
override fun onTopicSummaryClicked(topicSummary: TopicSummary) {
38+
classroomListFragmentPresenter.onTopicSummaryClicked(topicSummary)
39+
}
40+
41+
override fun onClassroomSummaryClicked(classroomSummary: ClassroomSummary) {
42+
classroomListFragmentPresenter.onClassroomSummaryClicked(classroomSummary)
43+
}
44+
}

0 commit comments

Comments
 (0)