自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(2)
  • 资源 (2)
  • 收藏
  • 关注

转载 android开发过程中涉及到的“概念”摘要

1、一个apk文件就是一个android应用; 2、Android操作系统是多用户系统,运行其中的每个应用都是不同的用户; 3、Android系统为每个应用(用户)分配一个用户ID(该用户ID只有操作 系统使用,应用程序是知道其用户ID)。系统为应用中的所有文件分配权限 (permissions),只有用户该用户ID的程序才能够访问这些文件; 4、操作系统启动的每个进程都有自己的VM,因

2013-04-20 21:43:55 482

转载 Android程序的“现场保护”

作者:小文字 出处:http://www.cnblogs.com/avenwu/     学习操作系统时,我们知道CUP处理事务的时候有个中断机制,以便进行事务的切换,中断处理的过程: 1)唤醒被阻塞的驱动(程序)进程;2)保护被中断的CPU环境;3)转入响应的设备处理程序;4)中断处理;5)恢复被中断的进程。    在Android当中也有类似的概念,在activity的生

2013-03-26 10:36:24 648

RadioGroupDemo

btn_Group = (RadioGroup) findViewById(R.id.friut); btn_apple = (RadioButton) findViewById(R.id.apple); btn_banana = (RadioButton) findViewById(R.id.banana); btn_peach = (RadioButton) findViewById(R.id.peach); Title = (TextView) findViewById(R.id.text); Result = (TextView) findViewById(R.id.result); btn_Group.setOnCheckedChangeListener(new OnCheckedChangeListener() { public void onCheckedChanged(RadioGroup group, int checkedId) { // TODO Auto-generated method stub // int id=group.getCheckedRadioButtonId(); switch(checkedId){ case R.id.apple: Result.setText("你选择的是"+btn_apple.getText()); break; case R.id.banana: Result.setText("你选择的是"+btn_banana.getText()); break; case R.id.peach: Result.setText("你选择的是"+btn_peach.getText()); break; } } });

2013-03-08

音乐播放器

很粗糙的播放器,还在修改中 private SeekBar pb; public static int currentSongIndex = 0; private boolean isShuffle = false; private boolean isRepeat = false; public static final int player=1; public static final int playlist=2; public static final int settings=3; public static int ViewState=0; public ImageView pl; public ArrayList<HashMap<String, Object>> songList = new ArrayList<HashMap<String, Object>>(); public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main_layout); final TabHost th = (TabHost) findViewById(R.id.tabhost); bt_Next = (ImageButton) findViewById(R.id.next); bt_Play = (ImageButton) findViewById(R.id.play); bt_Previous = (ImageButton) findViewById(R.id.previous); bt_Repeat=(ImageButton)findViewById(R.id.repeat); bt_Shuffle=(ImageButton)findViewById(R.id.shuffle); pl=(ImageView)findViewById(R.id.imageView1); pl.setAlpha(100); SongTitle=(TextView)findViewById(R.id.songTitle); songCurrentDurationLabel=(TextView)findViewById(R.id.currentTime); songTotalDurationLabel=(TextView)findViewById(R.id.totalTime); pb = (SeekBar) findViewById(R.id.seekbar); mp = new MediaPlayer(); SongManager sm = new SongManager(); utils = new Utilities(); pb.setOnSeekBarChangeListener(this); mp.setOnCompletionListener(this); songList = sm.getSongList(); playSong(0); // set the tabhost view th.setup(); th.addTab(th.newTabSpec("tab1") .setIndicator("歌曲", getResources().getDrawable(R.drawable.bg0)) .setContent(R.id.ll_0)); th.addTab(th .newTabSpec("tab2") .setIndicator("播放列表", getResources().getDrawable(R.drawable.bg1)) .setContent(R.id.ll_1)); th.addTab(th.newTabSpec("tab3") .setIndicator("设置", getResources().getDrawable(R.drawable.bg1)) .setContent(R.id.ll_2)); // put the data from sdcard into list ListAdapter adapter = new SimpleAdapter(this, getData(), R.layout.list_item, new String[] { "songTitle","songTime" }, new int[] { R.id.songTitle ,R.id.songTime}); setListAdapter(adapter); ListView lv = getListView(); // listening to single listitem click lv.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) { currentSongIndex = position; playSong(currentSongIndex); th.setCurrentTab(0); ViewState=player; } });

2013-02-15

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除