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

Fix TouchableOpacity visuals #1567

Merged
merged 1 commit into from
Aug 16, 2021
Merged

Conversation

jakub-gonet
Copy link
Member

Description

Fixes #578 (comment)

TouchableOpacity didn't have opacity visuals.

Test plan

import React from 'react';
import { SafeAreaView, Text, Platform } from 'react-native';
import { TouchableOpacity } from 'react-native-gesture-handler';

export default () => {
  return (
    <SafeAreaView style={styles.container}>
      <TouchableOpacity
        style={[styles.rectangle]}
        onPress={() => console.log('Touch', Platform.OS)}>
        <Text>Press me!</Text>
      </TouchableOpacity>
    </SafeAreaView>
  );
};

const styles = {
  container: {
    flex: 1,
    justifyContent: 'center' as const,
    alignItems: 'center' as const,
  },
  rectangle: {
    backgroundColor: 'pink',
    width: 100,
    height: 100,
    alignItems: 'center' as const,
    justifyContent: 'center' as const,
  },
};

@jakub-gonet jakub-gonet self-assigned this Aug 15, 2021
@jakub-gonet jakub-gonet merged commit 0a3a476 into master Aug 16, 2021
@jakub-gonet jakub-gonet deleted the jgonet/fix-touchable-opacity branch August 16, 2021 06:33
fluiddot pushed a commit to wordpress-mobile/react-native-gesture-handler that referenced this pull request Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TouchableOpacity is working in Android?
2 participants