Commit 8e4f6121 authored by Konstantin Tskhovrebov's avatar Konstantin Tskhovrebov 🤖

Migrate to AndroidX.

parent 76072986
......@@ -86,27 +86,27 @@ android {
}
dependencies {
val supportLibraryVersion = "28.0.0"
val moxyVersion = "1.5.6"
val moxyVersion = "1.7.0"
val toothpickVersion = "2.1.0"
val retrofitVersion = "2.2.0"
val markwonVersion = "2.0.0"
val glideVersion = "4.8.0"
//Support
implementation("com.android.support:appcompat-v7:$supportLibraryVersion")
implementation("com.android.support:design:$supportLibraryVersion")
implementation("com.android.support:cardview-v7:$supportLibraryVersion")
implementation("com.android.support.constraint:constraint-layout:1.1.3")
implementation("androidx.appcompat:appcompat:1.0.2")
implementation("com.google.android.material:material:1.1.0-alpha06")
implementation("androidx.cardview:cardview:1.0.0")
implementation("androidx.constraintlayout:constraintlayout:1.1.3")
//Kotlin
implementation("org.jetbrains.kotlin:kotlin-stdlib:${extra["kotlinVersion"] as String}")
//Log
implementation("com.jakewharton.timber:timber:4.7.0")
//MVP Moxy
kapt("com.arello-mobile:moxy-compiler:$moxyVersion")
implementation("com.arello-mobile:moxy-app-compat:$moxyVersion")
kapt("tech.schoolhelper:moxy-x-compiler:$moxyVersion")
implementation("tech.schoolhelper:moxy-x:$moxyVersion")
implementation("tech.schoolhelper:moxy-x-androidx:$moxyVersion")
//Cicerone Navigation
implementation("ru.terrakok.cicerone:cicerone:4.0.2")
implementation("ru.terrakok.cicerone:cicerone:5.0.0")
//DI
implementation("com.github.stephanenicolas.toothpick:toothpick-runtime:$toothpickVersion")
kapt("com.github.stephanenicolas.toothpick:toothpick-compiler:$toothpickVersion")
......@@ -122,7 +122,7 @@ dependencies {
implementation("io.reactivex.rxjava2:rxjava:2.2.6")
implementation("com.jakewharton.rxrelay2:rxrelay:2.1.0")
//Adapter simplify
implementation("com.hannesdorfmann:adapterdelegates3:3.1.0")
implementation("com.hannesdorfmann:adapterdelegates4:4.0.0")
//Image load and cache
implementation("com.github.bumptech.glide:glide:$glideVersion")
kapt("com.github.bumptech.glide:compiler:$glideVersion")
......
......@@ -2,7 +2,7 @@ package ru.terrakok.gitlabclient.extension
import android.app.Activity
import android.os.Bundle
import android.support.v4.app.Fragment
import androidx.fragment.app.Fragment
import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty
......
......@@ -7,12 +7,9 @@ import android.content.res.ColorStateList
import android.graphics.Color
import android.graphics.drawable.Drawable
import android.net.Uri
import android.support.annotation.ColorInt
import android.support.annotation.LayoutRes
import android.support.design.widget.Snackbar
import android.support.v4.app.Fragment
import android.support.v4.content.ContextCompat
import android.support.v4.graphics.drawable.DrawableCompat
import android.text.SpannableStringBuilder
import android.text.Spanned
import android.text.style.ForegroundColorSpan
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
......@@ -20,8 +17,14 @@ import android.view.inputmethod.InputMethodManager
import android.webkit.URLUtil
import android.widget.ImageView
import android.widget.TextView
import androidx.annotation.ColorInt
import androidx.annotation.LayoutRes
import androidx.core.content.ContextCompat
import androidx.core.graphics.drawable.DrawableCompat
import androidx.fragment.app.Fragment
import com.bumptech.glide.Glide
import com.bumptech.glide.request.RequestOptions
import com.google.android.material.snackbar.Snackbar
import ru.terrakok.cicerone.Navigator
import ru.terrakok.cicerone.android.support.SupportAppScreen
import ru.terrakok.cicerone.commands.BackTo
......@@ -178,10 +181,16 @@ fun TargetHeader.Public.openInfo(router: FlowRouter) {
fun Fragment.showSnackMessage(message: String) {
view?.let {
val snackbar = Snackbar.make(it, message, Snackbar.LENGTH_LONG)
val messageTextView = snackbar.view.findViewById<TextView>(android.support.design.R.id.snackbar_text)
messageTextView.setTextColor(Color.WHITE)
snackbar.show()
val ssb = SpannableStringBuilder().apply {
append(message)
setSpan(
ForegroundColorSpan(Color.WHITE),
0,
message.length,
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
)
}
Snackbar.make(it, ssb, Snackbar.LENGTH_LONG).show()
}
}
......
......@@ -2,7 +2,7 @@ package ru.terrakok.gitlabclient.extension
import android.content.Context
import android.content.res.Resources
import android.support.annotation.DrawableRes
import androidx.annotation.DrawableRes
import org.threeten.bp.Duration
import org.threeten.bp.LocalDateTime
import org.threeten.bp.format.DateTimeFormatter
......
package ru.terrakok.gitlabclient.ui
import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentTransaction
import android.widget.Toast
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentTransaction
import com.arellomobile.mvp.MvpAppCompatActivity
import io.reactivex.disposables.Disposable
import ru.terrakok.cicerone.Navigator
......
......@@ -3,8 +3,8 @@ package ru.terrakok.gitlabclient.ui.auth
import android.graphics.Bitmap
import android.os.Build
import android.os.Bundle
import android.support.annotation.RequiresApi
import android.webkit.*
import androidx.annotation.RequiresApi
import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter
import kotlinx.android.synthetic.main.fragment_auth.*
......
......@@ -2,12 +2,12 @@ package ru.terrakok.gitlabclient.ui.auth
import android.content.Context
import android.os.Bundle
import android.support.design.widget.BottomSheetDialogFragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.inputmethod.EditorInfo
import android.widget.Toast
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import kotlinx.android.synthetic.main.fragment_custom_server_auth.*
import okhttp3.HttpUrl
import ru.terrakok.gitlabclient.BuildConfig
......@@ -20,7 +20,7 @@ import ru.terrakok.gitlabclient.R
class CustomServerAuthFragment : BottomSheetDialogFragment() {
private lateinit var listener: OnClickListener
override fun onAttach(context: Context?) {
override fun onAttach(context: Context) {
super.onAttach(context)
listener = parentFragment as OnClickListener
}
......
package ru.terrakok.gitlabclient.ui.drawer
import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentTransaction
import android.support.v4.view.GravityCompat
import androidx.core.view.GravityCompat
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentTransaction
import io.reactivex.disposables.Disposable
import kotlinx.android.synthetic.main.drawer_flow_fragment.*
import ru.terrakok.cicerone.Navigator
......
package ru.terrakok.gitlabclient.ui.global
import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentTransaction
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentTransaction
import ru.terrakok.cicerone.Navigator
import ru.terrakok.cicerone.NavigatorHolder
import ru.terrakok.cicerone.Router
......
......@@ -4,7 +4,7 @@ import android.app.AlertDialog
import android.app.Dialog
import android.content.DialogInterface
import android.os.Bundle
import android.support.v4.app.DialogFragment
import androidx.fragment.app.DialogFragment
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.extension.argument
......@@ -42,7 +42,7 @@ class MessageDialogFragment : DialogFragment() {
}
}.create()
override fun onCancel(dialog: DialogInterface?) {
override fun onCancel(dialog: DialogInterface) {
super.onCancel(dialog)
clickListener.dialogCanceled(startTag)
}
......
package ru.terrakok.gitlabclient.ui.global
import android.os.Bundle
import android.support.v4.app.DialogFragment
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.fragment.app.DialogFragment
import ru.terrakok.gitlabclient.R
/**
......
package ru.terrakok.gitlabclient.ui.global.list
import android.support.v7.widget.RecyclerView
import android.view.View
import android.view.ViewGroup
import com.hannesdorfmann.adapterdelegates3.AdapterDelegate
import androidx.recyclerview.widget.RecyclerView
import com.hannesdorfmann.adapterdelegates4.AdapterDelegate
import kotlinx.android.synthetic.main.item_app_library.view.*
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.entity.app.develop.AppLibrary
......
package ru.terrakok.gitlabclient.ui.global.list
import android.support.v7.widget.RecyclerView
import android.view.View
import android.view.ViewGroup
import com.hannesdorfmann.adapterdelegates3.AdapterDelegate
import androidx.recyclerview.widget.RecyclerView
import com.hannesdorfmann.adapterdelegates4.AdapterDelegate
import kotlinx.android.synthetic.main.item_merge_request_commit.view.*
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.entity.app.CommitWithAvatarUrl
......
package ru.terrakok.gitlabclient.ui.global.list
import android.support.v7.widget.RecyclerView
import android.view.View
import android.view.ViewGroup
import com.hannesdorfmann.adapterdelegates3.AdapterDelegate
import androidx.recyclerview.widget.RecyclerView
import com.hannesdorfmann.adapterdelegates4.AdapterDelegate
import kotlinx.android.synthetic.main.item_merge_request_change.view.*
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.entity.mergerequest.MergeRequestChange
......
package ru.terrakok.gitlabclient.ui.global.list
import android.support.v7.widget.RecyclerView
import android.view.View
import android.view.ViewGroup
import com.hannesdorfmann.adapterdelegates3.AdapterDelegate
import androidx.recyclerview.widget.RecyclerView
import com.hannesdorfmann.adapterdelegates4.AdapterDelegate
import kotlinx.android.synthetic.main.item_milestone.view.*
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.entity.milestone.Milestone
......
package ru.terrakok.gitlabclient.ui.global.list
import android.support.v7.widget.RecyclerView
import android.view.View
import android.view.ViewGroup
import com.hannesdorfmann.adapterdelegates3.AdapterDelegate
import androidx.recyclerview.widget.RecyclerView
import com.hannesdorfmann.adapterdelegates4.AdapterDelegate
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.extension.inflate
......
package ru.terrakok.gitlabclient.ui.global.list
import android.support.v7.widget.RecyclerView
import android.view.View
import android.view.ViewGroup
import com.hannesdorfmann.adapterdelegates3.AdapterDelegate
import androidx.recyclerview.widget.RecyclerView
import com.hannesdorfmann.adapterdelegates4.AdapterDelegate
import kotlinx.android.synthetic.main.item_project.view.*
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.entity.Project
......
package ru.terrakok.gitlabclient.ui.global.list
import android.support.v7.widget.RecyclerView
import android.view.View
import android.view.ViewGroup
import com.hannesdorfmann.adapterdelegates3.AdapterDelegate
import androidx.recyclerview.widget.RecyclerView
import com.hannesdorfmann.adapterdelegates4.AdapterDelegate
import kotlinx.android.synthetic.main.item_project_file.view.*
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.entity.RepositoryTreeNodeType
......
......@@ -4,9 +4,9 @@ import android.content.Context
import android.graphics.Canvas
import android.graphics.Paint
import android.graphics.Rect
import android.support.v4.content.ContextCompat
import android.support.v7.widget.RecyclerView
import android.view.View
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import ru.terrakok.gitlabclient.R
/**
......
package ru.terrakok.gitlabclient.ui.global.list
import android.support.v7.widget.RecyclerView
import android.view.View
import android.view.ViewGroup
import com.hannesdorfmann.adapterdelegates3.AdapterDelegate
import androidx.recyclerview.widget.RecyclerView
import com.hannesdorfmann.adapterdelegates4.AdapterDelegate
import kotlinx.android.synthetic.main.item_system_note.view.*
import ru.noties.markwon.Markwon
import ru.terrakok.gitlabclient.R
......
package ru.terrakok.gitlabclient.ui.global.list
import android.support.v7.util.DiffUtil
import android.support.v7.widget.RecyclerView
import com.hannesdorfmann.adapterdelegates3.ListDelegationAdapter
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.RecyclerView
import com.hannesdorfmann.adapterdelegates4.ListDelegationAdapter
import ru.terrakok.gitlabclient.entity.app.CommitWithAvatarUrl
/**
......
package ru.terrakok.gitlabclient.ui.global.list
import ru.terrakok.gitlabclient.R
import android.support.v7.widget.RecyclerView
import android.view.View
import android.view.ViewGroup
import com.hannesdorfmann.adapterdelegates3.AdapterDelegate
import androidx.recyclerview.widget.RecyclerView
import com.hannesdorfmann.adapterdelegates4.AdapterDelegate
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.entity.app.target.TargetHeader
import ru.terrakok.gitlabclient.extension.inflate
......
package ru.terrakok.gitlabclient.ui.global.list
import android.support.v7.widget.RecyclerView
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import com.hannesdorfmann.adapterdelegates3.AdapterDelegate
import androidx.recyclerview.widget.RecyclerView
import com.hannesdorfmann.adapterdelegates4.AdapterDelegate
import kotlinx.android.synthetic.main.item_target_badge.view.*
import kotlinx.android.synthetic.main.item_target_header_public.view.*
import ru.noties.markwon.Markwon
......
package ru.terrakok.gitlabclient.ui.global.list
import android.support.v7.util.DiffUtil
import com.hannesdorfmann.adapterdelegates3.ListDelegationAdapter
import androidx.recyclerview.widget.DiffUtil
import com.hannesdorfmann.adapterdelegates4.ListDelegationAdapter
import ru.terrakok.gitlabclient.presentation.global.NoteWithFormattedBody
class TargetNotesAdapter : ListDelegationAdapter<MutableList<Any>>() {
......
package ru.terrakok.gitlabclient.ui.global.list
import android.support.v7.widget.RecyclerView
import android.view.View
import android.view.ViewGroup
import com.hannesdorfmann.adapterdelegates3.AdapterDelegate
import androidx.recyclerview.widget.RecyclerView
import com.hannesdorfmann.adapterdelegates4.AdapterDelegate
import kotlinx.android.synthetic.main.item_user_note.view.*
import ru.noties.markwon.Markwon
import ru.terrakok.gitlabclient.R
......
package ru.terrakok.gitlabclient.ui.global.view.custom
import android.content.Context
import android.support.constraint.ConstraintLayout
import android.util.AttributeSet
import androidx.constraintlayout.widget.ConstraintLayout
import kotlinx.android.synthetic.main.view_empty.view.*
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.extension.visible
......
package ru.terrakok.gitlabclient.ui.global.view.custom
import android.content.Context
import android.support.constraint.ConstraintLayout
import android.text.Editable
import android.text.TextWatcher
import android.util.AttributeSet
import androidx.constraintlayout.widget.ConstraintLayout
import kotlinx.android.synthetic.main.view_new_note.view.*
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.extension.getTintDrawable
......
package ru.terrakok.gitlabclient.ui.issue
import android.os.Bundle
import android.support.transition.Fade
import android.support.transition.TransitionManager
import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.RecyclerView
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.transition.Fade
import androidx.transition.TransitionManager
import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter
import kotlinx.android.synthetic.main.fragment_issue_notes.*
......
package ru.terrakok.gitlabclient.ui.issue
import android.os.Bundle
import android.support.v4.app.FragmentPagerAdapter
import androidx.fragment.app.FragmentPagerAdapter
import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter
import kotlinx.android.synthetic.main.fragment_main_mr.*
......@@ -53,10 +53,9 @@ class MainIssueFragment : BaseFragment(), IssueView {
}
private inner class IssuePagesAdapter : FragmentPagerAdapter(childFragmentManager) {
override fun getItem(position: Int): BaseFragment? = when (position) {
override fun getItem(position: Int): BaseFragment = when (position) {
0 -> Screens.IssueInfo.fragment
1 -> Screens.IssueNotes.fragment
else -> null
else -> Screens.IssueNotes.fragment
}
override fun getCount() = 2
......
package ru.terrakok.gitlabclient.ui.libraries
import android.os.Bundle
import android.support.v7.widget.LinearLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter
import com.hannesdorfmann.adapterdelegates3.ListDelegationAdapter
import com.hannesdorfmann.adapterdelegates4.ListDelegationAdapter
import kotlinx.android.synthetic.main.fragment_libraries.*
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.di.DI
......
package ru.terrakok.gitlabclient.ui.mergerequest
import android.os.Bundle
import android.support.v4.app.FragmentPagerAdapter
import androidx.fragment.app.FragmentPagerAdapter
import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter
import kotlinx.android.synthetic.main.fragment_main_mr.*
......@@ -53,12 +53,11 @@ class MainMergeRequestFragment : BaseFragment(), MergeRequestView {
}
private inner class MergeRequestPagesAdapter : FragmentPagerAdapter(childFragmentManager) {
override fun getItem(position: Int): BaseFragment? = when (position) {
override fun getItem(position: Int): BaseFragment = when (position) {
0 -> Screens.MergeRequestInfo.fragment
1 -> Screens.MergeRequestCommits.fragment
2 -> Screens.MergeRequestNotes.fragment
3 -> Screens.MergeRequestChanges.fragment
else -> null
else -> Screens.MergeRequestChanges.fragment
}
override fun getCount() = 4
......
package ru.terrakok.gitlabclient.ui.mergerequest
import android.support.v7.util.DiffUtil
import com.hannesdorfmann.adapterdelegates3.ListDelegationAdapter
import androidx.recyclerview.widget.DiffUtil
import com.hannesdorfmann.adapterdelegates4.ListDelegationAdapter
import ru.terrakok.gitlabclient.entity.mergerequest.MergeRequestChange
import ru.terrakok.gitlabclient.ui.global.list.MergeRequestChangeAdapterDelegate
......
package ru.terrakok.gitlabclient.ui.mergerequest
import android.os.Bundle
import android.support.v7.widget.LinearLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter
import kotlinx.android.synthetic.main.layout_base_list.*
......
package ru.terrakok.gitlabclient.ui.mergerequest
import android.os.Bundle
import android.support.v7.widget.LinearLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter
import kotlinx.android.synthetic.main.layout_base_list.*
......
package ru.terrakok.gitlabclient.ui.mergerequest
import android.os.Bundle
import android.support.transition.Fade
import android.support.transition.TransitionManager
import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.RecyclerView
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.transition.Fade
import androidx.transition.TransitionManager
import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter
import kotlinx.android.synthetic.main.fragment_mr_notes.*
......
package ru.terrakok.gitlabclient.ui.my
import android.support.v7.util.DiffUtil
import android.support.v7.widget.RecyclerView
import com.hannesdorfmann.adapterdelegates3.ListDelegationAdapter
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.RecyclerView
import com.hannesdorfmann.adapterdelegates4.ListDelegationAdapter
import ru.terrakok.gitlabclient.entity.app.target.TargetHeader
import ru.terrakok.gitlabclient.ui.global.list.ProgressAdapterDelegate
import ru.terrakok.gitlabclient.ui.global.list.ProgressItem
......
package ru.terrakok.gitlabclient.ui.my.activity
import android.os.Bundle
import android.support.v7.widget.LinearLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter
import kotlinx.android.synthetic.main.fragment_my_activity.*
......
package ru.terrakok.gitlabclient.ui.my.issues
import android.os.Bundle
import android.support.v4.app.FragmentPagerAdapter
import androidx.fragment.app.FragmentPagerAdapter
import kotlinx.android.synthetic.main.fragment_my_issues_container.*
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.Screens
......@@ -71,8 +71,7 @@ class MyIssuesContainerFragment : BaseFragment() {
private inner class MyIssuesPagesAdapter : FragmentPagerAdapter(childFragmentManager) {
override fun getItem(position: Int) = when (position) {
0 -> Screens.MyIssues(true, showOnlyOpened).fragment
1 -> Screens.MyIssues(false, showOnlyOpened).fragment
else -> null
else -> Screens.MyIssues(false, showOnlyOpened).fragment
}
override fun getCount() = 2
......
package ru.terrakok.gitlabclient.ui.my.issues
import android.os.Bundle
import android.support.v7.widget.LinearLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter
import kotlinx.android.synthetic.main.layout_base_list.*
......
package ru.terrakok.gitlabclient.ui.my.mergerequests
import android.os.Bundle
import android.support.v4.app.FragmentPagerAdapter
import androidx.fragment.app.FragmentPagerAdapter
import kotlinx.android.synthetic.main.fragment_my_merge_requests_container.*
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.Screens
......@@ -69,8 +69,7 @@ class MyMergeRequestsContainerFragment : BaseFragment() {
private inner class MyMergeRequestsPagesAdapter : FragmentPagerAdapter(childFragmentManager) {
override fun getItem(position: Int) = when (position) {
0 -> Screens.MyMergeRequests(true, showOnlyOpened).fragment
1 -> Screens.MyMergeRequests(false, showOnlyOpened).fragment
else -> null
else -> Screens.MyMergeRequests(false, showOnlyOpened).fragment
}
override fun getCount() = 2
......
package ru.terrakok.gitlabclient.ui.my.mergerequests
import android.os.Bundle
import android.support.v7.widget.LinearLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter
import kotlinx.android.synthetic.main.layout_base_list.*
......
package ru.terrakok.gitlabclient.ui.my.todos
import android.os.Bundle
import android.support.v4.app.FragmentPagerAdapter
import androidx.fragment.app.FragmentPagerAdapter
import kotlinx.android.synthetic.main.fragment_my_todos_container.*
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.Screens
......@@ -45,8 +45,7 @@ class MyTodosContainerFragment : BaseFragment() {
private inner class MyTodosPagerAdapter : FragmentPagerAdapter(childFragmentManager) {
override fun getItem(position: Int) = when (position) {
0 -> Screens.MyTodos(true).fragment
1 -> Screens.MyTodos(false).fragment
else -> null
else -> Screens.MyTodos(false).fragment
}
override fun getCount() = 2
......
package ru.terrakok.gitlabclient.ui.my.todos
import android.os.Bundle
import android.support.v7.widget.LinearLayoutManager