Questions tagged [onpress]
156 questions
0
votes
1 answer
React Native: New screen after touching image using stack navigator
I am trying to learn React Native by creating an app. After I touch an image I want a new screen to be placed on top of the current screen.
I think I want to use a StackNavigator after onPress? I've read about them but don't know how to use them…

micro
- 11
- 1
- 4
0
votes
1 answer
How to return value from function call by button onpress?
I'm new to javascript family and I am writing a small program in react native. I am trying to SampleFunction2 to return census and render it on Flatlist when button onpress happens. Am I not supposed to return value for button onpress(event)? What…

ilaunchpad
- 1,283
- 3
- 16
- 32
0
votes
0 answers
RN TouchableOpacity onPress dosn't call function
A .map render some TouchableOpacity with the function showHide on the onPress prop. Everything render well but when I press one of the TouchableOpacity nothing happen.
I've tried many different things:
onPress={this.showHide}
onPress={() =>…
0
votes
2 answers
React Native : How to open a specific URL with onPress function from an array of urls?
I have an array of urls like that:
[ "https://hey.com",
"https://yes.com",
"https://wow.com",
/..
]
I have the same icon but multiple times. I want each of them to redirect to its specific url when on pressed.
I tried this code but…

danaso
- 115
- 1
- 1
- 9
0
votes
0 answers
OnPress button with ViewOverflow not working on android
I have a custom component based on TouchableOpacity,
I followed this tutorial
https://itnext.io/react-native-tab-bar-is-customizable-c3c37dcf711f
It used overflow View, but unfortunatly onPress() is not working with an overflow View in react…

xif
- 343
- 1
- 9
- 25
0
votes
0 answers
Getting undefined for specific values in scope of angular js ng-model
When I use ng-model for an attribute it’s become undefined in the $scope but I can see the values in document.getElementbyid(cardinfo).
This undefined happens only for specific parameters. In the same page I can get access other fields.
We use aem…
0
votes
1 answer
React Native Alert crash(error) Delete conformation
I'm trying to set alert function before running delete function to confirm.
Here is my code.
Now this shows alert popup with title, explanation and two buttons as I expected.
However, after showing up alert, the machine stopped for about one…

Shun Ishikawa
- 1
- 2
0
votes
0 answers
React native function not getting called
Hi I have an a button which should call a function, but when I click on the button nothing seems to happens. I have tried creating 2 desperate buttons to see if functions work individually, which they do. Although do not understand why nothing is…

Chris Henry
- 199
- 1
- 1
- 13
0
votes
1 answer
Reference ID of Dynamically Created Widget through On_Press Event in Python
Question:
How do I reference the id of a widget dynamically created in Python through an On_Press event?
Goal:
When clicking on dynamically created buttons, 'Test 1', 'Test 2', or 'Test 3', I want that button's id to print.
More specifically, I want…

Filip Phigari
- 135
- 2
- 14
0
votes
1 answer
Use On_Press Event to Change Screen without KV Language for Dynamically Created Buttons
Question:
How do you use an On-Press event to change screen for dynamically created buttons in python, and without using KV language?
Goal:
Be able to navigate to new screen from clicking on dynamically created button,
[without needing to create…

Filip Phigari
- 135
- 2
- 14
0
votes
1 answer
How do I bind the storeId to an onPress event in React-Native?
I want to be able to render more details about a particular store when a user presses on that particular store name. Right now, I'm only rendering the store name, with the map() I'm getting all the information by importing a Config file which…

VK1
- 1,676
- 4
- 28
- 51
0
votes
3 answers
How to change view for individual listview in react native?
I want to change the view of Follow button to unfollow on tap of particular listview button. Currently when I press on any follow button every follow button in listview changes to unfollow. i just want to change for particular follow button in…

Kamlesh Tilwani
- 59
- 1
- 2
- 16
0
votes
1 answer
React native TouchableOpacity onPress event not working calling from other class
What I wanted to do was create a TouchableOpacity once and use it everywhere in my program. I countered a problem when handling the press event. I imported the TouchableOpacity in other class and wanted to handle the onPress event there. But my code…

Mithun Adhikari
- 521
- 6
- 13
0
votes
1 answer
TouchableXXX will auto triggered when app start in reactnative
I am trying to wrap touchable items following this tortial
And the problem I found is that the navigation will be auto trigger by the launch of the app, it will navigate to the detail page without press on it.
And when navigate back, the touchable…

armnotstrong
- 8,605
- 16
- 65
- 130
0
votes
1 answer
Kivy - on_press option does not work within a "with self.canvas"?
It seems a lot of people have trouble with the on_press argument with Kivy, but I haven't found answers to my issue...
Here is what's happening:
I'm getting started with my first app in python/kivy. I know python, but perhaps not enough concerning…

Tyty87
- 3
- 3