-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #460 from StepicOrg/release/1.97
Release/1.97
- Loading branch information
Showing
674 changed files
with
2,741 additions
and
4,412 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
app/src/main/java/org/stepic/droid/adaptive/model/AdaptiveWeekProgress.kt
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
app/src/main/java/org/stepic/droid/adaptive/ui/activities/AdaptiveStatsActivity.kt
This file contains 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
This file contains 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
22 changes: 16 additions & 6 deletions
22
app/src/main/java/org/stepic/droid/adaptive/ui/adapters/AdaptiveStatsViewPagerAdapter.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,29 @@ | ||
package org.stepic.droid.adaptive.ui.adapters | ||
|
||
import android.content.Context | ||
import android.support.v4.app.FragmentManager | ||
import android.support.v4.app.FragmentStatePagerAdapter | ||
import androidx.fragment.app.Fragment | ||
import androidx.fragment.app.FragmentManager | ||
import androidx.fragment.app.FragmentStatePagerAdapter | ||
import org.stepic.droid.R | ||
import org.stepic.droid.adaptive.ui.fragments.AdaptiveProgressFragment | ||
import org.stepic.droid.adaptive.ui.fragments.AdaptiveRatingFragment | ||
|
||
class AdaptiveStatsViewPagerAdapter(fm: FragmentManager, context: Context, courseId: Long) : FragmentStatePagerAdapter(fm) { | ||
class AdaptiveStatsViewPagerAdapter( | ||
fm: FragmentManager, | ||
context: Context, | ||
courseId: Long | ||
) : FragmentStatePagerAdapter(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) { | ||
private val fragments = listOf( | ||
{ AdaptiveProgressFragment.newInstance(courseId) } to context.getString(R.string.adaptive_progress), | ||
{ AdaptiveRatingFragment.newInstance(courseId) } to context.getString(R.string.adaptive_rating) | ||
) | ||
|
||
override fun getItem(position: Int) = fragments[position].first() | ||
override fun getCount(): Int = fragments.size | ||
override fun getPageTitle(position: Int): String = fragments[position].second | ||
override fun getItem(position: Int): Fragment = | ||
fragments[position].first() | ||
|
||
override fun getCount(): Int = | ||
fragments.size | ||
|
||
override fun getPageTitle(position: Int): String = | ||
fragments[position].second | ||
} |
4 changes: 2 additions & 2 deletions
4
app/src/main/java/org/stepic/droid/adaptive/ui/adapters/AdaptiveWeeksAdapter.kt
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.