我试图在我的活动中烤面包。我的活动首先与GoogleMap的膨胀在为什么吐司在谷歌地图中不起作用
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_detail_map_view);
}
然后,我设置了土司在onResume()
public void onResume() {
super.onResume();
//---create the BroadcastReceiver when the SMS is sent---
smsSentReceiver = new BroadcastReceiver(){
@Override
public void onReceive(Context arg0, Intent arg1) {
switch (getResultCode())
{
case Activity.RESULT_OK:
Toast.makeText(getBaseContext(), "SMS sent",
Toast.LENGTH_SHORT).show();
break;
但它应该是敬酒的时候,我没有看到敬酒。 什么可能是错的? 感谢
尝试ActivityName.this代替getBaseContext() – Raghunandan