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

ListView and GridView padding doesn't work in Android platform #1843

Open
brianchu opened this issue Feb 18, 2023 · 1 comment
Open

ListView and GridView padding doesn't work in Android platform #1843

brianchu opened this issue Feb 18, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@brianchu
Copy link

brianchu commented Feb 18, 2023

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

Does padding work in gridView (or listView)?

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

{
                    "_beagleComponent_": "beagle:gridView", (or listview)
                    "direction": "HORIZONTAL",
                    "style": {
                        "backgroundColor": "#0000ff",
                        "padding": {
                            "all": {
                                "value": 40,
                                "type": "REAL"
                            }
                        }
                    }
                    ... the template and other layout
}

Expected Results

Padding should be applied to the inner part of the view.

observed in Android: Nothing happen to the inner part of the view.
observed in React Web: padding was added.
(I don't have iOS but I was told it works)

@brianchu brianchu added the bug Something isn't working label Feb 18, 2023
@Tiagoperes
Copy link
Contributor

Tiagoperes commented Mar 6, 2023

Hello @brianchu. Although this information is nowhere to be found in the documentation, the ListView's style doesn't support padding. I just tested it on iOS and, just like on Android, it doesn't apply padding.

The reason why it works on React Web is because whenever a style property is not directly implemented by the component, Beagle uses it as plain css.

Recommendations:

  • Use padding in the contents of your list view
  • Or, if you don't need to scroll the List View's content, use padding in the parent of the ListView

It would make a lot of sense to have all style properties in the ListView implemented. Unfortunately, we don't have a team dedicated to Beagle at the moment and we must count on the community for implementing new features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants