mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-11 20:15:03 -05:00
Added progressbar to autconfig screen and played bit with margins.
This commit is contained in:
parent
91e55e38b9
commit
7e4b4c4bc7
@ -1,16 +1,25 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent">
|
android:layout_height="fill_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
<!-- TODO: add a nice ?animated? image here, hourglass or something -->
|
|
||||||
|
|
||||||
<TextView android:id="@+id/status_message"
|
<TextView android:id="@+id/status_message"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:gravity="center_horizontal"
|
android:layout_marginTop="20dp"
|
||||||
android:paddingBottom="6dip"/>
|
android:gravity="center_horizontal"
|
||||||
|
android:paddingBottom="6dip"/>
|
||||||
|
|
||||||
<!-- TODO: add a cancel button -->
|
<ProgressBar android:id="@+id/autoconfig_progress"
|
||||||
</LinearLayout>
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/status_message"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
style="@android:style/Widget.ProgressBar.Large" />
|
||||||
|
|
||||||
|
<!-- TODO: add a cancel button
|
||||||
|
<include layout="@layout/wizard_cancel"/> -->
|
||||||
|
</RelativeLayout>
|
@ -8,6 +8,7 @@ import android.os.*;
|
|||||||
import android.os.Process;
|
import android.os.Process;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import com.fsck.k9.K9;
|
import com.fsck.k9.K9;
|
||||||
import com.fsck.k9.R;
|
import com.fsck.k9.R;
|
||||||
@ -76,6 +77,8 @@ public class AccountSetupAutoConfiguration extends K9Activity implements View.On
|
|||||||
private boolean mDestroyed;
|
private boolean mDestroyed;
|
||||||
|
|
||||||
private TextView mMessageView;
|
private TextView mMessageView;
|
||||||
|
private ProgressBar mProgressCircle;
|
||||||
|
|
||||||
private String mEmailAddress;
|
private String mEmailAddress;
|
||||||
private String mPassword;
|
private String mPassword;
|
||||||
private String mLastMessage;
|
private String mLastMessage;
|
||||||
@ -100,6 +103,9 @@ public class AccountSetupAutoConfiguration extends K9Activity implements View.On
|
|||||||
// Setting up the view
|
// Setting up the view
|
||||||
setContentView(R.layout.account_setup_autoconfig);
|
setContentView(R.layout.account_setup_autoconfig);
|
||||||
mMessageView = (TextView)findViewById(R.id.status_message);
|
mMessageView = (TextView)findViewById(R.id.status_message);
|
||||||
|
mProgressCircle = (ProgressBar)findViewById(R.id.autoconfig_progress);
|
||||||
|
mProgressCircle.setIndeterminate(true);
|
||||||
|
mProgressCircle.setVisibility(View.VISIBLE);
|
||||||
// ((Button)findViewById(R.id.cancel)).setOnClickListener(this);
|
// ((Button)findViewById(R.id.cancel)).setOnClickListener(this);
|
||||||
|
|
||||||
// Getting our data to work with
|
// Getting our data to work with
|
||||||
@ -125,7 +131,7 @@ public class AccountSetupAutoConfiguration extends K9Activity implements View.On
|
|||||||
String domain = emailParts[1];
|
String domain = emailParts[1];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
First part: check if serverside configuration data exists
|
Check if configuration data exists and if it does read in
|
||||||
*/
|
*/
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while( i < urlTemplates.size() ){
|
while( i < urlTemplates.size() ){
|
||||||
@ -147,6 +153,11 @@ public class AccountSetupAutoConfiguration extends K9Activity implements View.On
|
|||||||
// parse and finish
|
// parse and finish
|
||||||
// remember if i >= UNSAFE_URL_START => POSSIBLE UNSAFE DATA, alert user!!!
|
// remember if i >= UNSAFE_URL_START => POSSIBLE UNSAFE DATA, alert user!!!
|
||||||
parse(data);
|
parse(data);
|
||||||
|
try {
|
||||||
|
Thread.sleep(1750);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
|
||||||
|
}
|
||||||
finish();
|
finish();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user