Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi selction chip group #8

Merged
merged 72 commits into from
May 9, 2024
Merged

Conversation

MalaRuparel2023
Copy link
Collaborator

Features:

  • Supports setting up a group of multi-selection chips.
  • Offers various chip types, including entry chips, filter chips, and action chips.
  • Allows customization of chip backgrounds and text colors.
  • Provides callbacks for handling chip selection events.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check file name standards.

val typedArray = context.theme.obtainStyledAttributes(attrs, R.styleable.SingleLineChipGroup, 0, 0)
try {
orientation = typedArray.getInt(R.styleable.SingleLineChipGroup_cg_sl_orientation, Orientation.VERTICAL)
chipBGColor = typedArray.getColorStateList(R.styleable.SingleLineChipGroup_cg_sl_background)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default color should be set here while we fetch color using style.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applySelector() will execute

try {
orientation = typedArray.getInt(R.styleable.SingleLineChipGroup_cg_sl_orientation, Orientation.VERTICAL)
chipBGColor = typedArray.getColorStateList(R.styleable.SingleLineChipGroup_cg_sl_background)
chipTextColor = typedArray.getColorStateList(R.styleable.SingleLineChipGroup_cg_sl_textselector)
Copy link
Collaborator

@sagarsmartsense sagarsmartsense May 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default color should be set here while we fetch color using style. Also, check in other classes for the same.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applySelector() will execute

}
}

private fun addRadioButtonView(data: RadioGroupData?) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we define variable as nullable when we are already passing not nullable data in function?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File name should be Params

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="item_title">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Give the name "itemTitleStyle". Because you already created the below styles name like that. So that it makes consistent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Collaborator

@sagarsmartsense sagarsmartsense left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check my comments.

@MalaRuparel2023 MalaRuparel2023 changed the base branch from master to development May 9, 2024 09:31
# Conflicts:
#	.idea/.gitignore
#	app/src/main/java/com/ss/smartfilter/MainActivity.kt
#	app/src/main/java/com/ss/smartfilter/Utils.kt
#	ss-smart-filter/src/main/java/com/ss/smartfilterlib/SmartFilter.kt
#	ss-smart-filter/src/main/java/com/ss/smartfilterlib/singlechoice/radiogroup/MultiLineRadioGroup.kt
#	ss-smart-filter/src/main/java/com/ss/smartfilterlib/singlechoice/radiogroup/RowItemRadioGroup.kt
#	ss-smart-filter/src/main/java/com/ss/smartfilterlib/singlechoice/radiogroup/SingleLineRadioGroup.kt
#	ss-smart-filter/src/main/res/color/single_text_color_selector.xml
#	ss-smart-filter/src/main/res/drawable/multiline_default.xml
#	ss-smart-filter/src/main/res/drawable/singleline_rb_selector.xml
#	ss-smart-filter/src/main/res/values/attrs.xml
#	ss-smart-filter/src/main/res/values/colors.xml
#	ss-smart-filter/src/main/res/values/strings.xml
#	ss-smart-filter/src/main/res/values/themes.xml
@MalaRuparel2023 MalaRuparel2023 self-assigned this May 9, 2024
@sagarsmartsense sagarsmartsense merged commit 6a58b72 into development May 9, 2024
2 checks passed
@sagarsmartsense sagarsmartsense deleted the multi_selction_chip_group branch May 17, 2024 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants