use of org.qii.weiciyuan.support.lib.changelogdialog.ChangeLogDialog in project weiciyuan by qii.
the class AccountActivity method showChangeLogDialog.
private void showChangeLogDialog() {
ChangeLogDialog changeLogDialog = new ChangeLogDialog(this);
changeLogDialog.show();
}
use of org.qii.weiciyuan.support.lib.changelogdialog.ChangeLogDialog in project weiciyuan by qii.
the class AboutFragment method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRetainInstance(false);
addPreferencesFromResource(R.xml.about_pref);
findPreference(SettingActivity.SUGGEST).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
Intent intent = new Intent(getActivity(), WriteWeiboActivity.class);
intent.putExtra("token", GlobalContext.getInstance().getSpecialToken());
intent.putExtra("account", GlobalContext.getInstance().getAccountBean());
intent.putExtra("content", buildContent());
startActivity(intent);
return true;
}
});
findPreference(SettingActivity.VERSION).setSummary(buildVersionInfo());
findPreference(SettingActivity.VERSION).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
ChangeLogDialog changeLogDialog = new ChangeLogDialog(getActivity());
changeLogDialog.show();
return true;
}
});
findPreference(SettingActivity.DONATE).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
Dialog dialog = new Dialog(getActivity(), R.style.UserAvatarDialog);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
ImageView imageView = new ImageView(getActivity());
imageView.setImageResource(R.drawable.alipay);
dialog.setContentView(imageView);
dialog.show();
return true;
}
});
detectDebugPreference();
findPreference(SettingActivity.AUTHOR).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
blackMagicCount++;
if (blackMagicCount > 3) {
SettingUtility.setBlackMagicEnabled();
}
if (mp != null && mp.isPlaying()) {
mp.stop();
playing = false;
return true;
}
if (mp == null || !playing) {
mp = MediaPlayer.create(getActivity(), R.raw.star);
}
mp.start();
playing = true;
Toast.makeText(getActivity(), "♩♪♫♬♭", Toast.LENGTH_SHORT).show();
return true;
}
});
buildCacheSummary();
buildLogSummary();
findPreference(SettingActivity.SAVED_PIC_PATH).setSummary(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getAbsolutePath());
}
Aggregations