Java Code Examples for android.app.ProgressDialog

The following are top voted examples for showing how to use android.app.ProgressDialog. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: mininoteview   File: TextEdit.java   View source code 6 votes vote down vote up
private void encryptDataAndSave(byte[] password)
{
	try
	{
		binText = strText.getBytes(Charset.forName("UTF-8"));
		binText = MyUtil.encryptChiData(binText, MyUtil.md5Key(password));

		progressDlg = ProgressDialog.show(
				TextEdit.this, null, getString(R.string.notify_saving), true, false);
		new FileWriteThread().start();

	}
	catch(Exception e)
	{
		e.printStackTrace();
		//PasswordBox.resetPassword();
		showMessage(getString(R.string.alert_general_error) + "\n" + e.toString());
	}

}
 
Example 2
Project: FuelUp   File: BackupFragment.java   View source code 6 votes vote down vote up
@Override
public void onStart() {
    super.onStart();

    mProgress = new ProgressDialog(getContext());
    mProgress.setCanceledOnTouchOutside(false);
    mProgress.setMessage("Calling Drive API ...");

    String accountName = PreferencesUtils.getAccountName(getContext());

    if (!ConnectivityUtils.isGooglePlayServicesAvailable(getContext())) {
        acquireGooglePlayServices();

    } else {
        mCredential.setSelectedAccountName(accountName);
        showRemoveButton = true;
        mAccountName.setText(accountName);
        mSyncStatus.setText(R.string.googleDrive_cannot_connect);
        checkPermissions();
    }
}
 
Example 3
Project: Crimson   File: CheckupReminders.java   View source code 6 votes vote down vote up
private void setReminder() {

        progressDialog = new ProgressDialog(this);
        progressDialog.setTitle(getString(R.string.app_name));
        progressDialog.setMessage(getString(R.string.wait));
        progressDialog.setIndeterminate(true);
        progressDialog.setCancelable(false);

        String name = nameET.getText().toString();
        String address = addressET.getText().toString();
        String full_date = onDateEt.getText().toString();

        if (name.trim().length() > 0 && address.trim().length() > 0 && full_date.trim().length() > 0) {

            progressDialog.show();
            setReminderNow(name, address, full_date);

        } else
            Toast.makeText(this, getString(R.string.please_input), Toast.LENGTH_LONG).show();

    }
 
Example 4
Project: SmartMath   File: MFPFileManagerActivity.java   View source code 6 votes vote down vote up
public static void loadChart(final Context context, final String strChartFilePath)	{
final ProgressDialog dlgLoadingChartProgress = ProgressDialog.show(context, context.getString(R.string.please_wait),
		context.getString(R.string.loading_chart), true);
final Handler handler = new Handler();

Thread threadLoadChart = new Thread(new Runnable()	{

	@Override
	public void run() {
		final Intent intent = new Intent(context, ActivityChartDemon.class);
		intent.putExtra(ChartOperator.VMFPChartPath, strChartFilePath);
		handler.post(new Runnable()	{
			@Override
			public void run() {
				context.startActivity(intent);
				dlgLoadingChartProgress.dismiss();
			}
		});
	}
});
threadLoadChart.start();
  }
 
Example 5
Project: q-mail   File: AttachmentDownloadDialogFragment.java   View source code 6 votes vote down vote up
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    Bundle args = getArguments();
    int size = args.getInt(ARG_SIZE);
    String message = args.getString(ARG_MESSAGE);

    messagingListener = new SimpleMessagingListener() {
        @Override
        public void updateProgress(int progress) {
            dialog.setProgress(progress);
        }
    };

    messagingController = MessagingController.getInstance(getActivity());
    messagingController.addListener(messagingListener);

    dialog = new ProgressDialog(getActivity());
    dialog.setMessage(message);
    dialog.setMax(size);
    dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    dialog.setProgress(0);
    dialog.show();

    return dialog;
}
 
Example 6
Project: TaipeiTechRefined   File: CourseDetailActivity.java   View source code 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.course_detail);
    Intent i = getIntent();
    courseNo = i.getStringExtra("CourseNo");
    if (courseNo == null) {
        finish();
        return;
    }
    mToolbar = (Toolbar) findViewById(R.id.main_toolbar);
    setSupportActionBar(mToolbar);
    setActionBar();
    mProgressDialog = ProgressDialog.show(this, null, getString(R.string.course_loading), true);
    Thread t = new Thread(new CourseDetailRunnable(courseDetailHandler,
            courseNo));
    t.start();
}
 
Example 7
Project: AndroidFFmpegCompress   File: MainActivity.java   View source code 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    mRecordView = (RecordView) findViewById(R.id.recordView);
    mDurationTv = (TextView) findViewById(R.id.tv_duration);
    mCompressInfoTv = (TextView) findViewById(R.id.tv_info);
    mVideoSizeTv = (TextView) findViewById(R.id.tv_size);
    mDialog = new ProgressDialog(this);
    mDialog.setTitle("正在压缩");
    mDialog.setCanceledOnTouchOutside(false);
    mRecordView.setOnRecordCallback(new RecordView.OnRecordCallback() {
        @Override
        public void onFinish() {
            mVideoSizeTv.setText("大小:" + mRecordView.getRecordFileSize() + "Mb");
        }

        @Override
        public void onProgress(int total, int curr) {
            mDurationTv.setText(curr + "/" + total);
            mVideoSizeTv.setText("大小:" + mRecordView.getRecordFileSize() + "Mb");
            Log.d(TAG, "onProgress:" + mRecordView.getRecordFileSize());
        }
    });
}
 
Example 8
Project: GitHub   File: GoogleLogin.java   View source code 6 votes vote down vote up
@Override
public void login(@NonNull SmartLoginConfig config) {
    GoogleApiClient apiClient = config.getGoogleApiClient();
    Activity activity = config.getActivity();

    if (apiClient == null) {
        GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                .requestEmail()
                .requestProfile()
                .build();

        apiClient = new GoogleApiClient.Builder(activity)
                .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
                .build();
    }

    ProgressDialog progress = ProgressDialog.show(activity, "", activity.getString(R.string.logging_holder), true);
    Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(apiClient);
    activity.startActivityForResult(signInIntent, Constants.GOOGLE_LOGIN_REQUEST);
    progress.dismiss();
}
 
Example 9
Project: TaipeiTechRefined   File: PortalActivity.java   View source code 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_portal);
    mToolbar = (Toolbar) findViewById(R.id.main_toolbar);
    setSupportActionBar(mToolbar);
    setActionBar();
    WebView webview = (WebView) findViewById(R.id.webview);
    webview.setWebViewClient(new WebViewClient());
    webview.clearCache(true);
    webview.clearHistory();
    webview.getSettings().setJavaScriptEnabled(true);
    webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
    String account = Model.getInstance().getAccount();
    String password = Model.getInstance().getPassword();
    if (!TextUtils.isEmpty(account) && !TextUtils.isEmpty(password)) {
        mProgressDialog = ProgressDialog.show(this, null,
                getString(R.string.nportal_loggingin));
        Thread loginThread = new Thread(new LoginNportalRunnable(account, password,
                new LoginHandler(this)));
        loginThread.start();
    }
}
 
Example 10
Project: imui-tutorial   File: MainActivity.java   View source code 6 votes vote down vote up
@Override
protected Dialog onCreateDialog(int id) {
    switch (id) {
        case progress_bar_type:
            progrssDialog = new ProgressDialog(this);
            progrssDialog.setMessage("Downloading model. Please wait...");
            progrssDialog.setIndeterminate(false);
            progrssDialog.setMax(100);
            progrssDialog.setCancelable(false);
            progrssDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
            progrssDialog.show();
            return progrssDialog;
        default:
            return null;
    }
}
 
Example 11
Project: Matrix-Calculator-for-Android   File: DeterminantFragment.java   View source code 6 votes vote down vote up
public void RunToGetDeterminant(final int pos, final ProgressDialog px) {
    Runnable runnable = new Runnable() {
        @Override
        public void run() {
            double var = SquareList.get(pos).GetDeterminant(px);
            Message message = new Message();
            Bundle bundle = new Bundle();
            bundle.putDouble("RESULTANT", var);
            message.setData(bundle);
            px.dismiss();
            myhandler.sendMessage(message);

        }
    };
    Thread thread = new Thread(runnable);
    thread.start();
}
 
