• Mars的mp3实例


    Mars的mp3实例第一课:

    关于menu:

    package mars.mp3player01;
    
    import mars.down.HttpDownloader;
    import android.app.ListActivity;
    import android.content.Intent;
    import android.os.Bundle;
    import android.view.Menu;
    import android.view.MenuItem;
    import android.widget.Toast;
    
    public class Mp3ListActivity extends ListActivity{
    	private static final int UPDATE = 3;
    	private static final int ABOUT = 4;
    	@Override
    	public boolean onCreateOptionsMenu(Menu menu) {
    		menu.add(0, 3, 1, R.string.mp3list_update);
    		menu.add(0, 4 , 2,R.string.mp3list_about);
    		return super.onCreateOptionsMenu(menu);
    	}
    	
    	@Override
    	protected void onCreate(Bundle savedInstanceState) {
    		// TODO Auto-generated method stub
    		super.onCreate(savedInstanceState);
    	}
    	
    	@Override
    	public boolean onOptionsItemSelected(MenuItem item) {
    		System.out.println("id:"+item.getItemId());
    //		Intent intent01 = new Intent(this, MainActivity.class);
    //		intent01.s
    		
    		switch (item.getItemId()) {
    		case UPDATE:
    			Mytoast("您选择了更新按钮");
    			//用户点击了更新列表按钮
    			
    			break;
    
    		case ABOUT:
    			
    			Mytoast("您选择了更新关于");
    			//用户点击了关于按钮
    			break;
    		}
    		return super.onOptionsItemSelected(item);
    	}
    	
    	private void Mytoast(String message){
    		Toast.makeText(this, message, Toast.LENGTH_SHORT).show();
    	}
    	
    	private String downloadXML(){
    		HttpDownloader httpdownload = new HttpDownloader();
    		httpdownload.dow
    		
    		return null;
    	}
    	
    }
    

      

  • 相关阅读:
    访存模型
    Petri网
    Forward secrecy
    TensorFlow训练神经网络cost一直为0
    解决tensorflow在训练的时候权重是nan问题
    tf.argmax
    Keras教程
    z-score
    隐马尔可夫(HMM)、前/后向算法、Viterbi算法
    受限玻尔兹曼机基础教程
  • 原文地址:https://www.cnblogs.com/Sunnor/p/4758813.html
Copyright © 2020-2023  润新知