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

unable to scroll in scrollView in Android #29696

Closed
johnneuland opened this issue Aug 19, 2020 · 7 comments
Closed

unable to scroll in scrollView in Android #29696

johnneuland opened this issue Aug 19, 2020 · 7 comments
Labels
Component: ScrollView Needs: Triage 🔍 Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@johnneuland
Copy link

Description

I have a screen where I type in the input field and get search results accordingly. The list is rendered within a ScrollView but it still doesn't let me scroll when the keypad is open (in Android ). In iOS, it works fine.

I tried adding height: 80% to dropdown, it's parent container view. This makes it possible to scroll a bit. However, when the keypad is open I can scroll but not till the end of the list. If I add height: 100%, I am not able to scroll at all. I am already using flex:1in the scroll view as well as the parent view.

React Native version:

3.0.4

Steps To Reproduce

  return (
    <>
      {addressesFound.length > 0 ? (
        <ScrollView
          style={styles.searchResultsContainer}
          keyboardShouldPersistTaps={'always'}
          keyboardDismissMode={'on-drag'}>
          {addressesFound.map((addressDetails: addressDetailsType) => {
            return (
              <View
                key={addressDetails.placeName}
                style={styles.resultContainer}>
                <Text
                  style={styles.text}>
                  {addressDetails.placeName}
                </Text>
              </View>
            );
          })}
        </ScrollView>
      ) : null}
    </>
  );
};
const styles = StyleSheet.create({
  searchResultsContainer: {
    width: moderateScale(400),
    paddingHorizontal: moderateScale(50),
    paddingRight: moderateScale(65),
    marginTop: moderateScale(10),
   flex:1,
  },
  resultContainer: {
    marginTop: moderateScale(10),
    borderBottomWidth: 1,
    borderBottomColor: 'grey',
  },
  text: {
    fontSize: moderateScale(15),
  },
});

This is where the above mentioned component is called:

 <View style={styles.dropdown}>
          <LocationsFound
            addressesFound={locations.addressesFoundList} />
....
  dropdown: {
    position: 'absolute',
    top: moderateScale(215),
    zIndex: moderateScale(10),
    backgroundColor: '#fff',
    flex: 1,
  },

Expected Results

I should be able to scroll in Android too, till the end of the list when the keypad is open.

Snack, code example, screenshot, or link to a repository:

new

@danielhusar
Copy link

I have similar issue.
It only appear when ScrollView is in the tree that has position absolute.

@stale
Copy link

stale bot commented Dec 25, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Dec 25, 2020
@Ikalli
Copy link

Ikalli commented Oct 7, 2022

Any solution?
Still same problem with position: absolute ScrollView.

@kmarple1
Copy link

kmarple1 commented Nov 28, 2022

Having the same issue with position: absolute in react-native v0.66.4. Any workarounds?

@github-actions github-actions bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Jun 29, 2023
@Abhishek2250
Copy link

I'm also facing the same issue on android. Any solution?

Copy link

github-actions bot commented Jan 4, 2024

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 4, 2024
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: ScrollView Needs: Triage 🔍 Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

6 participants