Search in sources :

Example 6 with Click

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;
            }
        }
    });
}
Also used : UpdateResponse(com.umeng.update.UpdateResponse) UmengUpdateListener(com.umeng.update.UmengUpdateListener) Click(org.androidannotations.annotations.Click)

Example 7 with Click

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);
    }
}
Also used : Intent(android.content.Intent) Click(org.androidannotations.annotations.Click)

Aggregations

Click (org.androidannotations.annotations.Click)7 Intent (android.content.Intent)4 Bitmap (android.graphics.Bitmap)1 Response (com.android.volley.Response)1 VolleyError (com.android.volley.VolleyError)1 GsonRequest (com.android.volley.toolbox.GsonRequest)1 ImageLoader (com.android.volley.toolbox.ImageLoader)1 ImageRequest (com.android.volley.toolbox.ImageRequest)1 StringRequest (com.android.volley.toolbox.StringRequest)1 UpdateBean (com.chinaztt.fda.entity.UpdateBean)1 Fdv_ImageCache (com.chinaztt.fdv.Fdv_ImageCache)1 Fdv_JsonObjectRequest (com.chinaztt.fdv.Fdv_JsonObjectRequest)1 Fdv_StringRequest (com.chinaztt.fdv.Fdv_StringRequest)1 Gson (com.google.gson.Gson)1 FeedbackAgent (com.umeng.fb.FeedbackAgent)1 UmengUpdateListener (com.umeng.update.UmengUpdateListener)1 UpdateResponse (com.umeng.update.UpdateResponse)1 HashMap (java.util.HashMap)1 JSONObject (org.json.JSONObject)1