Skip to content

Commit

Permalink
added bottom banner
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-alfresco committed Apr 3, 2024
1 parent e36ac01 commit cebe11f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.alfresco.content.app.activity

import android.os.Bundle
import androidx.lifecycle.lifecycleScope
import androidx.navigation.fragment.NavHostFragment
import com.airbnb.mvrx.MavericksView
import com.alfresco.content.actions.Action
import com.alfresco.content.app.R
import com.alfresco.content.app.databinding.ActivityProcessBinding
import com.alfresco.content.app.widget.ActionBarController
Expand All @@ -19,6 +21,7 @@ class ProcessActivity : BaseActivity(), MavericksView {
binding = ActivityProcessBinding.inflate(layoutInflater)
setContentView(binding.root)
configureNav()
setupActionToasts()
}

private fun configureNav() {
Expand All @@ -35,6 +38,12 @@ class ProcessActivity : BaseActivity(), MavericksView {
actionBarLayout.toolbar.setNavigationOnClickListener { onBackPressed() }
}

private fun setupActionToasts() = Action.showActionToasts(
lifecycleScope,
binding.root,
binding.bottomView,
)

override fun invalidate() {
}
}
7 changes: 7 additions & 0 deletions app/src/main/res/layout/activity_process.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,12 @@
android:layout_height="1dp"
android:background="@android:color/white"
android:backgroundTint="?attr/separatorColor" />
<View
android:id="@+id/bottom_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@android:color/white"
android:backgroundTint="?attr/separatorColor"
android:visibility="visible" />

</LinearLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ class FormViewModel(
observeUploadsJob = repo.observeUploads(observerID, UploadServerType.UPLOAD_TO_PROCESS)
.execute {
if (it is Success) {
println("FormViewModel.observeUploads ${it.invoke()}")
updateUploads(it())
} else {
this
Expand Down

0 comments on commit cebe11f

Please sign in to comment.