比如说在一个调用media的小程序中有这么一段代码
public void onCreate() { //create the media player for this service player=MediaPlayer.create(this,R.raw.test); player.setLooping(false);//no repeat no loop Toast.makeText(this,"Creating Service",Toast.LENGTH_LONG).show(); }
这一段代码中有两个this 他们都代表的是啥意思???
public void playSong(View v) { Intent in = new Intent(MainActivity.this,MusicService.class); startService(in);//this will start the service(MusicService) }
还有在MainActivity中这个MainActivity.this是啥意思???
慕丝5230278
慕数据8267187
老白一个
Kamey
Finit