summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/AndroidManifest.xml6
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ProviderCredentialsBaseActivity.java23
-rw-r--r--app/src/main/res/layout-sw600dp-port/a_provider_credentials.xml52
-rw-r--r--app/src/main/res/layout-xlarge/a_provider_credentials.xml52
-rw-r--r--app/src/main/res/layout/a_provider_credentials.xml53
-rw-r--r--app/src/main/res/layout/drawer_main.xml4
-rw-r--r--app/src/main/res/layout/provider_credentials.xml1
7 files changed, 116 insertions, 75 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 6a1d40aa..029e9fdb 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -102,10 +102,8 @@
android:label="@string/provider_details_title"
android:launchMode="singleTop" />
- <activity android:name=".LoginActivity"
- android:noHistory="true" />
- <activity android:name=".SignupActivity"
- android:noHistory="true" />
+ <activity android:name=".LoginActivity" />
+ <activity android:name=".SignupActivity" />
<service
android:name=".eip.EIP"
diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderCredentialsBaseActivity.java b/app/src/main/java/se/leap/bitmaskclient/ProviderCredentialsBaseActivity.java
index 88221007..47a45a74 100644
--- a/app/src/main/java/se/leap/bitmaskclient/ProviderCredentialsBaseActivity.java
+++ b/app/src/main/java/se/leap/bitmaskclient/ProviderCredentialsBaseActivity.java
@@ -4,6 +4,8 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
+import android.os.Build;
+import android.os.Build.VERSION_CODES;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
@@ -13,12 +15,18 @@ import android.support.v4.content.LocalBroadcastManager;
import android.support.v7.widget.AppCompatButton;
import android.support.v7.widget.AppCompatTextView;
import android.text.Editable;
+import android.text.Html;
import android.text.TextWatcher;
+import android.text.method.LinkMovementMethod;
+import android.text.util.Linkify;
import android.util.Log;
import android.view.KeyEvent;
import android.view.inputmethod.InputMethodManager;
import android.widget.TextView;
+import org.json.JSONArray;
+import org.json.JSONException;
+
import butterknife.InjectView;
import butterknife.OnClick;
import se.leap.bitmaskclient.Constants.CREDENTIAL_ERRORS;
@@ -327,7 +335,20 @@ public abstract class ProviderCredentialsBaseActivity extends ConfigWizardBaseAc
usernameError.setError(getString(R.string.username_ask));
}
if (arguments.containsKey(getString(R.string.user_message))) {
- userMessage.setText(arguments.getString(getString(R.string.user_message)));
+ String userMessageString = arguments.getString(getString(R.string.user_message));
+ try {
+ userMessageString = new JSONArray(userMessageString).getString(0);
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+
+ if (Build.VERSION.SDK_INT >= VERSION_CODES.N) {
+ userMessage.setText(Html.fromHtml(userMessageString, Html.FROM_HTML_MODE_LEGACY));
+ } else {
+ userMessage.setText(Html.fromHtml(userMessageString));
+ }
+ Linkify.addLinks(userMessage, Linkify.ALL);
+ userMessage.setMovementMethod(LinkMovementMethod.getInstance());
userMessage.setVisibility(VISIBLE);
} else if (userMessage.getVisibility() != VISIBLE) {
userMessage.setVisibility(GONE);
diff --git a/app/src/main/res/layout-sw600dp-port/a_provider_credentials.xml b/app/src/main/res/layout-sw600dp-port/a_provider_credentials.xml
index 4555343c..0cbb08f6 100644
--- a/app/src/main/res/layout-sw600dp-port/a_provider_credentials.xml
+++ b/app/src/main/res/layout-sw600dp-port/a_provider_credentials.xml
@@ -43,7 +43,6 @@
app:layout_constraintGuide_percent="0.725" />
<LinearLayout
- android:id="@+id/content"
android:orientation="vertical"
style="@style/BitmaskActivity"
android:layout_width="0dp"
@@ -61,35 +60,42 @@
<include layout="@layout/loading_screen" />
- <include
- layout="@layout/provider_header"
+ <LinearLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content" />
+ android:layout_height="match_parent"
+ android:id="@+id/content"
+ android:orientation="vertical">
+ <include
+ layout="@layout/provider_header"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
- <ScrollView
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:isScrollContainer="true"
- >
- <LinearLayout
+ <ScrollView
+ android:layout_height="match_parent"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
- <include
- layout="@layout/provider_credentials"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
+ android:isScrollContainer="true"
+ >
- <android.support.v7.widget.AppCompatButton
- android:id="@+id/button"
- android:layout_width="wrap_content"
+ <LinearLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="end"
- android:text="@string/login_button" />
+ android:orientation="vertical">
+ <include
+ layout="@layout/provider_credentials"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+ <android.support.v7.widget.AppCompatButton
+ android:id="@+id/button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="end"
+ android:text="@string/login_button" />
- </LinearLayout>
- </ScrollView>
+ </LinearLayout>
+ </ScrollView>
+ </LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout-xlarge/a_provider_credentials.xml b/app/src/main/res/layout-xlarge/a_provider_credentials.xml
index 82abb5cb..2184aeb8 100644
--- a/app/src/main/res/layout-xlarge/a_provider_credentials.xml
+++ b/app/src/main/res/layout-xlarge/a_provider_credentials.xml
@@ -43,7 +43,6 @@
app:layout_constraintGuide_percent="0.85" />
<LinearLayout
- android:id="@+id/content"
android:orientation="vertical"
style="@style/BitmaskActivity"
android:layout_width="0dp"
@@ -60,35 +59,42 @@
<include layout="@layout/loading_screen" />
- <include
- layout="@layout/provider_header"
+ <LinearLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content" />
+ android:layout_height="match_parent"
+ android:id="@+id/content"
+ android:orientation="vertical">
+ <include
+ layout="@layout/provider_header"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
- <ScrollView
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:isScrollContainer="true"
- >
- <LinearLayout
+ <ScrollView
+ android:layout_height="match_parent"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
- <include
- layout="@layout/provider_credentials"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
+ android:isScrollContainer="true"
+ >
- <android.support.v7.widget.AppCompatButton
- android:id="@+id/button"
- android:layout_width="wrap_content"
+ <LinearLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="end"
- android:text="@string/login_button" />
+ android:orientation="vertical">
+ <include
+ layout="@layout/provider_credentials"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+ <android.support.v7.widget.AppCompatButton
+ android:id="@+id/button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="end"
+ android:text="@string/login_button" />
- </LinearLayout>
- </ScrollView>
+ </LinearLayout>
+ </ScrollView>
+ </LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/a_provider_credentials.xml b/app/src/main/res/layout/a_provider_credentials.xml
index 4998effa..6667d905 100644
--- a/app/src/main/res/layout/a_provider_credentials.xml
+++ b/app/src/main/res/layout/a_provider_credentials.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/content"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -10,34 +9,42 @@
<include layout="@layout/loading_screen" />
- <include
- layout="@layout/provider_header"
+ <LinearLayout
+ android:id="@+id/content"
+ android:orientation="vertical"
android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
-
- <ScrollView
android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:isScrollContainer="true"
>
- <LinearLayout
+ <include
+ layout="@layout/provider_header"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
- <include
- layout="@layout/provider_credentials"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
+ android:layout_height="wrap_content" />
+
- <android.support.v7.widget.AppCompatButton
- android:id="@+id/button"
- android:layout_width="wrap_content"
+ <ScrollView
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:isScrollContainer="true"
+ >
+
+ <LinearLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="end"
- android:text="@string/login_button" />
+ android:orientation="vertical">
+ <include
+ layout="@layout/provider_credentials"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+ <android.support.v7.widget.AppCompatButton
+ android:id="@+id/button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="end"
+ android:text="@string/login_button" />
- </LinearLayout>
- </ScrollView>
+ </LinearLayout>
+ </ScrollView>
+ </LinearLayout>
</LinearLayout>
diff --git a/app/src/main/res/layout/drawer_main.xml b/app/src/main/res/layout/drawer_main.xml
index 41498617..26267bbb 100644
--- a/app/src/main/res/layout/drawer_main.xml
+++ b/app/src/main/res/layout/drawer_main.xml
@@ -5,7 +5,9 @@
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/colorBackground"
- tools:context="se.leap.bitmaskclient.drawer.NavigationDrawerFragment">
+ tools:context="se.leap.bitmaskclient.drawer.NavigationDrawerFragment"
+ android:clickable="true"
+ android:focusable="true">
<FrameLayout
android:layout_width="match_parent"
diff --git a/app/src/main/res/layout/provider_credentials.xml b/app/src/main/res/layout/provider_credentials.xml
index 6e4dff95..0bfdcc47 100644
--- a/app/src/main/res/layout/provider_credentials.xml
+++ b/app/src/main/res/layout/provider_credentials.xml
@@ -8,6 +8,7 @@
android:layout_height="wrap_content"
style="@style/TextAppearance.Design.Error"
android:visibility="gone"
+ android:linksClickable="true"
/>
<android.support.design.widget.TextInputLayout