我用以下代码编写了Java。我尝试了很多方法将其转换为Python。但是我没有得到想要的结果。
这些是Java代码和Python转换。我在哪里犯错了?
const ListChildren = (props) => {
const {price, title, image} = props.item
const onPress = () => props.fnPressButton(props.item)
return (
<TouchableHighlight
style={styles.listCellContainer}
onPress={onPress} //Try: Also bind the event () => this._onPress()
underlayColor="#dddddd"
>
<View>
<View style={styles.rowContainer}>
<Image style={styles.thumb} source={{ uri: img_url }} />
<View style={styles.textContainer}>
<Text style={styles.price}>{price}</Text>
<Text style={styles.title}>{title}</Text>
</View>
</View>
</View>
</TouchableHighlight>
);
};
export default ListChildren
public static String veri(byte[] bArr){
char[] toCharArray = "0123456789abcdef".toCharArray();
char[] cArr = new char[(bArr.length * 2)];
for(int i = 0; i < bArr.length; i++){
int i2 = bArr[i] & 255;
cArr[i * 2] = toCharArray[i2 >>> 4];
cArr[(i * 2) + 1] = toCharArray[i2 & 15];
}
//
return new String(cArr);
}