对于Toast的上下文,它表明MainActivity不是一个封闭的类。android.content.BroadcastReceiver;import android.content.Intent;import static android.widget.Toast.LENGTH_LONG;
public class PowerConnectedReceiver extends BroadcastReceiver
这些值正在正确地设置为微调器,但我无法在toast中显示它们。spinner was selected I need to save those two custom textviews in two string and need to display them in toast//String getspineer = customspinner.getSelectedItem().toString();
//Toast.makeText(getApplicationCon
我的android应用程序在安卓系统的TOAST中显示了最后/新的位置。我添加了TextView来显示TextView中的位置,但是应用程序没有在TextView中显示。(home.this, message, Toast.LENGTH_LONG).show(); public void onStatusChanged(String s, int i, Bundle b) {
Toast.makeText(home.this, "Provider s
Exception:Can't create handler inside thread that has not called Looper.prepare() while displaying the Toast我想在toast中显示来自服务器的消息。当时我得到了这个异常。我尝试使用handler.post将其发布到处理程序中。但我还是得到了例外。
应该采取什么方法来避免这种情况。