beeware / beeware/toga

Android Table does not scroll horizontally

Open
#2,191 11 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
5.4k
Forks
827
Avg merge
9h 45m
Merged PRs (30d)
58

Description

### Describe the bug

Since the horizontal scrollview has been removed from the Android implementation of Table, it is not possible anymore to make the table scroll horizontally.

I tried to add the Table into a ScrollContainer, but the horizontal scrolling was still not working.

I then put the Table into a Box along with a very long Label. Then, the window did scroll horizontally, but I did not see more of the Table content than before. All the Table content to the right did not move into view.

```
_scroller = toga.ScrollContainer(horizontal=True, vertical=False, style=Pack(flex=1))
_scrolling_box = toga.Box(style=Pack(flex=1, direction=COLUMN))
_scrolling_box.add(toga.Label("fdskjfdksfjdkls fjdks fjdklsfjdkls fjdklsfjdklsfjdsfjklds fjklds jfdkls fjklds fjdsfjfklsd fjs fkdsf dsjf dskl kfsd jdkls fjdsklf jdsklfjsfljlsk"))
self._table = toga.Table(
headings=[
_("app.Table.name"),
_("app.Table.systemApp"),
_("app.Table.version"),
_("app.Table.versionCode"),
_("app.Table.location"),
_("app.Table.packageName"),
],
accessors=["appName", "systemApp", "appVersion", "appVersionCode", "appLocation", "appPackageName"],
missing_value="",
style=Pack(flex=1, font_size=G.config["font_size"]),
)
_scrolling_box.add(self._table)
_scrolling_box.add(toga.Label("fdskjfdksfjdkls fjdks fjdklsfjdkls fjdklsfjdklsfjdsfjklds fjklds jfdkls fjklds fjdsfjfklsd fjs fdks fjkdls jfdkls fjdkls fjdkls fjdkls fjds fj"))
_scroller.content = _scrolling_box
self.main_box.add(_scroller)
```

### Steps to reproduce

1. add a Table to a ScrollContainer with horizontal=True
2. add a lot of colums, so the Table content becomes wider than the screen width
3. try to scroll horizontally

### Expected behavior

It is possbile to scroll the Table content horizontally

### Screenshots

![image](https://github.com/beeware/toga/assets/8982757/e374aab8-73ac-43d4-bfc9-db53b6fbfad1)

![image](https://github.com/beeware/toga/assets/8982757/844c9e4a-4a08-470e-896e-72f275d1cbbe)

![image](https://github.com/beeware/toga/assets/8982757/6e4ecfcf-0b44-4160-b5bc-a48ce3cd2b1e)

![image](https://github.com/beeware/toga/assets/8982757/9f2769c0-8ddf-4924-9273-a627a4630ad4)

### Environment

- Operating System: Android 13
- Python version: 3.9
- Software versions:
- Briefcase: 0.3.15
- toga: 0.3.2.dev1367+g9021f9106

### Logs

```

```

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the Android Table implementation and reproduce the issue using a Table with more columns than the screen inside a horizontal ScrollContainer. Done means the table's off-screen columns can be brought into view horizontally on Android, with the existing reproduction steps passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, python
Domain
frontend, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.