Example 12
Project: aos-Video   File: DeleteDialog.java   View source code 6 votes vote down vote up
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    String title ="";
    int icon=-1 ;
    icon= R.drawable.filetype_video;
    ProgressDialog pd = new ProgressDialog(getActivity());
    pd.setTitle(title);
    if(icon >=0)
        pd.setIcon(icon);
    pd.setMessage(getText(R.string.deleting));
    pd.setIndeterminate(true);
    pd.setCancelable(true);

    return pd;

}
 
Example 13
Project: BikeLine   File: MainActivity.java   View source code 6 votes vote down vote up
/**
 * Binding service after the fine location permission is granted
 */
private void startBindingService() {
    // Start GPSService which offers user location across activities
    positionDialog = new ProgressDialog(this);
    positionDialog.setTitle(getResources().getString(R.string.access_location_title));
    positionDialog.setMessage(getResources().getString(R.string.access_location_message));
    positionDialog.setIndeterminate(true);
    positionDialog.setCancelable(false);
    positionDialog.setButton(DialogInterface.BUTTON_NEGATIVE, "取消", new DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialog, int which) {
            dialog.dismiss();
            positionDialog = null;
        }
    });
    positionDialog.show();
    if (isMyServiceRunning(GPSService.class))
        bindService(serviceIntent, mConnection, Context.BIND_AUTO_CREATE);
    else
        super.startService(serviceIntent);
}
 
Example 14
Project: ceji_android   File: ReadingFragment.java   View source code 6 votes vote down vote up
@Override
public void parseEntryStart(int entry) {

    if ( ! isAdded() || getActivity() == null ) {
        return;
    }


    this.viewSwitcher.clearAnimation();
    this.viewSwitcher.setBackgroundDrawable(null);
    restoreColorProfile();
    displayPageNumber(-1); //Clear page number

    ProgressDialog progressDialog = getWaitDialog();
    progressDialog.setMessage(getString( R.string.loading_wait));

    progressDialog.show();
}
 
Example 15
Project: GCSApp   File: EaseBaiduMapActivity.java   View source code 5 votes vote down vote up
private void showMapWithLocationClient() {
	String str1 = getResources().getString(R.string.Making_sure_your_location);
	progressDialog = new ProgressDialog(this);
	progressDialog.setCanceledOnTouchOutside(false);
	progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
	progressDialog.setMessage(str1);

	progressDialog.setOnCancelListener(new OnCancelListener() {

		public void onCancel(DialogInterface arg0) {
			if (progressDialog.isShowing()) {
				progressDialog.dismiss();
			}
			Log.d("map", "cancel retrieve location");
			finish();
		}
	});

	progressDialog.show();

	mLocClient = new LocationClient(this);
	mLocClient.registerLocationListener(myListener);

	LocationClientOption option = new LocationClientOption();
	option.setOpenGps(true);// open gps
	// option.setCoorType("bd09ll"); 
	// Johnson change to use gcj02 coordination. chinese national standard
	// so need to conver to bd09 everytime when draw on baidu map
	option.setCoorType("gcj02");
	option.setScanSpan(30000);
	option.setAddrType("all");
	mLocClient.setLocOption(option);
}
 
Example 16
Project: ArscEditor   File: SearchString.java   View source code 5 votes vote down vote up
@Override
// doInBackground执行前执行
protected void onPreExecute() {
	// 创建进度条对象
	mdialog = new ProgressDialog(mContext);
	// 设置进度条提示的信息
	mdialog.setMessage(mContext.getString(R.string.searching));
	// 设置点击进度条外,进度条不消失
	mdialog.setCancelable(false);
	// 设置进度条样式为圆形
	mdialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
	// 显示进度条
	mdialog.show();

}
 
