-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LH-112] Change detail profile to Activity and linked #16
- Loading branch information
1 parent
28fba1a
commit 6691522
Showing
11 changed files
with
610 additions
and
98 deletions.
There are no files selected for viewing
19 changes: 0 additions & 19 deletions
19
common-ui/src/main/java/com/lighthouse/android/common_ui/base/BaseActivity.kt
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
common-ui/src/main/java/com/lighthouse/android/common_ui/base/BaseFragment.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
feature/home/src/main/java/com/lighthouse/android/home/util/UiState.kt
This file was deleted.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
feature/profile/src/main/java/com/lighthouse/profile/adapter/ProfileAdapter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.lighthouse.profile.adapter | ||
|
||
import android.view.LayoutInflater | ||
import com.google.android.material.chip.Chip | ||
import com.lighthouse.android.common_ui.base.adapter.ItemDiffCallBack | ||
import com.lighthouse.android.common_ui.base.adapter.SimpleListAdapter | ||
import com.lighthouse.domain.response.vo.InterestVO | ||
import com.lighthouse.profile.R | ||
import com.lighthouse.profile.databinding.InterestTileBinding | ||
|
||
fun makeAdapter() = | ||
SimpleListAdapter<InterestVO, InterestTileBinding>( | ||
diffCallBack = ItemDiffCallBack( | ||
onContentsTheSame = { old, new -> old == new }, | ||
onItemsTheSame = { old, new -> old.interest == new.interest } | ||
), | ||
layoutId = R.layout.interest_tile, | ||
onBindCallback = { viewHolder, item -> | ||
val binding = viewHolder.binding | ||
binding.tvInterestTitle.text = item.category | ||
|
||
val inflator = LayoutInflater.from(binding.root.context) | ||
item.interest.forEach { | ||
val chip = inflator.inflate( | ||
com.lighthouse.android.common_ui.R.layout.chip, | ||
binding.chipInterest, | ||
false | ||
) as Chip | ||
|
||
chip.text = it | ||
chip.isCloseIconVisible = false | ||
chip.isCheckable = false | ||
|
||
binding.chipInterest.addView(chip) | ||
} | ||
|
||
} | ||
) |
Oops, something went wrong.