Skip to content

Commit

Permalink
[FEAT] subItem viewType 추가 로직 구현(#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
915dbfl committed Jan 8, 2024
1 parent 2d4d2a3 commit b41c490
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import com.lgtm.android.common_ui.R
import com.lgtm.android.common_ui.databinding.ItemSduiCloserBinding
import com.lgtm.android.common_ui.databinding.ItemSduiEmptyBinding
import com.lgtm.android.common_ui.databinding.ItemSduiItemBinding
import com.lgtm.android.common_ui.databinding.ItemSduiSubItemBinding
import com.lgtm.android.common_ui.databinding.ItemSduiTitleBinding
import com.lgtm.android.common_ui.databinding.ItemSduiUnknownBinding
import com.lgtm.domain.server_drive_ui.SduiViewType
Expand All @@ -24,6 +25,7 @@ fun getSduiViewHolder(parent: ViewGroup, viewType: SduiViewType): SduiBaseHolder
SduiViewType.ITEM -> SduiItemViewHolder(binding as ItemSduiItemBinding)
SduiViewType.CLOSER -> SduiCloserViewHolder(binding as ItemSduiCloserBinding)
SduiViewType.EMPTY -> SduiEmptyViewHolder(binding as ItemSduiEmptyBinding)
SduiViewType.SUBITEM -> SduiSubItemViewHolder(binding as ItemSduiSubItemBinding)
SduiViewType.UNKNOWN -> SduiUnknownViewHolder(binding as ItemSduiUnknownBinding)
}
}
Expand All @@ -34,6 +36,7 @@ private fun getLayoutByViewType(viewType: SduiViewType): Int {
SduiViewType.ITEM -> R.layout.item_sdui_item
SduiViewType.CLOSER -> R.layout.item_sdui_closer
SduiViewType.EMPTY -> R.layout.item_sdui_empty
SduiViewType.SUBITEM -> R.layout.item_sdui_sub_item
SduiViewType.UNKNOWN -> R.layout.item_sdui_unknown
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ enum class SduiViewType(
EMPTY("empty", SectionEmptyVO::class.java),
CLOSER("sectionCloser", SectionCloserVO::class.java),
ITEM("sectionItem", SectionItemVO::class.java),
SUBITEM("sectionSubItem", SectionSubItemVO::class.java),
UNKNOWN("sectionUnknown", SectionUnknownVO::class.java);

companion object {
Expand Down

0 comments on commit b41c490

Please sign in to comment.