//实现底部的按钮激活监听 设置不同src class click implements OnClickListener{ @Override public void onClick(View v) { switch (v.getId()) { case R.id.bottom_talk: btalk.setImageResource(R.drawable.main_bottom_ico_talk_activite); bfind.setImageResource(R.drawable.main_bottom_ico_find); btalkdir.setImageResource(R.drawable.main_bottom_ico_talkdir); bme.setImageResource(R.drawable.main_bottom_ico_me); break; case R.id.bottom_talkdir: btalk.setImageResource(R.drawable.main_bottom_ico_talk); bfind.setImageResource(R.drawable.main_bottom_ico_find); btalkdir.setImageResource(R.drawable.main_bottom_ico_talkdir_activite); bme.setImageResource(R.drawable.main_bottom_ico_me); break; case R.id.bottom_find: btalk.setImageResource(R.drawable.main_bottom_ico_talk); bfind.setImageResource(R.drawable.main_bottom_ico_find_activite); btalkdir.setImageResource(R.drawable.main_bottom_ico_talkdir); bme.setImageResource(R.drawable.main_bottom_ico_me); break; case R.id.bottom_me: btalk.setImageResource(R.drawable.main_bottom_ico_talk); bfind.setImageResource(R.drawable.main_bottom_ico_find); btalkdir.setImageResource(R.drawable.main_bottom_ico_talkdir); bme.setImageResource(R.drawable.main_bottom_ico_me_activite); break; } } } }