android-toast Questions

13

Solved

In Android I want to display a toast message at the bottom of the screen, I tried this: Toast.makeText(test.this, "bbb", Toast.LENGTH_LONG).show(); It doesn't work, how do I do it correc...
Boreal asked 10/3, 2013 at 10:22

33

Solved

Can I create something similar to Toasts in Flutter? Just a tiny notification window that is not directly in the face of the user and does not lock or fade the view behind it.
Rowden asked 29/8, 2017 at 20:54

2

The documentation says that Toasts are truncated to two lines on applications targeting Android 12 or later. The behaviour that I observe is that Toasts are truncated to two lines on applications i...
Terrance asked 15/12, 2021 at 20:55

4

Solved

While I'm doing custom toast on my app, I noticed that setView is deprecated. Does anyone have a solution for this? toast.setView(customView);
Madore asked 8/8, 2020 at 5:57

14

Solved

How can I display Toast messages from a thread?
Dutton asked 28/6, 2010 at 17:31

1

why does standard form Toast (also in current google android online docs) give "false caller" error for an app in Android compileSdkVersion/targetSdkVersion 28. Using getApplicationContex...
Vallee asked 10/9, 2022 at 13:29

2

this simple check is working on sdk 29 but not on sdk 30: onView(withText(R.string.text)).inRoot( withDecorView(not(mActivityRule.activity.window.decorView))) .check(matches(isDisplayed())) I get a...
Doersten asked 31/5, 2021 at 9:40

4

Solved

I know there are some other issues regard this problem, however, mine is surprisingly different (at least I think so). I guess my code is right but I don't have idea why toast message doesn't dis...
Ammoniac asked 16/5, 2014 at 12:50

11

Solved

I have several SeekBar and onSeekBarProgressStop(), I want to show a Toast message. But if on SeekBar I perform the action rapidly then UI thread somehow blocks and Toast message waits till UI thr...
Thrombo asked 3/8, 2011 at 10:37

1

I'm dealing with a strange bug on android: I want to print something with Toast and it works great on the emulator, and also on device. But after I add this line on the Manifest file (I must becaus...
Parliamentarian asked 16/7, 2017 at 12:7

16

I want to create a toast message with background color is white and message color is black. My toast message is: Toast.makeText(Logpage.this, "Please Give Feedback...", 3000).show(); I wanted t...
Walloping asked 2/7, 2015 at 4:27

27

Solved

When using setDuration() for a Toast, is it possible to set a custom length or at least something longer than Toast.LENGTH_LONG?
Kumiss asked 8/2, 2010 at 9:27

9

Solved

I'm developing a game via Andengine for Android. I have MainActivity class and GameScene class. I use Toast messages in GameActivity. And it is working. Toast.makeText(this, " Hello World", Toast....
Diesis asked 19/12, 2013 at 9:57

0

I'm testing my app on an Android 11 emulator (Pixel 5 API 31), when I open a toast notification I see the following: Where the toast has a blue default/place holder android icon next to it. How do...
Ballesteros asked 22/8, 2021 at 15:40

2

Solved

Hello guys I have 2 versions of Toast like this version 1: Toast.makeText(getApplicationContext(),"hello",Toast.LENGTH_LONG).setGravity(Gravity.CENTER,0,0).show(); version 2: Toast t = Toast.m...
Johathan asked 3/10, 2016 at 9:9

30

Solved

What does the following exception mean; how can I fix it? This is the code: Toast toast = Toast.makeText(mContext, "Something", Toast.LENGTH_SHORT); This is the exception: java.lang.RuntimeExc...
Yield asked 6/10, 2010 at 17:18

2

Solved

how to show toast in WorkManager do work()? When I try, it throws Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
Fry asked 1/6, 2019 at 16:14

2

Solved

I set the gravity of my toast to make it show on the top of the screen, with code below: Toast toast = Toast.makeText(getActivity(), "邮箱地址不能为空!", Toast.LENGTH_SHORT); toast.setGravity(Gra...
Braddock asked 25/11, 2020 at 11:56

1

According to https://developer.android.com/about/versions/11/behavior-changes-11#toasts, Toasts should still work as normal for Android11 (only setView() was deprecated). Note that text toasts are...
Supporting asked 13/1, 2021 at 15:4

4

Solved

I am printing Toast message in my application to show notification but i want to know value of Toast.LENGTH_LONG and Toast.LENGTH_SHORT. What other values i can use. Can anyone tell me what is th...
Selfstarter asked 8/8, 2011 at 22:54

2

Solved

I'm simply calling from my Activity: Toast.makeText(this, "This is a toast", Toast.LENGTH_SHORT).show() But the result is a text aligned on the top of the toast container, not centered inside as...
Monjan asked 12/2, 2014 at 23:4

8

Solved

Is it possible to programmatically add an image to a toast popup?
Christiano asked 27/9, 2011 at 15:44

9

Solved

We have been using just Toasts in our application so far and as we are planning to adopt some new features from Support Design Library I am wondering what's the recommended usage for Snackbar vs. T...
Sandry asked 23/12, 2015 at 9:25

2

Solved

I want to create a code to click on items of RecyclerView. I found one from Internet, however it keep getting this error: None of the following functions can be called with the arguments supplied:...
Seagrave asked 9/10, 2019 at 16:1

2

Solved

I want to know what is the best approach to display some sort of message in the view from the ViewModel. My ViewModel is making a POST call and "onResult" I want to pop up a message to the user con...
Saxen asked 26/11, 2018 at 15:54

© 2022 - 2024 — McMap. All rights reserved.