當前位置: 首頁>>代碼示例>>Java>>正文


Java SweetAlertDialog.dismiss方法代碼示例

本文整理匯總了Java中cn.pedant.SweetAlert.SweetAlertDialog.dismiss方法的典型用法代碼示例。如果您正苦於以下問題:Java SweetAlertDialog.dismiss方法的具體用法?Java SweetAlertDialog.dismiss怎麽用?Java SweetAlertDialog.dismiss使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在cn.pedant.SweetAlert.SweetAlertDialog的用法示例。


在下文中一共展示了SweetAlertDialog.dismiss方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: exportUser

import cn.pedant.SweetAlert.SweetAlertDialog; //導入方法依賴的package包/類
void exportUser() {
  SweetAlertDialog sw=new SweetAlertDialog(getActivity(), SweetAlertDialog.PROGRESS_TYPE);
    sw.show();
    try {
        ExcelUtil excelUtils = new ExcelUtil(jobName, modleList);
        File file = excelUtils.create();
        ExcelUtil.openFileByOtherApp(getActivity(), file);
        if (sw.isShowing()) {
            sw.dismiss();
        }
    } catch (Exception e) {
        LogUtils.e("導出excel", e.getMessage());
        if (sw.isShowing()) {
            sw.dismiss();
        }
    }
}
 
開發者ID:woniukeji,項目名稱:jianguo,代碼行數:18,代碼來源:FilterFragment.java

示例2: verifyProfile

import cn.pedant.SweetAlert.SweetAlertDialog; //導入方法依賴的package包/類
private void verifyProfile() {
    SweetAlertDialog errorDialog = new SweetAlertDialog(this, SweetAlertDialog.ERROR_TYPE);
    SweetAlertDialog loadingDialog = new SweetAlertDialog(this, SweetAlertDialog.PROGRESS_TYPE);

    String username = userNameView.getText().toString();
    String city = addressView.getText().toString();
    String twitter = twitterView.getText().toString();
    String github = githubView.getText().toString();
    String blog = blogView.getText().toString();
    String des = desView.getText().toString();

    if (TextUtils.isEmpty(username)) {
        errorDialog.setTitleText("Oops...");
        errorDialog.setContentText(getString(R.string.username_error));
        errorDialog.show();
        return;
    }

    userInfo.setName(username);
    userInfo.setCity(city);
    userInfo.setTwitterAccount(twitter);
    userInfo.setGithubName(github);
    userInfo.setPersonalWebsite(blog);
    userInfo.setIntroduction(des);

    loadingDialog.getProgressHelper().setBarColor(Color.parseColor("#4394DA"));
    loadingDialog.setContentText(getString(R.string.submitting));
    loadingDialog.setCancelable(false);
    loadingDialog.show();

    getPresenter().request(userInfo);

    loadingDialog.dismiss();
}
 
開發者ID:CycloneAxe,項目名稱:phphub-android,代碼行數:35,代碼來源:EditUserProfileActivity.java

示例3: onNetWorkError

import cn.pedant.SweetAlert.SweetAlertDialog; //導入方法依賴的package包/類
public void onNetWorkError(Throwable throwable, SweetAlertDialog loadingDialog) {
    Logger.e(throwable.getMessage());
    loadingDialog.dismiss();

    SweetAlertDialog errorDialog = new SweetAlertDialog(this, SweetAlertDialog.ERROR_TYPE);
    errorDialog.setTitleText("Oops...");
    errorDialog.setContentText(getString(R.string.publish_error));
    errorDialog.show();

}
 
開發者ID:CycloneAxe,項目名稱:phphub-android,代碼行數:11,代碼來源:TopicReplyActivity.java

示例4: populateList

import cn.pedant.SweetAlert.SweetAlertDialog; //導入方法依賴的package包/類
public void populateList(){
    final SweetAlertDialog dialog = new SweetAlertDialog(getActivity(), SweetAlertDialog.PROGRESS_TYPE);
    dialog.setTitleText(getResources().getString(R.string.loading_path));
    dialog.getProgressHelper().setBarColor(getResources().getColor(R.color.colorAccent));
    dialog.setCancelable(false);
    dialog.show();

    RequestQueue queue = Volley.newRequestQueue(getActivity());
    String url = getArguments().getString("url");

    // Request a string response from the provided URL.
    StringRequest stringRequest = new StringRequest(Request.Method.GET, url,
            new Response.Listener<String>() {
                @Override
                public void onResponse(String response) {
                    try {
                        JSONArray jsonArray = new JSONArray(response);
                        if (jsonArray.length()<1){
                            TextView ms = (TextView)getActivity().findViewById(R.id.ms);
                            ms.setVisibility(View.VISIBLE);
                            Typeface tf = Typeface.createFromAsset(getActivity().getAssets(),"fonts/arialRoundedBold.TTF");
                            ms.setTypeface(tf);
                        }
                        int count=jsonArray.length()-1;
                        while(count>=0){
                            JSONObject JO = jsonArray.getJSONObject(count);
                            Path path = new Path(JO);
                            count--;
                            pathsAdapter.add(path);

                        }
                        dialog.dismiss();
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }


                }
            }, new Response.ErrorListener() {

        @Override
        public void onErrorResponse(VolleyError error) {
            dialog.dismiss();
            Toasty.error(getActivity(), getString(R.string.error_getpath), Toast.LENGTH_SHORT, true).show();
        }
    }){
        @Override
        public Map<String, String> getHeaders() throws AuthFailureError {
            HashMap<String, String> map = new HashMap<String, String>();
            map.put("Authorization", AccessToken.getCurrentAccessToken().getUserId());

            return map;
        }
    };

    queue.add(stringRequest);
}
 