Example 17
Project: Blogg   File: MainActivity.java   View source code 5 votes vote down vote up
@Override
protected void onPreExecute(){
    super.onPreExecute();
    progressDialog = new ProgressDialog(MainActivity.this);
    progressDialog.setMessage("Updating Post...");
    progressDialog.show();
}
 
Example 18
Project: KTools   File: FileSystemActivity.java   View source code 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_file_system);
    ButterKnife.bind(this);
    assetManager = getAssets();
    mProgressDialog = new ProgressDialog(this);
}
 
Example 19
Project: RetrofitUrlManager   File: MainActivity.java   View source code 5 votes vote down vote up
private void initView() {
    setContentView(R.layout.activity_main);
    mUrl1 = (EditText) findViewById(R.id.et_url1);
    mUrl2 = (EditText) findViewById(R.id.et_url2);
    mUrl3 = (EditText) findViewById(R.id.et_url3);
    mGlobalUrl = (EditText) findViewById(R.id.et_global_url);
    mProgressDialog = new ProgressDialog(this);
    mUrl1.setSelection(mUrl1.getText().toString().length());
}
 
Example 20
Project: FindX   File: SelectHome.java   View source code 5 votes vote down vote up
@Override
protected void onPreExecute() {
    super.onPreExecute();
    pDialog = new ProgressDialog(SelectHome.this);
    pDialog.setMessage("Saving location");
    pDialog.setIndeterminate(false);
    pDialog.setCancelable(false);
    pDialog.show();
}
 
Example 21
Project: zabbkit-android   File: LoadingDialog.java   View source code 5 votes vote down vote up
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    ProgressDialog mProgressDialog = ProgressDialog.show(getActivity(), "",
            getString(R.string.loading), true);
    mProgressDialog.setCanceledOnTouchOutside(false);
    return mProgressDialog;
}
 
Example 22
Project: FindX   File: Log_in.java   View source code 5 votes vote down vote up
@Override
protected void onPreExecute() {
    super.onPreExecute();
    pDialog = new ProgressDialog(Log_in.this);
    pDialog.setMessage("Loging in....");
    pDialog.setIndeterminate(false);
    pDialog.setCancelable(false);
    pDialog.show();


}
 
Example 23
Project: RxProgress   File: RxProgress.java   View source code 5 votes vote down vote up
private <T> Observable<T> forObservable(Observable<T> source) {
    return Observable.using(this::makeDialog,
            new Function<ProgressDialog, ObservableSource<? extends T>>() {
                @Override
                public ObservableSource<? extends T> apply(@NonNull ProgressDialog dialog) throws Exception {
                    return Observable.create(emitter -> {
                        if (builder.cancelable) {
                            dialog.setOnCancelListener(dialogInterface -> emitter.onComplete());
                        }
                        dialog.setOnDismissListener(dialogInterface -> emitter.onComplete());
                        source.subscribe(emitter::onNext, emitter::onError, emitter::onComplete);
                    });
                }
            }, Dialog::dismiss);
}
 
Example 24
Project: AppGoogleMaps   File: MainActivity.java   View source code 5 votes vote down vote up
public void callProgressDialog(){

        if (progressDialog != null && progressDialog.isShowing())
            progressDialog.dismiss();
        else
            progressDialog  = ProgressDialog.show(this, "Please wait.",
                "Finding direction..!", true);
    }
 
Example 25
Project: Howl   File: ChatFragment.java   View source code 5 votes vote down vote up
private void init() {
    mProgressDialog = new ProgressDialog(getActivity());
    mProgressDialog.setTitle(getString(R.string.loading));
    mProgressDialog.setMessage(getString(R.string.please_wait));
    mProgressDialog.setIndeterminate(true);

    mIBSend.setOnClickListener(this);


    //   mETxtMessage.setOnEditorActionListener(this);

    mChatPresenter = new ChatPresenter(this);
    mChatPresenter.getMessage(FirebaseAuth.getInstance().getCurrentUser().getUid(),
            getArguments().getString(Constants.ARG_RECEIVER_UID));
}
 
