Skip to content

Commit

Permalink
changes data from app and refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
MalaRuparel2023 committed May 22, 2024
1 parent 830cae0 commit c85d683
Show file tree
Hide file tree
Showing 50 changed files with 473 additions and 306 deletions.
205 changes: 156 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,112 +50,219 @@ The library depends on the following libraries:
- **Verticle**


SmartFilter.addRadioGroupSingleSelection {
addRadioGroupSingleLineVertical(binding.root) { radioGroupData ->
toast("name: ${radioGroupData.name} ") }}
SmartFilter.addRadioGroupSingleSelection {
addRadioGroupSingleLineVertical(binding.root) { radioGroupData ->
toast("name: ${radioGroupData.name} ") }}

Or

<com.ss.smartfilterlib.singleselection.SingleSelectionRadioGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
app:rg_sl_list_item="@array/array_android_version"
app:rg_sl_background="@drawable/rb_selector"
app:rg_sl_text_color="@color/text_selector"
app:rg_sl_orientation="1"/>

- **Horizontal**


SmartFilter.addRadioGroupSingleSelection {
SmartFilter.addRadioGroupSingleSelection {
addRadioGroupSingleLineHorizontal(binding.root) { radioGroupData ->
toast("name: ${radioGroupData.name} ") } }
toast("name: ${radioGroupData.name} ") } }

Or

<com.ss.smartfilterlib.singleselection.SingleSelectionRadioGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
app:rg_sl_list_item="@array/array_android_version"
app:rg_sl_background="@drawable/rb_selector"
app:rg_sl_text_color="@color/text_selector"
app:rg_sl_orientation="0"/>


### SingleSelectionMultiLine(MultiRaw)

SmartFilter.addRadioMultiRawSingleSelection {
addRadioMultiRow(binding.root) { radioGroupData ->
toast("name: ${radioGroupData.name} ") } }
### SingleSelectionMultiLine(MultiRaw)

SmartFilter.addRadioMultiRawSingleSelection {
addRadioButtonMultiRow(binding.root) { radioGroupData ->
toast("name: ${radioGroupData.name} ") } }

OR

<com.ss.smartfilterlib.singleselection.SingleSelectionMultiLineRadioButton
android:layout_width="match_parent"
android:layout_height="match_parent"
app:rg_ml_list_item="@array/array_android_version"
app:rg_ml_background="@drawable/multiline_bg_selector"
app:rg_ml_text_selector="@color/multiline_text_selector"/>

### SingleSelectionRowItem(Verticle/Horizontal)

- **Verticle**

SmartFilter.addRadioRawItemSingleSelection {
addRadioGroupRowItemVertical(binding.root) { radioGroupData ->
toast("name: ${radioGroupData.name} ") } }


SmartFilter.addRadioRawItemSingleSelection {
addRadioGroupRowItemVertical(binding.root) { radioGroupData ->
toast("name: ${radioGroupData.name} ") } }

- **Horizontal**
Or

SmartFilter.addRadioRawItemSingleSelection {
addRadioGroupRowItemHorizontal(binding.root) { radioGroupData ->
toast("name: ${radioGroupData.name} ") } }
<com.ss.smartfilterlib.singleselection.SingleSelectionItemRadioGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
app:rg_ri_list_item="@array/array_android_version"
app:rg_ri_orientation="1"
app:rg_ri_text_selector="@color/text_selector"/>

- **Horizontal**

SmartFilter.addRadioRawItemSingleSelection {
addRadioGroupRowItemHorizontal(binding.root) { radioGroupData ->
toast("name: ${radioGroupData.name} ") } }

Or

<com.ss.smartfilterlib.singleselection.SingleSelectionItemRadioGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
app:rg_ri_list_item="@array/array_android_version"
app:rg_ri_orientation="1"
app:rg_ri_text_selector="@color/text_selector"/>

### SingleSelectionChipGroup((Verticle/Horizontal))

SmartFilter.addChipGroupSingleSelection {
addSingleSelectionChipGroupVertical(binding.root) { radioGroupData ->
toast("name: ${radioGroupData.name} ") } }
SmartFilter.addChipGroupSingleSelection {
addSingleSelectionChipGroupVertical(binding.root) { radioGroupData ->
toast("name: ${radioGroupData.name} ") } }
Or

<com.ss.smartfilterlib.singleselection.SingleSelectionChipGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cg_sl_orientation="1"
app:cg_sl_background="@color/chip_bg_selector"
app:cg_sl_list_item="@array/array_android_version"
app:cg_sl_text_selector="@color/chip_text_selector" />

- **Horizontal**

