mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-08 04:08:15 -05:00
Total visual redesign of the autoconfiguration activity.
This commit is contained in:
parent
b42e06fd9d
commit
80f46a1305
BIN
res/drawable/setup_not_ok.png
Normal file
BIN
res/drawable/setup_not_ok.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.0 KiB |
BIN
res/drawable/setup_ok.png
Normal file
BIN
res/drawable/setup_ok.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.2 KiB |
@ -1,14 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/autoconfig_status_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:gravity="center"
|
||||
android:textSize="18dp"
|
||||
android:text="@string/account_setup_autoconfig_trying"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/autoconfig_done_mark"
|
||||
android:visibility="gone"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="90dp"
|
||||
android:src="@drawable/setup_ok" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/autoconfig_progress"
|
||||
style="@android:style/Widget.ProgressBar.Large.Inverse"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="50dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/scrollView1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/controls_group" >
|
||||
android:layout_height="fill_parent" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_message"
|
||||
@ -16,61 +47,55 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:textSize="10dp"
|
||||
android:paddingBottom="6dip" />
|
||||
android:paddingBottom="6dip"
|
||||
android:textSize="12dp" />
|
||||
</ScrollView>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/controls_group"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="158dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout1"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/autoconfig_button_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cancel_action" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/autoconfig_button_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableRight="@drawable/button_indicator_next"
|
||||
android:text="@string/next_action" />
|
||||
</LinearLayout>
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginTop="-155dip"
|
||||
android:gravity="bottom|right"
|
||||
android:padding="0dip" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/autoconfig_warning"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/linearLayout1"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/account_setup_autoconfig_unsafe_connection"
|
||||
android:textColor="#C44141"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/autoconfig_progress"
|
||||
style="@android:style/Widget.ProgressBar.Large.Inverse"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/autoconfig_warning"
|
||||
android:layout_centerHorizontal="true" />
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginTop="-45dip"
|
||||
android:background="@android:drawable/bottom_bar"
|
||||
android:gravity="bottom|right"
|
||||
android:padding="0dip" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/autoconfig_button_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="false"
|
||||
android:layout_marginBottom="-4dip"
|
||||
android:minWidth="@dimen/button_minWidth"
|
||||
android:text="@string/cancel_action" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/autoconfig_button_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="false"
|
||||
android:layout_marginBottom="-4dip"
|
||||
android:drawableRight="@drawable/button_indicator_next"
|
||||
android:minWidth="@dimen/button_minWidth"
|
||||
android:text="@string/next_action" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
@ -386,6 +386,8 @@ http://k9mail.googlecode.com/
|
||||
<string name="account_setup_autoconfig_trynext">Searching other places for configuration settings...</string>
|
||||
<string name="account_setup_autoconfig_trydns">Checking for DNS redirects...</string>
|
||||
<string name="account_setup_autoconfig_new_domain">Retrying autoconfiguration for a new domain.</string>
|
||||
<string name="account_setup_autoconfig_trying">Attempting to configure your account...</string>
|
||||
<string name="account_setup_autoconfig_succesful_attempt">Succesfuly configured your account!</string>
|
||||
|
||||
<string name="account_setup_names_title">You\'re almost done!</string>
|
||||
<string name="account_setup_names_instructions">Your account is set up, and mail is on its way!</string>
|
||||
|
@ -6,6 +6,7 @@ import android.os.*;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import com.fsck.k9.K9;
|
||||
@ -85,6 +86,8 @@ public class AccountSetupAutoConfiguration extends K9Activity implements View.On
|
||||
private Button mCancelButton;
|
||||
private Button mNextButton;
|
||||
private TextView mWarningMsg;
|
||||
private TextView mStatusTitle;
|
||||
private ImageView mDoneMark;
|
||||
|
||||
private String mEmailAddress;
|
||||
private String mPassword;
|
||||
@ -118,11 +121,13 @@ public class AccountSetupAutoConfiguration extends K9Activity implements View.On
|
||||
// Setting up the view
|
||||
setContentView(R.layout.account_setup_autoconfig);
|
||||
mMessageView = (TextView)findViewById(R.id.status_message);
|
||||
mStatusTitle = (TextView)findViewById(R.id.autoconfig_status_title);
|
||||
mWarningMsg = (TextView)findViewById(R.id.autoconfig_warning);
|
||||
mWarningMsg.setVisibility(View.INVISIBLE);
|
||||
mProgressCircle = (ProgressBar)findViewById(R.id.autoconfig_progress);
|
||||
mProgressCircle.setIndeterminate(true);
|
||||
mProgressCircle.setVisibility(View.VISIBLE);
|
||||
mDoneMark = (ImageView)findViewById(R.id.autoconfig_done_mark);
|
||||
|
||||
mCancelButton = (Button)findViewById(R.id.autoconfig_button_cancel);
|
||||
mCancelButton.setOnClickListener(this);
|
||||
@ -570,13 +575,19 @@ public class AccountSetupAutoConfiguration extends K9Activity implements View.On
|
||||
public void run() {
|
||||
// hide progress circle & enable button for any case
|
||||
mProgressCircle.setVisibility(View.INVISIBLE);
|
||||
mNextButton.setEnabled(true);
|
||||
|
||||
// 1. All good, continue
|
||||
// all is fine
|
||||
|
||||
if( !bForceManual ){
|
||||
mStatusTitle.setText(R.string.account_setup_autoconfig_succesful_attempt);
|
||||
mDoneMark.setImageResource(R.drawable.setup_ok);
|
||||
mNextButton.setEnabled(true);
|
||||
// 2. Nothing came up, must manually config.. + help?
|
||||
if( bForceManual ) mNextButton.setText(getString(R.string.account_setup_basics_manual_setup_action));
|
||||
}else{
|
||||
mNextButton.setText(getString(R.string.account_setup_basics_manual_setup_action));
|
||||
mStatusTitle.setText(R.string.account_setup_autoconfig_forcemanual);
|
||||
mDoneMark.setImageResource(R.drawable.setup_not_ok);
|
||||
}
|
||||
mDoneMark.setVisibility(View.VISIBLE);
|
||||
|
||||
// 3. Data did not came over HTTPS this could be UNSAFE !!!!!!
|
||||
if( bUnsafe ) mWarningMsg.setVisibility(View.VISIBLE);
|
||||
|
Loading…
Reference in New Issue
Block a user