Example 26
Project: ADBToolKitsInstaller   File: MainActivity.java   View source code 5 votes vote down vote up
public RunCommandsTask(Context context, List<String> commands, String title, boolean runWithRoot) {
    mCommands = commands;
    this.mTitle = title;
    this.mContext = context;
    dialog = new ProgressDialog(context);
    dialogBuilder = new AlertDialog.Builder(context);
    this.runWithRoot = runWithRoot;
}
 
Example 27
Project: q-mail   File: Accounts.java   View source code 5 votes vote down vote up
@Override
protected void showProgressDialog() {
    String title = mActivity.getString(R.string.settings_import_activate_account_header);
    int passwordCount = (mOutgoingPassword == null) ? 1 : 2;
    String message = mActivity.getResources().getQuantityString(
                         R.plurals.settings_import_setting_passwords, passwordCount);
    mProgressDialog = ProgressDialog.show(mActivity, title, message, true);
}
 
Example 28
Project: RootPGPExplorer   File: InitActivity.java   View source code 5 votes vote down vote up
@Override
protected void onPreExecute() {
    permissionGranted   =false;
    dialog              =new ProgressDialog(InitActivity.this);
    dialog.setIndeterminate(true);
    dialog.setMessage("Settings up application");
    dialog.setTitle("Application setup");
    dialog.setCancelable(false);
}
 
Example 29
Project: CustomAndroidOneSheeld   File: FoursquareShield.java   View source code 5 votes vote down vote up
public void loginToFoursquare() {
    ProgressDialog prog = new ProgressDialog(activity);
    prog.setMessage(activity.getString(R.string.foursquare_please_wait));
    prog.setCancelable(false);
    prog.show();
    foursquare = new Foursquare(
            ApiObjects.foursquare.get("client_key"),
            ApiObjects.foursquare.get("client_secret"),
            redirectUrl);
    foursquare.authorize(getActivity(),
            new FoursquareAuthenDialogListener());
    prog.cancel();
}
 
Example 30
Project: LeCatApp   File: DownloadTool.java   View source code 5 votes vote down vote up
@Override
protected void onPreExecute() {
    dialog = new ProgressDialog(context);
    dialog.setCancelable(false);
    dialog.setTitle("下载最新版本...");
    dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    dialog.show();
}
 
Example 31
Project: Paathshala   File: cs.java   View source code 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_cs);
    fileList = new ArrayList<>();
    lv = (ListView) findViewById(R.id.listViewFile);
    progressDialog = new ProgressDialog(this);
    progressDialog.setMessage("Loading Database. Please wait!!");
    progressDialog.show();

    mDatabaseRef = FirebaseDatabase.getInstance().getReference(upl.FB_DATABASE_PATH);

    mDatabaseRef.addValueEventListener(new ValueEventListener() {
        @Override
        public void onDataChange(DataSnapshot dataSnapshot) {
            progressDialog.dismiss();

            for (DataSnapshot snapshot : dataSnapshot.getChildren()) {
                FileUpload file = snapshot.getValue(FileUpload.class);
                fileList.add(file);
            }

            adapter = new FileListAdapter(cs.this, R.layout.file_item, fileList);
            lv.setAdapter(adapter);
        }

        @Override
        public void onCancelled(DatabaseError databaseError) {
            progressDialog.dismiss();
        }
    });
}
 
Example 32
Project: MVP-Android   File: ProgressDialogUtils.java   View source code 5 votes vote down vote up
public void openProgress(int message){
    activity.runOnUiThread(() -> {
        progressDialog = new ProgressDialog(activity);
        progressDialog.setMessage(activity.getString(message));
        progressDialog.show();
    });
}
 
Example 33
Project: EasyHttp   File: RxGetActivity.java   View source code 5 votes vote down vote up
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.get_main);

    ButterKnife.bind(this);

    dialog = new ProgressDialog(this);
}
 
Example 34
Project: basicapp   File: ApiSubscriber.java   View source code 5 votes vote down vote up
public ApiSubscriber(Context context, boolean cancleable, @NonNull ProgressDialog dialog){
    this.context = new WeakReference<>(context);
    this.dialog = dialog;
    this.cancleable = cancleable;
    dialog.setCancelable(cancleable);
    dialog.setOnCancelListener(this);
}
 