SmartFilter.addChipGroupSingleSelection {
addSingleSelectionChipGroupHorizontal(binding.root) { radioGroupData ->
SmartFilter.addChipGroupSingleSelection {
addSingleSelectionChipGroupHorizontal(binding.root) { radioGroupData ->
toast("name: ${radioGroupData.name} ") } }

Or
<com.ss.smartfilterlib.singleselection.SingleSelectionChipGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cg_sl_orientation="0"
app:cg_sl_background="@color/chip_bg_selector"
app:cg_sl_list_item="@array/array_android_version"
app:cg_sl_text_selector="@color/chip_text_selector" />

### MultiSelectionChipGroup(MultiRaw - (Verticle/Horizontal))

- **Verticle**

SmartFilter.addChipGroupMultiSelection {
addMultiSelectionChipGroupVertical(binding.root) { radioGroupData ->
toast("Checked IDs: ${radioGroupData.joinToString(", ")}") } }
- **Horizontal**
SmartFilter.addChipGroupMultiSelection {
addMultiSelectionChipGroupVertical(binding.root) { radioGroupData ->
toast("Checked IDs: ${radioGroupData.joinToString(", ")}") } }

Or

<com.ss.smartfilterlib.multiselection.MultiselectionChipGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cg_sl_orientation="1"
app:cg_sl_background="@color/chip_bg_selector"
app:cg_sl_list_item="@array/array_android_version"
app:cg_sl_text_selector="@color/chip_text_selector" />

SmartFilter.addChipGroupMultiSelection {
addMultiSelectionChipGroupHorizontal(binding.root) { radioGroupData ->
toast("Checked IDs: ${radioGroupData.joinToString(", ")}")}}
- **Horizontal**

SmartFilter.addChipGroupMultiSelection {
addMultiSelectionChipGroupHorizontal(binding.root) { radioGroupData ->
toast("Checked IDs: ${radioGroupData.joinToString(", ")}")}}

Or

<com.ss.smartfilterlib.multiselection.MultiselectionChipGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cg_sl_orientation="1"
app:cg_sl_background="@color/chip_bg_selector"
app:cg_sl_list_item="@array/array_android_version"
app:cg_sl_text_selector="@color/chip_text_selector" />

### SingleSelectionListView((Verticle/Horizontal))

- **Verticle**

SmartFilter.addListViewSingleSelection {
addSingleSelectionListVertical(binding.root) { radioGroupData ->
toast("name: " + radioGroupData.name) } }

- **Horizontal**

SmartFilter.addListViewSingleSelection {
addSingleSelectionListHorizontal(binding.root) { radioGroupData ->
SmartFilter.addListViewSingleSelection {
addSingleSelectionListVertical(binding.root) { radioGroupData ->
toast("name: " + radioGroupData.name) } }

OR
<com.ss.smartfilterlib.singleselection.SingleSelectionListView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ss_orientation="1"
app:ss_checked_selector="@drawable/multiline_bg_selector"
app:ss_list_item="@array/array_android_version"
app:ss_text_selector="@color/chip_text_selector" />
- **Horizontal**

SmartFilter.addListViewSingleSelection {
addSingleSelectionListHorizontal(binding.root) { radioGroupData ->
toast("name: " + radioGroupData.name) } }

OR

<com.ss.smartfilterlib.singleselection.SingleSelectionListView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ss_orientation="0"
app:ss_checked_selector="@drawable/multiline_bg_selector"
app:ss_list_item="@array/array_android_version"
app:ss_text_selector="@color/chip_text_selector" />

### MultiSelectionListView((Verticle/Horizontal))

- **Verticle**

SmartFilter.addListViewMultiSelection{
addMultiSelectionListVertical(binding.root) { radioGroupData ->
toast("name: " + radioGroupData) } }


SmartFilter.addListViewMultiSelection{
addMultiSelectionListVertical(binding.root) { radioGroupData ->
toast("name: " + radioGroupData) } }
OR

<com.ss.smartfilterlib.multiselection.MultiSelectionListView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ss_orientation="1"
app:ss_checked_selector="@drawable/multiline_bg_selector"
app:ss_list_item="@array/array_android_version"
app:ss_text_selector="@color/chip_text_selector" />

- **Horizontal**

SmartFilter.addListViewMultiSelection{
addMultiSelectionListHorizontal(binding.root) { radioGroupData ->
toast("name: " + radioGroupData) } }
SmartFilter.addListViewMultiSelection{
addMultiSelectionListHorizontal(binding.root) { radioGroupData ->
toast("name: " + radioGroupData) } }

OR

<com.ss.smartfilterlib.multiselection.MultiSelectionListView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ss_orientation="1"
app:ss_checked_selector="@drawable/multiline_bg_selector"
app:ss_list_item="@array/array_android_version"
app:ss_text_selector="@color/chip_text_selector" />


<img src="media/test1.png" width="250" /> <img src="media/test2.png" width="250" />
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/java/com/ss/smartfilter/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ package com.ss.smartfilter
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import com.ss.smartfilter.databinding.ActivityMainBinding
import com.ss.smartfilter.screens.FilterScreen
import com.ss.smartfilterlib.SmartFilter
import com.ss.smartfilterlib.utils.toast


class MainActivity : ComponentActivity() {

private lateinit var binding: ActivityMainBinding

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Expand Down
Loading

0 comments on commit c85d683

Please sign in to comment.