開發者ID:movers-gcw,項目名稱:movemate_android,代碼行數:58,代碼來源:FindPathFragment.java

示例5: populateList

import cn.pedant.SweetAlert.SweetAlertDialog; //導入方法依賴的package包/類
public void populateList(){
    final SweetAlertDialog dialog = new SweetAlertDialog(this, SweetAlertDialog.PROGRESS_TYPE);
    dialog.setTitleText(getResources().getString(R.string.loading_path));
    dialog.getProgressHelper().setBarColor(getResources().getColor(R.color.colorAccent));
    dialog.setCancelable(false);
    dialog.show();
    RequestQueue queue = Volley.newRequestQueue(this);

    // Request a string response from the provided URL.
    StringRequest stringRequest = new StringRequest(Request.Method.GET, url+user_id,
            new Response.Listener<String>() {
                @Override
                public void onResponse(String response) {
                    try {
                        JSONArray jsonArray = new JSONArray(response);
                        if (jsonArray.length()<1){
                            TextView ms = (TextView)findViewById(R.id.ms);
                            ms.setVisibility(View.VISIBLE);
                            Typeface tf = Typeface.createFromAsset(getAssets(),"fonts/arialRoundedBold.TTF");
                            ms.setTypeface(tf);
                        }
                        int count=jsonArray.length()-1;
                        while(count>=0){
                            JSONObject JO = jsonArray.getJSONObject(count);
                            Path path = new Path(JO);
                            count--;
                            pathsAdapter.add(path);
                        }
                        dialog.dismiss();
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }
                }
            }, new Response.ErrorListener() {

        @Override
        public void onErrorResponse(VolleyError error) {
            dialog.dismiss();
            Toasty.error(MainActivity.this, getString(R.string.error_getpath), Toast.LENGTH_SHORT, true).show();
        }
    })
    {
        @Override
        public Map<String, String> getHeaders() throws AuthFailureError {
            HashMap<String, String> map = new HashMap<String, String>();
            map.put("Authorization", AccessToken.getCurrentAccessToken().getUserId());

            return map;
        }
    };

    queue.add(stringRequest);
}
 
開發者ID:movers-gcw,項目名稱:movemate_android,代碼行數:54,代碼來源:MainActivity.java

示例6: getPathInfo

import cn.pedant.SweetAlert.SweetAlertDialog; //導入方法依賴的package包/類
private void getPathInfo(int id) {
    final SweetAlertDialog dialog = new SweetAlertDialog(this.getContext(), SweetAlertDialog.PROGRESS_TYPE);
    dialog.setTitleText(this.getContext().getResources().getString(R.string.loading_info));
    dialog.getProgressHelper().setBarColor(this.getContext().getResources().getColor(R.color.colorAccent));
    dialog.setCancelable(false);
    dialog.show();

    RequestQueue queue = Volley.newRequestQueue(this.getContext());

    StringRequest stringRequest = new StringRequest(Request.Method.GET, url+id,
            new Response.Listener<String>() {
                @Override
                public void onResponse(String response) {
                    dialog.dismiss();
                    JSONObject info = null;

                    try {
                        info = new JSONObject(response);

                    } catch (JSONException e) {
                        e.printStackTrace();
                    }

                    Intent intent = new Intent(getContext(), RouteActivity.class);
                    intent.putExtra("path",info.toString());
                    getContext().startActivity(intent);
                }
            }
            , new Response.ErrorListener() {

        @Override
        public void onErrorResponse(VolleyError error) {
            dialog.dismiss();
            Toast.makeText(getContext(), getContext().getResources().getString(R.string.error_info), Toast.LENGTH_SHORT).show();
        }
    })
    {
        @Override
        public Map<String, String> getHeaders() throws AuthFailureError {
            HashMap<String, String> map = new HashMap<String, String>();
            map.put("Authorization", AccessToken.getCurrentAccessToken().getUserId());

            return map;
        }
    };

    queue.add(stringRequest);
}
 
開發者ID:movers-gcw,項目名稱:movemate_android,代碼行數:49,代碼來源:PathsAdapter.java

示例7: onPublishSuccessful

import cn.pedant.SweetAlert.SweetAlertDialog; //導入方法依賴的package包/類
public void onPublishSuccessful(Topic topic, SweetAlertDialog loadingDialog) {
    loadingDialog.dismiss();
    finish();
    navigator.navigateToTopicDetails(this, topic.getId());
}
 
開發者ID:CycloneAxe,項目名稱:phphub-android,代碼行數:6,代碼來源:TopicPublishActivity.java

示例8: onPublicSuccessful

import cn.pedant.SweetAlert.SweetAlertDialog; //導入方法依賴的package包/類
public void onPublicSuccessful(Reply reply, SweetAlertDialog loadingDialog) {
    loadingDialog.dismiss();
    finish();
}
 
開發者ID:CycloneAxe,項目名稱:phphub-android,代碼行數:5,代碼來源:TopicReplyActivity.java


注:本文中的cn.pedant.SweetAlert.SweetAlertDialog.dismiss方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。