Please, I guess how it is called: an on-screen floating message with small arrow, they used to show to user what button to push when he sees the program for first time. They are usually with text "press this button to..." or "here you can get this.."
How to implement it in android application?
edit: I implemented some buttons on screen, and they say that it is not clear what they are for. I want to show user, when he (she) run the program after update, that this is a button and it is for...
maybe u could make a a whole new UI over ride for floating display or make a
activity fully transparent with a limited window size
and over lap it over ur previous activity
Related
I'm developing a scientific app in Android Studio. It works smoothy.
The set of source code files is not small, but, as I don't have practically user interface, there is only one activity and there is no intent.
All initialization code is inside OnCreate. Most of times, my app preserves all data, when he gets out of the foreground.
However, maybe (I cannot find a pattern of this event) he loses all data and restart (shows a white screen for 2 / 3 seconds), even if the cell phone don't enter in lock screen and there are just 2 apps running.
There are situations that I comute for another app (like WhatsApp) and resumes for my app, and my data was gone. The app restart again.
There is no error message, no logcat. Nothing.
Mostly, when I lock the screen and enter again, all my app data is there.
PS: My orientation is locked.
PS 2: I've read all related question and there is no hint for me. Based in one answer, I've tried to put in onCreate the following code.
if (!isTaskRoot() {
&& getIntent().hasCategory(Intent.CATEGORY_LAUNCHER)
&& getIntent().getAction() != null
&& getIntent().getAction().equals(Intent.ACTION_MAIN)) {
finish();
return;
}
No changes for me.
Update:
I've stumbled in solution. it can be read in my own answer. it's related to undesired back button effect for one-activity-app (read here and here ).
For me, as my application has only one activity, back needs to be like a home button: exit the app but preserve all activity data. My app has a real exit button, where the user shows that really wants to do this.
It's my first app that I developing in mobile world and, for extension, Android world
Some problems seems to me like that it is only possible find the solution if one has a hint about its solution. it's a contradiction. One doesn't know but has to know to solve that don't know!
And, in this situation, it's not the case. No hints. Just question marks.
Before, I had not noticed any pattern. People sometimes act so automatically ... However, suddenly the penny dropped.
I've stumbled in solution. Fortunately!
Not in a million years could I suppose that if someone has an activity and presses Back button, (right button in the bottom), you practically quit the application, even if it remains as a running app for the left button in the bottom (app switcher button)
When I've noticed it, I start to research with another focus. And I've discovered two sources: Disable back button in android and Android - Simulate Home click
So the solution is simply to make the Back button act like the Home button (middle button in the bottom). Return to the home screen without losing application data.
And this is done simply by putting in the onCreate, for my only activity, the following code.
override fun onBackPressed() {
val i = Intent(Intent.ACTION_MAIN)
i.addCategory(Intent.CATEGORY_HOME)
startActivity(i)
}
MainActivty.java file which allows user to input data into fields, and then they hit 1 button "calculate" and it manipulates all the data and displays it on the Results.java page. (the NEXT button at top was a test to see if I could even load the Results page, which no, clicking the NEXT button just crashes the app, and the calculate button is not even clickable)
MainActivity.java
MainActivity.java continued
Does anyone have any idea why my calculate button is not working on my app?
I am only allowed to post 2 links so if you need another picture let me know.
your onButtonCalculate() doesn't call add
android:onClick="onButtonCalculate"
In your XML code
I need to show that my vehicle is being charged. Charging starts when start button is clicked and stops when stop button is clicked on GUI.
i have a GUI for this work where i have to have some kind of image representation to show the status. (Something like our cell phone battery)
I am using SWT.
Any Suggestion, regarding, how to go about it, will be appreciated.
I have an app with 3 x 3 buttons, each of which has a short sound attached to it. I have another button called Record, so when this Record button is clicked, I want to record in which order each button is clicked.
I dont want to record it as .wav, .mp3, .ogg or any other media format, as it will be very difficult for some phones and as the consequence the app will have a very big latency.
Does anyone know of any techniques to do this? Like record it in a text file then playback the order of the button-clicks? I like this scenario, but unfortunately don't know what I should use.
Is this even the right way about going about this, or no?
I have a program that makes a phone call when a user clicks on a button. The user will need to provide some information very fast to the person who answers the call(ie GPS coordinates). The problem that I am having is that, once the user clicks on the call button, they cant go back to my application.
I want to know if it possible to bring my application to the front (without hanging up the call) or to display a message until the user clicks the ok button... or something like that. I tried toast notification but they disappear and I want them to stay until the user decides to close it.
look up startActivityForResult() and see if you can hook into the calling code.