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

Singal selction radio group #5

Merged
merged 27 commits into from
May 1, 2024
Merged

Conversation

MalaRuparel2023
Copy link
Collaborator

  1. Added SingleLineRadioGroup, MultiLineRadioGroup, and RowItemRadioGroup classes to handle single selection radio group functionality.
  2. Implemented logic to dynamically add single selection radio groups to the provided root view based on the specified parameters.
  3. Updated the SmartFilter object to include the addSingleSelection method, which accepts SingleSelectionParams and creates the appropriate type of single selection radio group based on the provided parameters.

@MalaRuparel2023 MalaRuparel2023 self-assigned this Apr 23, 2024
@MalaRuparel2023 MalaRuparel2023 added the enhancement New feature or request label Apr 23, 2024
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)

SmartFilter.addSingleSelection(addRadioGroupSingleLineVertical(binding.root, this))
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can direct use our classes here so user don't need to check inside of extension functions. And even in readme we can mention that snippet directly so user will have clarity on the usage part of our class.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But you mentioned to do this SmartFilter.addSingleSelection


if (this.orientation == VERTICAL) {
if (containerHorizontalScrollView.parent != null) {
removeView(containerHorizontalScrollView)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Object creation for containerHorizontalScrollView and containerScrollView can be placed after condition of orientation.

So in that case we do not need to remove view after creating.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I need both object in setupView() which is called in init() so we can decrease the little amount of drawing time

const val HORIZONTAL = 0
const val NONE = 2
}
enum class ChipType {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We'll discuss purpose of all these chip types when it's completed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

okay

Copy link
Collaborator

@amitsid1408 amitsid1408 left a comment

Choose a reason for hiding this comment

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

Pointed out some things which can be improved and updated.
Let me know if you need my help for resolving it.

Copy link
Collaborator

@amitsid1408 amitsid1408 left a comment

Choose a reason for hiding this comment

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

Looks good to me. Merging this PR and deleting branch.

@amitsid1408 amitsid1408 merged commit d4d2390 into development May 1, 2024
2 checks passed
@amitsid1408 amitsid1408 deleted the singal_selction_radio_group branch May 1, 2024 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants