I have a button on a banner in my home page. When I hit that button it will redirect to contact us page when in full screen. But the button is not clickable when accessing the page from an android phone. Any idea in resolving this?
it might not help much, but did you try giving "alert" in your button action? Just to check whether, the onclick function is getting executed?
Related
I have searched the same symptom but cannot be fixed.
I use appium to do some automation with UiAutomator1.
Every call the back button
driver.keyevent(4)
The app crash(or exit) and goes to the Android home page.
The log seems normal.
However, a click back button on the emulator is fine.
There is no way to go to that page without click back button.
How can I click back button, or get the view name and go to that view directly?
Thanks.
If you want to click on BACK button in android, I think the following code will work fine:
driver.pressKeyCode(AndroidKeyCode.BACK);
reference:
http://appium.io/docs/en/commands/device/keys/press-keycode/
I don't know how to fix it.
However, i use another way to fix my problem.
self.driver.start_activity("xxx", "xxx")
It may not the best solution, but it can go to the view directly
Got the same problem some time back, solved using this :
driver.navigate().back();
or you can also try using this :
driver.back();
Working on a mobile game at the moment and was having difficulty getting the back button on android devices to function as I want it to.
Here's the scenario: You click down on the back button, realize you don't actually want to go back so you swipe up (while still pressed) onto the game screen, thus negating the back button being pushed.
I'm using InputProcessor and i have keyDown and keyUp. The problem is, i'm not sure how to use these two together so that when i swipe off the back button it doesn't go back.
I have been able to get the back button to do the other functionality i want (such as not exiting the app and going between screens and such), just stuck on this one scenario.
Any help is much appreciated.
Edit: This functionality can be seen in the facebook mobile app. If you click on the back button swipe off of it to the mainscreen, the app doesn't exit.
I don't know exactly the Syntax for Mobile development but I figure your best course of action is to create a Boolean willExit, and instantiate it as true, and in the KeyUp() function put and if (willExit) statement. Now you can have it run through the block KeyUp() without doing anything if willExit = false. From there you just set willExit to false whenever the condition is met, such as in your case when Swiping.
Simply in the KeyDown use the switch statement to see if the it is the back button or not.
If it is the back button, check if the screen is touched.
As simple as that.
BTW sorry for not providing code snippets.
I'm testing the "Jetboy" example Android code in an emulator. It says "Use your fire button...". Where is that? I've clicked all the buttons on my mouse, and hit about all the buttons on my keyboard, and I get nothing.
I was hoping that the following link would help, but I don't see my particular need in it:
http://developer.android.com/guide/developing/devices/emulator.html
Thanks for your help!
You can find the relevant code inside JetBoyView.java, check the processKeyEvent() method.
Fire is the DPAD center, thats usually pressing the trackball/-pad on a device. On the emulator it's this button:
I am working on page curl/turn animation with button click and I couldn't able to do it. Because I am new to Android and I searched a lot through Google, someone please share your knowledge with the example code for the animation
I am working on a sign-in page with username,email as text-view elements with edit text boxes, and Signin and Register are the two buttons
When I click the Register button the page should turn/flip to a new Register page and for signin button It should show an Alert dialog after submitting the credentials
Help is always appreciated, Thanks.!
Yes, you can have as many layout (.xml) pages as you'd like. When you desire to use one simply call setContentView(signin) or something alike.
You need to learn to explore your options before you post a question, thus creating two threads about the same topic. Look through the documentation and then here.
I have built a game. When the user clicks a button on the main page, he is redirected to another activity for a predefined time(say 20 s) and then he returns to the main page where he can choose another button. Now, this works perfectly on the emulator but on the phone when I clicks another button on the main page, it says the application has stopped unexpectedly. Force close. However, if I wait for say 3 s before clicking another button, it works. Is it because the images on the background of the buttons are too heavy?? Kindly help. Thanks in advance.
hey! i found out what was wrong. There was one picture which was too heavy!! it works fine now :)
Sometimes this error results from the widget like textview and so on, please delete the line related to something like textview.