@Override protected void onPostExecute(Boolean result) { super.onPostExecute(result); materialDialog.dismiss(); myRecycerAdapter = new ScoreAdapter(scoreList); recyclerView.setAdapter(myRecycerAdapter); }
public void showCityDialog(int laseRegionCode) { RegionView view = new RegionView( this, region -> { getPresenter().finishAddCity(region); dialog.dismiss(); }, laseRegionCode); dialog = new MaterialDialog.Builder(this).title("选择感兴趣的地区").customView(view, false).show(); }
@Override public void connect(String address) { if (dialog != null && dialog.isShowing()) { dialog.dismiss(); } currentBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); if (currentBluetoothAdapter == null) { DisplayUtilities.ShowLargeMessage( this.context.getString(R.string.bluetooth_not_supported), "", view, true, null); return; } if (currentBluetoothAdapter.isEnabled()) { createConnection(address); } else { DisplayUtilities.ShowLargeMessage( this.context.getString(R.string.bluetooth_cant_connect), "", view, false, null); } }
public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)) { if (dialog != null) { dialog.dismiss(); } } else if (BluetoothDevice.ACTION_FOUND.equals(action)) { BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); devices.add(device); String discoveryName = device.getName(); /* if (discoveryNameService != null) { discoveryName = discoveryNameService.foundDevice(device.getAddress(), device.getName()); }*/ BTArrayAdapter.add(discoveryName + "\n" + device.getAddress()); BTArrayAdapter.notifyDataSetChanged(); } }
public static void HideProgress() { if (pd != null) { pd.dismiss(); } }
@Override public void hideProgress() { if (progressDialog != null && progressDialog.isShowing() && !isFinishing()) { progressDialog.dismiss(); } }
@Override public void onActivityDestroy() { super.onActivityDestroy(); if (mDialog != null && mDialog.isShowing()) mDialog.dismiss(); }
@Override public void onRequestSuccess(Response response) { super.onRequestSuccess(response); dialog.dismiss(); clean(); }
@Override public void onRequestFailure(SpiceException spiceException) { super.onRequestFailure(spiceException); dialog.dismiss(); clean(); }