本文整理汇总了Java中android.app.ProgressDialog.hide方法的典型用法代码示例。如果您正苦于以下问题:Java ProgressDialog.hide方法的具体用法?Java ProgressDialog.hide怎么用?Java ProgressDialog.hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.app.ProgressDialog
的用法示例。
在下文中一共展示了ProgressDialog.hide方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAPI
import android.app.ProgressDialog; //导入方法依赖的package包/类
public void getAPI(){
humansaid = messageET.getText().toString();
jsonURL = "https://monigarr-monigarr-bots-v1.p.mashape.com/conversation_start.php?bot_id=1&say=" +humansaid+ "&format=json";
final ProgressDialog pDialog = new ProgressDialog(ParseJSONObject.this);
pDialog.setMessage("Loading...");
pDialog.show();
JsonObjectRequest jsonObjReq =
new JsonObjectRequest(Method.GET,jsonURL, null,new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
mBotResponse = JSONParser.parseFeed(response);
yousaidTextView.setText("You Said :" + mBotResponse.getYouSaid());
botsaidTextView.setText("Bot Said :" + mBotResponse.getBotSaid());
Log.d(TAG, response.toString());
pDialog.dismiss();
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
VolleyLog.d(TAG, "Error: " + error.getMessage());
pDialog.hide();
}
}) {
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
Map<String, String> params = new HashMap<>();
params.put("X-Mashape-Key", developerkey);
params.put("Accept", "text/plain");
return params;
}
};
Volley.newRequestQueue(getApplicationContext()).add(jsonObjReq);
}
示例2: onCreateView
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
view = inflater.inflate(R.layout.fragment_detail_product, container, false);
android_id = Settings.Secure.getString(getActivity().getContentResolver(), Settings.Secure.ANDROID_ID);
FirebaseApp.initializeApp(getActivity());
firebaseDatabase = FirebaseDatabase.getInstance();
databaseReference = firebaseDatabase.getReference("basket").child(android_id);
btnAddBasket = (FlatButton) view.findViewById(R.id.btnAddBasket);
btnAddBasket.setOnClickListener(this);
progressDialog = new ProgressDialog(getActivity());
progressDialog.setMessage("Ürün Yükleniyor..");
progressDialog.show();
progressDialog.hide();
//OnSuucese kaydet
sliderLayout = (SliderLayout) view.findViewById(R.id.slider);
tvPrice = (TextView) view.findViewById(R.id.tvPrice);
etPiece = (EditText) view.findViewById(R.id.etPiece);
etPiece.addTextChangedListener(this);
imageList = new ArrayList<>();
productIdExstra = getArguments().getInt("id");
urlDetail+=productIdExstra;
Request request = new Request(getActivity(), urlDetail, com.android.volley.Request.Method.GET);
request.requestVolley(this);
return view;
}
示例3: onCreateView
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
view = inflater.inflate(R.layout.fragment_basket, container, false);
android_id = Settings.Secure.getString(getActivity().getContentResolver(), Settings.Secure.ANDROID_ID);
Request requestTemp = new Request(getActivity(), urlTempDesk, com.android.volley.Request.Method.POST);
requestTemp.requestVolleyTempDesk(this, deskID);
progressDialog = new ProgressDialog(getActivity());
progressDialog.setMessage("Sepet Yükleniyor..");
progressDialog.show();
progressDialog.hide();
tvBasketNull = (TextView) view.findViewById(R.id.tvBasketNull);
lvBasket = (ListView) view.findViewById(R.id.lvBasket);
btnOrder = (FlatButton) view.findViewById(R.id.btnOrder);
btnOrder.setOnClickListener(this);
SharedPreferences sharedpreferences = getActivity().getSharedPreferences("userBasket", Context.MODE_PRIVATE);
userFlag = sharedpreferences.getBoolean("user",false);
if (userFlag){
btnOrder.setText("SİPARİŞ VER");
}
productBaskets = new ArrayList<>();
firebaseDatabase = FirebaseDatabase.getInstance();
databaseReference = firebaseDatabase.getReference("basket").child(android_id);
databaseReference.addValueEventListener(this);
return view;
}
示例4: onCreate
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
final ProgressDialog pDialog = new ProgressDialog(getActivity());
pDialog.setMessage("Loading...");
pDialog.show();
JsonArrayRequest jsonArrayReq = new JsonArrayRequest(url,
new Response.Listener<JSONArray>() {
@Override
public void onResponse(JSONArray response) {
Log.d(TAG,response.toString());
Log.d(TAG,"Len "+response.length());
mInfoList = JSONinfoParser.parseArrayFeed(response);
pDialog.hide();
MobileAdapter adapter = new MobileAdapter(mInfoList);
setListAdapter(adapter);
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
VolleyLog.d(TAG, "Error: " + error.getMessage());
// hide the progress dialog
pDialog.hide();
}
});
// Adding request to request queue
Volley.newRequestQueue(getActivity()).add(jsonArrayReq);
}
示例5: stopSpinner
import android.app.ProgressDialog; //导入方法依赖的package包/类
public static void stopSpinner(ProgressDialog progressDialog) {
progressDialog.hide();
progressDialog.dismiss();
}