Example 35
Project: mousetodon   File: MouseApp.java   View source code 5 votes vote down vote up
void startWaitingWindow(final String s) {
runOnUiThread(new Runnable() {
	@Override
	public void run() {
              if (waitwin==null) {
                  waitwin=ProgressDialog.show(MouseApp.main,"Connect "+instanceDomain+"...",s);
              }
          }
      });
  }
 
Example 36
Project: GitHub   File: LoginActivity.java   View source code 5 votes vote down vote up
public void login() {
    Log.d(TAG, "Login");

    if (!validate()) {
        onLoginFailed();
        return;
    }

    _loginButton.setEnabled(false);

    final ProgressDialog progressDialog = new ProgressDialog(LoginActivity.this,
            R.style.AppTheme_Dark_Dialog);
    progressDialog.setIndeterminate(true);
    progressDialog.setMessage("Authenticating...");
    progressDialog.show();

    String email = _emailText.getText().toString();
    String password = _passwordText.getText().toString();

    // TODO: Implement your own authentication logic here.

    new android.os.Handler().postDelayed(
            new Runnable() {
                public void run() {
                    // On complete call either onLoginSuccess or onLoginFailed
                    onLoginSuccess();
                    // onLoginFailed();
                    progressDialog.dismiss();
                }
            }, 3000);
}
 
Example 37
Project: FindX   File: Sign_up.java   View source code 5 votes vote down vote up
@Override
protected void onPreExecute() {
    super.onPreExecute();
    pDialog = new ProgressDialog(Sign_up.this);
    pDialog.setMessage("Checking availability of digiPune ID....");
    pDialog.setIndeterminate(false);
    pDialog.setCancelable(false);
    pDialog.show();


}
 
Example 38
Project: MyPlace   File: LoginActivity.java   View source code 5 votes vote down vote up
public void login() {
    Log.d(TAG, "login");

    if (!validate()) {
        onLoginFailed();
        return;
    }

    _login.setEnabled(false);

    progressDialog = new ProgressDialog(LoginActivity.this);
    progressDialog.setIndeterminate(true);
    progressDialog.setMessage("Authenticating");
    progressDialog.show();

    username = _username.getText().toString();
    password = _password.getText().toString();

    LocalBroadcastManager.getInstance(this).registerReceiver(loginBroadcastReceiver,
            new IntentFilter(ConnectionService.BROADCAST_TAG));

    loginHandler.postDelayed(failLoginAfterDelay, 10000);

    try {
        mService.sendMessage(JSONParser.signinRequest(username, password));

    } catch (JSONException e) {
        e.printStackTrace();
    }
}
 
Example 39
Project: marauders   File: SignupActivity.java   View source code 5 votes vote down vote up
public void signup() {
    Log.d(TAG, "Signup");

    if (!validate()) {
        onSignupFailed();
        return;
    }

    _signupButton.setEnabled(false);

    final ProgressDialog progressDialog = new ProgressDialog(SignupActivity.this,
            R.style.Theme_AppCompat_DayNight_Dialog);
    progressDialog.setIndeterminate(true);
    progressDialog.setMessage("Creating Account...");
    progressDialog.show();

    String name = _nameText.getText().toString();
    String email = _emailText.getText().toString();
    String password = _passwordText.getText().toString();

    // TODO: Implement your own signup logic here.

    new android.os.Handler().postDelayed(
            new Runnable() {
                public void run() {
                    // On complete call either onSignupSuccess or onSignupFailed
                    // depending on success
                    onSignupSuccess();
                    // onSignupFailed();
                    progressDialog.dismiss();
                }
            }, 3000);
}
 
Example 40
Project: AndroidNetwork   File: AppBaseActivity.java   View source code 5 votes vote down vote up
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    //初始化ProgressDialog
    final ProgressDialog dialog = new ProgressDialog(this);
    dialog.setMessage(getResources().getString(R.string.str_loading));
    dialog.setCanceledOnTouchOutside(false);
    dlg = dialog;
}