folofse / androw

Shadows in React Native for Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TouchableOpacity not working

ydv0121 opened this issue · comments

hello,

i want to set shadow at the bottom of the header only, but can't able to set
i am using Native-Base's header component
please see attachment what i exactly want

Screenshot 2019-05-08 at 2 58 03 PM

is there any solution?

I made a simple test and it worked, so I'm not sure what problem you experiencing.

import React, { Component } from "react";
import {StyleSheet} from "react-native";
import { Container, Header, Left, Body, Right, Button, Icon, Title } from "native-base";

import Androw from 'react-native-androw';

export default class App extends Component {
	render() {
		return (
			<Container>
				<Androw style={styles.shadow}>
					<Header>
						<Left>
							<Button transparent>
								<Icon name='arrow-back' />
							</Button>
						</Left>
						<Body>
							<Title>Header</Title>
						</Body>
						<Right>
							<Button transparent>
								<Icon name='menu' />
							</Button>
						</Right>
					</Header>
				</Androw>
			</Container>
		);
	}
}
const styles = StyleSheet.create({
	shadow: {
		shadowColor: "#0000ff",
		shadowOpacity: .3,
		shadowRadius: 20,
		shadowOffset: {
			width: 0,
			height: 20,
		}
	}
});

Screenshot_1557393214

yes it's worked..
actually i used header as a componet that's why i had some problem..
it's worked

can you please check TouchableOpacity is not working inside

when we use
here is my piece of code

<Androw style={Platform.OS == 'android'?styles.shadowHeader:{zIndex:1}}> <Header style={styles.header} androidStatusBarColor="#eeeeee" backgroundColor={theme.white} > <TouchableOpacity style={{justifyContent:'center',top:2}} onPress={() => Actions.pop()}> <Icon name="md-arrow-back" style={styles.hederBackButton}/> </TouchableOpacity> <View style={styles.headerTitle}> <Title> <Text style={styles.headerTitleText}>Login</Text> </Title> </View> <Right></Right> </Header> </Androw>

it's worked need to assign more width to