Commit 48f2c6ff authored by Eugene Shapovalov's avatar Eugene Shapovalov 💬

Merge remote-tracking branch...

Merge remote-tracking branch 'remotes/origin/feature/move_project_labels_milestones_to_tab' into feature/move_project_milestones_to_tab

# Conflicts:
#	app/src/main/java/ru/terrakok/gitlabclient/presentation/project/ProjectPresenter.kt
#	app/src/main/java/ru/terrakok/gitlabclient/ui/project/MainProjectFragment.kt
#	app/src/main/java/ru/terrakok/gitlabclient/ui/project/info/ProjectInfoContainerFragment.kt
#	app/src/main/res/menu/project_menu.xml
parents 487dd396 83f91387
......@@ -39,7 +39,5 @@ class ProjectPresenter @Inject constructor(
fun onBackPressed() = flowRouter.exit()
fun onLabelPressed() = flowRouter.navigateTo(Screens.ProjectLabels)
fun onFilesPressed() = flowRouter.navigateTo(Screens.ProjectFiles)
}
\ No newline at end of file
......@@ -43,7 +43,6 @@ class MainProjectFragment : BaseFragment(), ProjectView {
setOnMenuItemClickListener { item ->
when (item.itemId) {
R.id.shareAction -> shareText(shareUrl)
R.id.labelAction -> presenter.onLabelPressed()
R.id.filesAction -> presenter.onFilesPressed()
}
true
......
......@@ -37,15 +37,17 @@ class ProjectInfoContainerFragment : BaseFragment() {
override fun getItem(position: Int): BaseFragment = when (position) {
0 -> Screens.ProjectInfo.fragment
1 -> Screens.ProjectEvents.fragment
2 -> Screens.ProjectLabels.fragment
else -> Screens.ProjectMilestones.fragment
}
override fun getCount() = 3
override fun getCount() = 4
override fun getPageTitle(position: Int) = when (position) {
0 -> getString(R.string.project_info)
1 -> getString(R.string.project_events)
2 -> getString(R.string.project_milestones)
2 -> getString(R.string.project_labels)
3 -> getString(R.string.project_milestones)
else -> null
}
}
......
......@@ -4,7 +4,6 @@ import android.os.Bundle
import androidx.recyclerview.widget.LinearLayoutManager
import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter
import kotlinx.android.synthetic.main.fragment_project_labels.*
import kotlinx.android.synthetic.main.layout_base_list.*
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.entity.Label
......@@ -38,7 +37,6 @@ class ProjectLabelsFragment : BaseFragment(), ProjectLabelsView {
adapter = this@ProjectLabelsFragment.adapter
}
toolbar.setNavigationOnClickListener { onBackPressed() }
swipeToRefresh.setOnRefreshListener { presenter.refreshProjectLabels() }
emptyView.setRefreshListener { presenter.refreshProjectLabels() }
}
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
......@@ -12,7 +13,8 @@
<com.google.android.material.tabs.TabLayout
style="@style/ToolbarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
app:tabMode="scrollable" />
</androidx.viewpager.widget.ViewPager>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
style="@style/ToolbarStyle"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:navigationIcon="@drawable/ic_arrow_back_24dp"
app:title="@string/project_labels" />
android:layout_height="match_parent">
<include layout="@layout/layout_base_list" />
</LinearLayout>
\ No newline at end of file
</FrameLayout>
\ No newline at end of file
......@@ -14,11 +14,4 @@
android:title="@string/project_files"
app:showAsAction="ifRoom" />
<item
android:id="@+id/labelAction"
android:icon="@drawable/ic_labels"
android:title="@string/project_labels"
app:iconTint="@android:color/white"
app:showAsAction="ifRoom" />
</menu>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment