Skip to content

Commit

Permalink
fix: build failure + ui epoxy fix
Browse files Browse the repository at this point in the history
Signed-off-by: Shivansh Saini <shivanshs9@gmail.com>
  • Loading branch information
shivanshs9 committed Dec 18, 2020
1 parent 07cc805 commit 27672cb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class ManagerStatsFragment : BaseFragment() {
handleLoadingRefresh(input)
if (input.status === Resource.Status.SUCCESS && input.data != null) {
setupData(input.data)
epoxyRvMenuAnalysis.requestModelBuild()
}
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import java.util.*
@EpoxyModelClass(layout = R.layout.item_menu_analysis_group_revenue)
abstract class StatsMenuAnalysisGroupRevenue : EpoxyModelWithHolder<StatsMenuAnalysisGroupRevenue.Holder>() {
@EpoxyAttribute
internal lateinit var data: ManagerStatsModel.GroupRevenue
lateinit var data: ManagerStatsModel.GroupRevenue

@EpoxyAttribute
internal var index: Int = 0
var index: Int = 0

override fun bind(holder: Holder) = holder.bindData(index to data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import java.util.*
@EpoxyModelClass(layout = R.layout.item_menu_analysis_item_revenue)
abstract class StatsMenuAnalysisItemRevenue : EpoxyModelWithHolder<StatsMenuAnalysisItemRevenue.Holder>() {
@EpoxyAttribute
internal lateinit var data: ManagerStatsModel.ItemRevenue
lateinit var data: ManagerStatsModel.ItemRevenue

override fun bind(holder: Holder) = holder.bindData(data)

Expand Down
23 changes: 14 additions & 9 deletions app/src/main/res/layout/fragment_shop_manager_statistics.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="@dimen/spacing_small"
android:paddingBottom="@dimen/spacing_small">
android:layout_height="wrap_content">

<TextView
android:id="@+id/title_manager_stats"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_tiny"
android:layout_marginTop="@dimen/spacing_normal"
android:fontFamily="@font/josefinsans_bold"
android:paddingStart="@dimen/spacing_large"
android:paddingEnd="@dimen/spacing_large"
Expand Down Expand Up @@ -290,17 +288,24 @@
app:layout_constraintStart_toStartOf="@id/heading_manager_stats_revenuereport"
app:layout_constraintTop_toBottomOf="@id/cv_manager_analysis" />

<com.airbnb.epoxy.EpoxyRecyclerView
android:id="@+id/epoxy_rv_manager_stats_menu_analysis"
<androidx.cardview.widget.CardView
android:id="@+id/cv_manager_menuanalysis"
style="@style/WhiteCardStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_tiny"
android:background="@drawable/bordered_card_white"
android:layout_marginBottom="@dimen/spacing_small"
android:padding="@dimen/spacing_small"
app:layout_constraintEnd_toEndOf="@id/heading_manager_stats_menuanalysis"
app:layout_constraintStart_toStartOf="@id/heading_manager_stats_menuanalysis"
app:layout_constraintTop_toBottomOf="@id/heading_manager_stats_menuanalysis" />
app:layout_constraintTop_toBottomOf="@id/heading_manager_stats_menuanalysis">

<com.airbnb.epoxy.EpoxyRecyclerView
android:id="@+id/epoxy_rv_manager_stats_menu_analysis"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:overScrollMode="never" />
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

0 comments on commit 27672cb

Please sign in to comment.