-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
MalaRuparel2023
commented
Apr 23, 2024
- Added SingleLineRadioGroup, MultiLineRadioGroup, and RowItemRadioGroup classes to handle single selection radio group functionality.
- Implemented logic to dynamically add single selection radio groups to the provided root view based on the specified parameters.
- 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.
binding = ActivityMainBinding.inflate(layoutInflater) | ||
setContentView(binding.root) | ||
|
||
SmartFilter.addSingleSelection(addRadioGroupSingleLineVertical(binding.root, this)) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
...r/src/main/java/com/ss/smartfilterlib/singalchoice/radiogroup/callback/RadioGroupCallback.kt
Outdated
Show resolved
Hide resolved
|
||
if (this.orientation == VERTICAL) { | ||
if (containerHorizontalScrollView.parent != null) { | ||
removeView(containerHorizontalScrollView) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
...t-filter/src/main/java/com/ss/smartfilterlib/singalchoice/radiogroup/SingleLineRadioGroup.kt
Outdated
Show resolved
Hide resolved
ss-smart-filter/src/main/java/com/ss/smartfilterlib/singalchoice/util/SingleSelectionParams.kt
Outdated
Show resolved
Hide resolved
const val HORIZONTAL = 0 | ||
const val NONE = 2 | ||
} | ||
enum class ChipType { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay
There was a problem hiding this 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.
…o singal_selction_radio_group # Conflicts: # .idea/.gitignore # README.md
There was a problem hiding this 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.