@Override public void onClick(View view) { mDialog.dismiss(); switch (view.getId()) { case R.id.ly_01: mTxtSoundType.setText(GlobalSetting.CONTENT_MAP.get(Constants.Music.ITEM_01)); SPUtils.put( SettingActivity.this, Constants.SPKey.MUSIC_ITEM_KEY, Constants.Music.ITEM_01); break; case R.id.ly_02: mTxtSoundType.setText(GlobalSetting.CONTENT_MAP.get(Constants.Music.ITEM_02)); SPUtils.put( SettingActivity.this, Constants.SPKey.MUSIC_ITEM_KEY, Constants.Music.ITEM_02); break; case R.id.ly_03: mTxtSoundType.setText(GlobalSetting.CONTENT_MAP.get(Constants.Music.ITEM_03)); SPUtils.put( SettingActivity.this, Constants.SPKey.MUSIC_ITEM_KEY, Constants.Music.ITEM_03); break; case R.id.ly_04: mTxtSoundType.setText(GlobalSetting.CONTENT_MAP.get(Constants.Music.ITEM_04)); SPUtils.put( SettingActivity.this, Constants.SPKey.MUSIC_ITEM_KEY, Constants.Music.ITEM_04); break; default: break; } }
@Override protected void onResume() { super.onResume(); String name = (String) SPUtils.get(this, Constants.SPKey.ACCOUNT_NAME, getString(R.string.setting_login)); mTxtLogIn.setText(name); }