Skip to content

Commit

Permalink
Fix #468: Low fi topic train with support for API below 21 (#471)
Browse files Browse the repository at this point in the history
* Add support for API below 21

* Nit change to xml
  • Loading branch information
rt4914 authored Nov 25, 2019
1 parent c948e7a commit db77b67
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package org.oppia.app.application

import android.app.Application
import androidx.appcompat.app.AppCompatActivity
import androidx.multidex.MultiDexApplication
import org.oppia.app.activity.ActivityComponent

/** The root [Application] of the Oppia app. */
class OppiaApplication: Application() {
class OppiaApplication: MultiDexApplication() {
/** The root [ApplicationComponent]. */
private val component: ApplicationComponent by lazy {
DaggerApplicationComponent.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class TopicTrainFragmentPresenter @Inject constructor(
val binding = TopicTrainFragmentBinding.inflate(inflater, container, /* attachToRoot= */ false)

skillSelectionAdapter = SkillSelectionAdapter(this)
binding.skillRecyclerView.isNestedScrollingEnabled = false
binding.skillRecyclerView.apply {
adapter = skillSelectionAdapter
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/topic_train_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
type="org.oppia.app.topic.train.TopicTrainFragmentPresenter" />
</data>

<ScrollView
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/oppiaBackground"
Expand Down Expand Up @@ -79,5 +79,5 @@
android:text="@string/topic_train_start"
android:textColor="@{viewModel.isSubmitButtonActive()? @color/white : @color/submitButtonInactive}" />
</LinearLayout>
</ScrollView>
</androidx.core.widget.NestedScrollView>
</layout>
2 changes: 2 additions & 0 deletions data/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ android {
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}

compileOptions {
Expand Down Expand Up @@ -42,6 +43,7 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation(
'androidx.appcompat:appcompat:1.0.2',
'com.android.support:multidex:1.0.3',
'com.google.dagger:dagger:2.24',
'com.google.protobuf:protobuf-lite:3.0.0',
'com.squareup.moshi:moshi-kotlin:1.8.0',
Expand Down

0 comments on commit db77b67

Please sign in to comment.