use of org.androidannotations.annotations.Click in project SunDay by iQuick.
the class SettingActivity method clickUpdate.
/**
* 检查更新
*/
@Click(R.id.setting_check_update)
void clickUpdate() {
UmengUpdateAgent.setDefault();
UmengUpdateAgent.forceUpdate(SettingActivity.this);
UmengUpdateAgent.setUpdateListener(new UmengUpdateListener() {
@Override
public void onUpdateReturned(int updateStatus, UpdateResponse updateInfo) {
switch(updateStatus) {
case // has no update
UpdateStatus.No:
ToastUtil.showShort(R.string.no_update);
break;
}
}
});
}
use of org.androidannotations.annotations.Click in project SunDay by iQuick.
the class SettingActivity method sendWeather.
/**
* 短信发送天气
*/
@Click(R.id.setting_send_weather)
void sendWeather() {
try {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.putExtra("sms_body", mStrShareWeather);
intent.setType("vnd.android-dir/mms-sms");
startActivity(intent);
} catch (Exception e) {
e.printStackTrace();
ToastUtil.showShort(R.string.error_send);
}
}
Aggregations