/*
- * Copyright (C) 2016-2017 Tobias Brunner
+ * Copyright (C) 2016-2018 Tobias Brunner
* HSR Hochschule fuer Technik Rapperswil
*
* This program is free software; you can redistribute it and/or modify it
import android.app.Activity;
import android.app.LoaderManager;
-import android.app.ProgressDialog;
import android.content.AsyncTaskLoader;
import android.content.ContentResolver;
import android.content.Context;
-import android.content.DialogInterface;
import android.content.Intent;
import android.content.Loader;
import android.net.Uri;
private TrustedCertificateEntry mUserCertEntry;
private String mUserCertLoading;
private boolean mHideImport;
- private ProgressDialog mProgress;
+ private android.support.v4.widget.ContentLoadingProgressBar mProgressBar;
private TextView mExistsWarning;
private ViewGroup mBasicDataGroup;
private TextView mName;
setContentView(R.layout.profile_import_view);
+ mProgressBar = findViewById(R.id.progress_bar);
mExistsWarning = (TextView)findViewById(R.id.exists_warning);
mBasicDataGroup = (ViewGroup)findViewById(R.id.basic_data_group);
mName = (TextView)findViewById(R.id.name);
private void loadProfile(Uri uri)
{
- mProgress = ProgressDialog.show(this, null, getString(R.string.loading),
- true, true, new DialogInterface.OnCancelListener() {
- @Override
- public void onCancel(DialogInterface dialog)
- {
- finish();
- }
- });
+ mProgressBar.show();
Bundle args = new Bundle();
args.putParcelable(PROFILE_URI, uri);
public void handleProfile(ProfileLoadResult data)
{
- mProgress.dismiss();
+ mProgressBar.hide();
mProfile = null;
if (data != null && data.ThrownException == null)
android:padding="10dp"
android:animateLayoutChanges="true" >
+ <android.support.v4.widget.ContentLoadingProgressBar
+ style="@style/Widget.AppCompat.ProgressBar.Horizontal"
+ android:id="@+id/progress_bar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:indeterminate="true" />
+
<TextView
android:id="@+id/exists_warning"
android:background="@drawable/state_background"