问题描述
我想更改Animated.View宽度,但出现此错误。我不想使用NativeDriver。我添加了“ useNativeDriver:false”,但是一切都一样。我该怎么办?
const show = () => {
console.log("show");
Animated.timing(mode,{
tovalue: 1,duration: 500,useNativeDriver:false,}).start();
};
const hide = () => {
Keyboard.dismiss();
Animated.timing(mode,{
tovalue: 0,}).start();
};
const inputSize = mode.interpolate({
inputRange:[0,1],outputRange:["100%","80%"]
});
<Animated.View style={[styles.searchContainer,{width:inputSize}]}>
<EvilIcons name="search" size={wp("8%")} color="rgba(0,.6)"/>
<TextInput
placeholder={`${i18n.t("search")}`}
onChangeText={(text)=>setValue(text)}
value={value}
returnKeyType="go"
style={styles.input}
onFocus={()=> show()}
/>
</Animated.View>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)