Linked Questions

318 votes
11 answers
208k views

How to change position of Toast in Android?

When I use Toast to display some popup text on the screen, it displays the text a little bit above the bottom of the screen, which is the default position. Now I want to display it in the middle of ...
UMAR-MOBITSOLUTIONS's user avatar
170 votes
3 answers
319k views

Android simple alert dialog [duplicate]

I need to show a little text message to the users that clicks a button on my Android app, on IOS I just had to create an AlertView that it's simple to use but with Android i'm struggling because the ...
LS_'s user avatar
  • 6,962
135 votes
19 answers
180k views

Custom toast on Android: a simple example

I'm new to Android programming. What is a simple example showing a custom toast notification on Android?
Sandy's user avatar
  • 2,439
4 votes
3 answers
8k views

How to replace the system.out with Toasts inside a thread [duplicate]

How to add a toast method inside a thread. I want to debug by replacing the system.out with a toast method to display results to the display. I know that using the application Context from within ...
user1739999's user avatar
1 vote
3 answers
7k views

Spinner OnTouchListener, nothing happens. Why? [duplicate]

Can someone tell me what's wrong with this code? Eclipse doesn't show any errors, but nothing happens when the spinner is clicked. Code: Spinner startTime = ( Spinner ) findViewById ( R.id....
abc32112's user avatar
  • 2,497
1 vote
3 answers
568 views

No suitable method for makeText() - Toast (Android)

I have defined a simple Toast that is going to display "log added" when a file has been written to. The rest of the code is just the rest of the method that writes EditText content to a file called ...
Tom Dunwoody's user avatar
1 vote
2 answers
111 views

How to display toast correct in Android my app?

I am using Android Studio. I want show "correct" or "incorrect" using Toast in my app for the answers. How to show Toast messages? Below is my code: public class LayarKuisUmumNo1 extends Activity { ...
rionymous_'s user avatar
0 votes
3 answers
162 views

How to use the Toast show() method for android studio? [duplicate]

Im trying to use the .show() method for my AndroidStudio but .show() is showing up in red. I tried looking up to see if I was missing any dependencies but it seems correct, at least from my ...
Karl Schmitt's user avatar
0 votes
4 answers
177 views

Android How can I show a Toast?

I have this button, when it's pressed the image will be saved into the external storage. I want to show a Toast with the text "Your photo has been saved". Here's my code (but it doesn't show the ...
user3317993's user avatar
0 votes
1 answer
44 views

OnCLick: read the field name and print it out in TOAST

I'm trying to read an element from the list shown below (using onClick), with the data being read from a JSON file, the data itself only holds strings. However, I'm having trouble actually registering ...
JamesSon's user avatar
0 votes
4 answers
847 views

get around of error 'can not resolve symbol' [duplicate]

how to get around this issue? i want to show toast when imageview is clicked using onclick listener. main activity.java: public class LoginActivity extends AppCompatActivity implements ...
user avatar
0 votes
4 answers
58 views

Checking/Storing inputs from EditTexts(Android/Java)

I am trying to learn android in java but I m stuck. Here is my method to get values from EditText fields. public void sendFeedback(View button) { System.out.println("Do not fail"); ...
Felipe Hield's user avatar
0 votes
2 answers
93 views

Adding and computing values in android

I'm a novice in the programming field and new help. In my xml file I have defined radio buttons that when selected a specific computation can be made but anytime it's checked, the app force closes. I ...
user3179975's user avatar
0 votes
4 answers
26k views

How to get text from Toast message which gets disappeared within few seconds

There is a functionality, when i enter invalid login credentials, an error message appears on right side of page showing error message"Please enter valid username and password" but it appears only for ...
Pooja thakur's user avatar
0 votes
1 answer
165 views

android: input dialog not working [duplicate]

public void showEditPassword() { LayoutInflater li = LayoutInflater.from(this); View promptsView = li.inflate(R.layout.dialog_editpassword, null); AlertDialog.Builder alertDialogBuilder =...
Aljon Baybayan's user avatar

15 30 50 per page