aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java19
-rw-r--r--src/main/java/de/pixart/messenger/ui/ChangePasswordActivity.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/EditAccountActivity.java2
-rw-r--r--src/main/res/layout/activity_edit_account.xml929
4 files changed, 479 insertions, 473 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index 716a39434..25ecf8506 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -2103,17 +2103,14 @@ public class XmppConnectionService extends Service {
public void updateAccountPasswordOnServer(final Account account, final String newPassword, final OnAccountPasswordChanged callback) {
final IqPacket iq = getIqGenerator().generateSetPassword(account, newPassword);
- sendIqPacket(account, iq, new OnIqPacketReceived() {
- @Override
- public void onIqPacketReceived(final Account account, final IqPacket packet) {
- if (packet.getType() == IqPacket.TYPE.RESULT) {
- account.setPassword(newPassword);
- account.setOption(Account.OPTION_MAGIC_CREATE, false);
- databaseBackend.updateAccount(account);
- callback.onPasswordChangeSucceeded();
- } else {
- callback.onPasswordChangeFailed();
- }
+ sendIqPacket(account, iq, (a, packet) -> {
+ if (packet.getType() == IqPacket.TYPE.RESULT) {
+ a.setPassword(newPassword);
+ a.setOption(Account.OPTION_MAGIC_CREATE, false);
+ databaseBackend.updateAccount(a);
+ callback.onPasswordChangeSucceeded();
+ } else {
+ callback.onPasswordChangeFailed();
}
});
}
diff --git a/src/main/java/de/pixart/messenger/ui/ChangePasswordActivity.java b/src/main/java/de/pixart/messenger/ui/ChangePasswordActivity.java
index 5f1b5ba94..9525513aa 100644
--- a/src/main/java/de/pixart/messenger/ui/ChangePasswordActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ChangePasswordActivity.java
@@ -50,7 +50,7 @@ public class ChangePasswordActivity extends XmppActivity implements XmppConnecti
void onBackendConnected() {
this.mAccount = extractAccount(getIntent());
if (this.mAccount != null && this.mAccount.isOptionSet(Account.OPTION_MAGIC_CREATE)) {
- this.mCurrentPassword.setVisibility(View.GONE);
+ this.mCurrentPasswordLayout.setVisibility(View.GONE);
} else {
this.mCurrentPassword.setVisibility(View.VISIBLE);
}
diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
index 9a1eb696c..036ddabab 100644
--- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
@@ -1014,7 +1014,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
this.binding.accountJid.setEnabled(editable);
this.binding.accountJid.setFocusable(editable);
this.binding.accountJid.setFocusableInTouchMode(editable);
-
+
if (mAccount.isOptionSet(Account.OPTION_MAGIC_CREATE) || !mAccount.isOptionSet(Account.OPTION_LOGGED_IN_SUCCESSFULLY)) {
this.binding.accountPasswordLayout.setPasswordVisibilityToggleEnabled(true);
} else {
diff --git a/src/main/res/layout/activity_edit_account.xml b/src/main/res/layout/activity_edit_account.xml
index 90dd1b194..0c64832f5 100644
--- a/src/main/res/layout/activity_edit_account.xml
+++ b/src/main/res/layout/activity_edit_account.xml
@@ -20,7 +20,7 @@
android:layout_height="wrap_content"
android:orientation="vertical">
- <RelativeLayout
+ <android.support.v7.widget.CardView
android:id="@+id/editor"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@@ -32,138 +32,123 @@
android:orientation="vertical"
android:padding="@dimen/card_padding_regular">
- <com.makeramen.roundedimageview.RoundedImageView
- android:id="@+id/avater"
- android:layout_width="wrap_content"
+ <RelativeLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_centerHorizontal="true"
- android:layout_marginBottom="16dp"
- android:adjustViewBounds="true"
- android:background="@drawable/message_border"
- android:contentDescription="@string/account_image_description"
- android:maxHeight="384dp"
- android:maxWidth="384dp"
- android:padding="1dp"
- app:riv_corner_radius="5dp" />
+ android:padding="@dimen/card_padding_regular">
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_below="@+id/avater"
- android:orientation="vertical">
+ <com.makeramen.roundedimageview.RoundedImageView
+ android:id="@+id/avater"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_centerHorizontal="true"
+ android:layout_marginBottom="16dp"
+ android:adjustViewBounds="true"
+ android:background="@drawable/message_border"
+ android:contentDescription="@string/account_image_description"
+ android:maxHeight="384dp"
+ android:maxWidth="384dp"
+ android:padding="1dp"
+ app:riv_corner_radius="5dp" />
- <android.support.design.widget.TextInputLayout
- android:id="@+id/account_jid_layout"
- android:layout_width="match_parent"
+ <LinearLayout
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:hint="@string/account_settings_jabber_id">
+ android:layout_below="@+id/avater"
+ android:orientation="vertical">
- <AutoCompleteTextView
- android:id="@+id/account_jid"
+ <android.support.design.widget.TextInputLayout
+ android:id="@+id/account_jid_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:imeOptions="actionNext"
- android:inputType="textEmailAddress" />
- </android.support.design.widget.TextInputLayout>
+ android:hint="@string/account_settings_jabber_id">
- <android.support.design.widget.TextInputLayout
- android:id="@+id/account_password_layout"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:passwordToggleDrawable="@drawable/visibility_toggle_drawable"
- app:passwordToggleEnabled="true"
- app:passwordToggleTint="?android:textColorSecondary">
+ <AutoCompleteTextView
+ android:id="@+id/account_jid"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:imeOptions="actionNext"
+ android:inputType="textEmailAddress" />
+ </android.support.design.widget.TextInputLayout>
- <android.support.design.widget.TextInputEditText
- android:id="@+id/account_password"
+ <android.support.design.widget.TextInputLayout
+ android:id="@+id/account_password_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:hint="@string/password"
- android:inputType="textPassword" />
- </android.support.design.widget.TextInputLayout>
+ app:passwordToggleDrawable="@drawable/visibility_toggle_drawable"
+ app:passwordToggleEnabled="true"
+ app:passwordToggleTint="?android:textColorSecondary">
- <LinearLayout
- android:id="@+id/name_port"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
- android:orientation="horizontal"
- android:weightSum="1">
-
- <LinearLayout
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="0.8"
- android:orientation="vertical">
-
- <android.support.design.widget.TextInputLayout
- android:id="@+id/hostname_layout"
+ <android.support.design.widget.TextInputEditText
+ android:id="@+id/account_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:hint="@string/account_settings_hostname">
-
- <EditText
- android:id="@+id/hostname"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:inputType="textNoSuggestions" />
- </android.support.design.widget.TextInputLayout>
- </LinearLayout>
+ android:hint="@string/password"
+ android:inputType="textPassword" />
+ </android.support.design.widget.TextInputLayout>
<LinearLayout
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="0.2"
- android:orientation="vertical">
+ android:id="@+id/name_port"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
+ android:orientation="horizontal"
+ android:weightSum="1">
- <android.support.design.widget.TextInputLayout
- android:id="@+id/port_layout"
- android:layout_width="match_parent"
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="0.8"
+ android:orientation="vertical">
+
+ <android.support.design.widget.TextInputLayout
+ android:id="@+id/hostname_layout"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/account_settings_hostname">
+
+ <EditText
+ android:id="@+id/hostname"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:inputType="textNoSuggestions" />
+ </android.support.design.widget.TextInputLayout>
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="0dp"
android:layout_height="match_parent"
- android:hint="@string/account_settings_port">
+ android:layout_weight="0.2"
+ android:orientation="vertical">
- <EditText
- android:id="@+id/port"
+ <android.support.design.widget.TextInputLayout
+ android:id="@+id/port_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:inputType="number"
- android:maxLength="5" />
- </android.support.design.widget.TextInputLayout>
+ android:hint="@string/account_settings_port">
+
+ <EditText
+ android:id="@+id/port"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:inputType="number"
+ android:maxLength="5" />
+ </android.support.design.widget.TextInputLayout>
+ </LinearLayout>
</LinearLayout>
- </LinearLayout>
- <CheckBox
- android:id="@+id/account_register_new"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
- android:text="@string/register_account" />
-
- <TextView
- android:id="@+id/account_confirm_password_desc"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/account_settings_confirm_password"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeBody"
- android:visibility="gone" />
-
- <EditText
- android:id="@+id/account_password_confirm"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
- android:hint="@string/confirm_password"
- android:inputType="textPassword"
- android:textColor="@color/black87"
- android:textColorHint="@color/black54"
- android:textSize="?attr/TextSizeBody"
- android:visibility="gone" />
- </LinearLayout>
- </RelativeLayout>
+ <CheckBox
+ android:id="@+id/account_register_new"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
+ android:text="@string/register_account" />
+ </LinearLayout>
+ </RelativeLayout>
+ </android.support.v7.widget.CardView>
- <RelativeLayout
+ <android.support.v7.widget.CardView
android:id="@+id/os_optimization"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@@ -171,42 +156,56 @@
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
- android:background="@drawable/infocard_border"
- android:orientation="vertical"
- android:padding="@dimen/card_padding_regular"
android:visibility="gone">
- <TextView
- android:id="@+id/os_optimization_headline"
- android:layout_width="wrap_content"
+ <LinearLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textAppearance="@style/TextAppearance.AppCompat.Title" />
+ android:orientation="vertical">
- <TextView
- android:id="@+id/os_optimization_body"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@+id/os_optimization_headline"
- android:layout_marginBottom="8dp"
- android:layout_marginTop="8dp"
- android:text="@string/battery_optimizations_enabled_explained"
- android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
-
- <Button
- android:id="@+id/os_optimization_disable"
- style="?android:attr/borderlessButtonStyle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_alignParentEnd="true"
- android:layout_alignParentRight="true"
- android:layout_below="@+id/os_optimization_body"
- android:layout_marginRight="-8dp"
- android:text="@string/disable"
- android:textColor="@color/accent" />
- </RelativeLayout>
-
- <LinearLayout
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:padding="@dimen/card_padding_regular">
+
+ <TextView
+ android:id="@+id/os_optimization_headline"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/battery_optimizations_enabled"
+ android:textAppearance="@style/TextAppearance.AppCompat.Title" />
+
+ <TextView
+ android:id="@+id/os_optimization_body"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
+ android:text="@string/battery_optimizations_enabled_explained"
+ android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ android:gravity="right">
+
+ <Button
+ android:id="@+id/os_optimization_disable"
+ style="?android:attr/borderlessButtonStyle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:minWidth="0dp"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp"
+ android:text="@string/disable"
+ android:textColor="@color/accent" />
+ </LinearLayout>
+ </LinearLayout>
+ </android.support.v7.widget.CardView>
+
+ <android.support.v7.widget.CardView
android:id="@+id/stats"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
@@ -219,378 +218,385 @@
android:padding="@dimen/card_padding_regular"
android:visibility="gone">
- <TableLayout
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:shrinkColumns="0"
- android:stretchColumns="1">
+ android:orientation="vertical"
+ android:padding="@dimen/card_padding_regular">
- <TableRow
- android:layout_width="fill_parent"
+ <TableLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- tools:ignore="UselessParent">
+ android:shrinkColumns="0"
+ android:stretchColumns="1">
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:singleLine="true"
- android:text="@string/server_info_session_established"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
-
- <TextView
- android:id="@+id/session_est"
- android:layout_width="wrap_content"
+ <TableRow
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:paddingLeft="4dp"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
- </TableRow>
-
- </TableLayout>
-
- <TableLayout
- android:id="@+id/server_info_more"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:shrinkColumns="0"
- android:stretchColumns="1"
- android:visibility="gone">
+ tools:ignore="UselessParent">
- <TableRow
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:singleLine="true"
- android:text="@string/server_info_pep"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:text="@string/server_info_session_established"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+
+ <TextView
+ android:id="@+id/session_est"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ android:paddingLeft="4dp"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+ </TableRow>
- <TextView
- android:id="@+id/server_info_pep"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:paddingLeft="4dp"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
- </TableRow>
+ </TableLayout>
- <TableRow
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
+ <TableLayout
+ android:id="@+id/server_info_more"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:shrinkColumns="0"
+ android:stretchColumns="1"
+ android:visibility="gone">
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:singleLine="true"
- android:text="@string/server_info_blocking"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
+ <TableRow
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
- <TextView
- android:id="@+id/server_info_blocking"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:paddingLeft="4dp"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
- </TableRow>
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:text="@string/server_info_pep"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+
+ <TextView
+ android:id="@+id/server_info_pep"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ android:paddingLeft="4dp"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+ </TableRow>
- <TableRow
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
+ <TableRow
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:singleLine="true"
- android:text="@string/server_info_stream_management"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:text="@string/server_info_blocking"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+
+ <TextView
+ android:id="@+id/server_info_blocking"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ android:paddingLeft="4dp"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+ </TableRow>
- <TextView
- android:id="@+id/server_info_sm"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:paddingLeft="4dp"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
- </TableRow>
+ <TableRow
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
- <TableRow
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:text="@string/server_info_stream_management"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+
+ <TextView
+ android:id="@+id/server_info_sm"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ android:paddingLeft="4dp"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+ </TableRow>
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:singleLine="true"
- android:text="@string/server_info_roster_version"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
+ <TableRow
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
- <TextView
- android:id="@+id/server_info_roster_version"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:paddingLeft="4dp"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
- </TableRow>
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:text="@string/server_info_roster_version"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+
+ <TextView
+ android:id="@+id/server_info_roster_version"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ android:paddingLeft="4dp"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+ </TableRow>
- <TableRow
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
+ <TableRow
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:singleLine="true"
- android:text="@string/server_info_carbon_messages"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
-
- <TextView
- android:id="@+id/server_info_carbons"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:paddingLeft="4dp"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
- </TableRow>
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:text="@string/server_info_carbon_messages"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+
+ <TextView
+ android:id="@+id/server_info_carbons"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ android:paddingLeft="4dp"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+ </TableRow>
- <TableRow
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
+ <TableRow
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:singleLine="true"
- android:text="@string/server_info_mam"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:text="@string/server_info_mam"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+
+ <TextView
+ android:id="@+id/server_info_mam"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ android:paddingLeft="4dp"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+ </TableRow>
- <TextView
- android:id="@+id/server_info_mam"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:paddingLeft="4dp"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
- </TableRow>
+ <TableRow
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
- <TableRow
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:text="@string/server_info_csi"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+
+ <TextView
+ android:id="@+id/server_info_csi"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ android:paddingLeft="4dp"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+ </TableRow>
+
+ <TableRow
+ android:id="@+id/push_row"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:text="@string/server_info_push"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+
+ <TextView
+ android:id="@+id/server_info_push"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ android:paddingLeft="4dp"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+ </TableRow>
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:singleLine="true"
- android:text="@string/server_info_csi"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
+ <TableRow
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
- <TextView
- android:id="@+id/server_info_csi"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:paddingLeft="4dp"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
- </TableRow>
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:text="@string/server_info_http_upload"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+
+ <TextView
+ android:id="@+id/server_info_http_upload"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ android:paddingLeft="4dp"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
- <TableRow
- android:id="@+id/push_row"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
+ </TableRow>
+ </TableLayout>
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:singleLine="true"
- android:text="@string/server_info_push"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
+ <RelativeLayout
+ android:id="@+id/pgp_fingerprint_box"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_marginTop="32dp">
- <TextView
- android:id="@+id/server_info_push"
+ <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:paddingLeft="4dp"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
- </TableRow>
+ android:layout_alignParentLeft="true"
+ android:layout_centerVertical="true"
+ android:layout_toLeftOf="@+id/action_delete_pgp"
+ android:orientation="vertical">
- <TableRow
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
+ <TextView
+ android:id="@+id/pgp_fingerprint"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="@style/TextAppearance.Conversations.Fingerprint" />
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:singleLine="true"
- android:text="@string/server_info_http_upload"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
+ <TextView
+ android:id="@+id/pgp_fingerprint_desc"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/openpgp_key_id"
+ android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
+ </LinearLayout>
- <TextView
- android:id="@+id/server_info_http_upload"
+ <ImageButton
+ android:id="@+id/action_delete_pgp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:paddingLeft="4dp"
- android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
-
- </TableRow>
- </TableLayout>
-
- <RelativeLayout
- android:id="@+id/pgp_fingerprint_box"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_marginTop="32dp">
+ android:layout_alignParentRight="true"
+ android:layout_centerVertical="true"
+ android:alpha="1.0"
+ android:background="?attr/selectableItemBackgroundBorderless"
+ android:padding="@dimen/image_button_padding"
+ android:src="?attr/icon_remove"
+ android:visibility="visible" />
+ </RelativeLayout>
- <LinearLayout
+ <RelativeLayout
+ android:id="@+id/otr_fingerprint_box"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"
- android:layout_toLeftOf="@+id/action_delete_pgp"
- android:orientation="vertical">
+ android:layout_height="match_parent"
+ android:layout_marginTop="24dp">
- <TextView
- android:id="@+id/pgp_fingerprint"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="@style/TextAppearance.Conversations.Fingerprint" />
-
- <TextView
- android:id="@+id/pgp_fingerprint_desc"
+ <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/openpgp_key_id"
- android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
- </LinearLayout>
-
- <ImageButton
- android:id="@+id/action_delete_pgp"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_centerVertical="true"
- android:alpha="1.0"
- android:background="?attr/selectableItemBackgroundBorderless"
- android:padding="@dimen/image_button_padding"
- android:src="?attr/icon_remove"
- android:visibility="visible" />
- </RelativeLayout>
+ android:layout_alignParentLeft="true"
+ android:layout_centerVertical="true"
+ android:layout_toLeftOf="@+id/action_copy_to_clipboard"
+ android:orientation="vertical">
- <RelativeLayout
- android:id="@+id/otr_fingerprint_box"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_marginTop="24dp">
+ <TextView
+ android:id="@+id/otr_fingerprint"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="@style/TextAppearance.Conversations.Fingerprint" />
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"
- android:layout_toLeftOf="@+id/action_copy_to_clipboard"
- android:orientation="vertical">
+ <TextView
+ android:id="@+id/otr_fingerprint_desc"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/otr_fingerprint"
+ android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
- <TextView
- android:id="@+id/otr_fingerprint"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="@style/TextAppearance.Conversations.Fingerprint" />
+ </LinearLayout>
- <TextView
- android:id="@+id/otr_fingerprint_desc"
+ <ImageButton
+ android:id="@+id/action_copy_to_clipboard"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/otr_fingerprint"
- android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
-
- </LinearLayout>
-
- <ImageButton
- android:id="@+id/action_copy_to_clipboard"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_centerVertical="true"
- android:background="?attr/selectableItemBackgroundBorderless"
- android:contentDescription="@string/copy_otr_clipboard_description"
- android:padding="@dimen/image_button_padding"
- android:src="?attr/icon_copy"
- android:visibility="visible" />
- </RelativeLayout>
-
- <RelativeLayout
- android:id="@+id/axolotl_fingerprint_box"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_marginTop="24dp">
+ android:layout_alignParentRight="true"
+ android:layout_centerVertical="true"
+ android:background="?attr/selectableItemBackgroundBorderless"
+ android:contentDescription="@string/copy_otr_clipboard_description"
+ android:padding="@dimen/image_button_padding"
+ android:src="?attr/icon_copy"
+ android:visibility="visible" />
+ </RelativeLayout>
- <LinearLayout
+ <RelativeLayout
+ android:id="@+id/axolotl_fingerprint_box"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"
- android:layout_toLeftOf="@+id/axolotl_actions"
- android:orientation="vertical">
+ android:layout_height="match_parent"
+ android:layout_marginTop="24dp">
- <TextView
- android:id="@+id/axolotl_fingerprint"
+ <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textAppearance="@style/TextAppearance.Conversations.Fingerprint" />
+ android:layout_alignParentLeft="true"
+ android:layout_centerVertical="true"
+ android:layout_toLeftOf="@+id/axolotl_actions"
+ android:orientation="vertical">
- <TextView
- android:id="@+id/own_fingerprint_desc"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
- </LinearLayout>
+ <TextView
+ android:id="@+id/axolotl_fingerprint"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="@style/TextAppearance.Conversations.Fingerprint" />
- <LinearLayout
- android:id="@+id/axolotl_actions"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_centerVertical="true"
- android:orientation="vertical">
+ <TextView
+ android:id="@+id/own_fingerprint_desc"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
+ </LinearLayout>
- <ImageButton
- android:id="@+id/action_copy_axolotl_to_clipboard"
+ <LinearLayout
+ android:id="@+id/axolotl_actions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:background="?attr/selectableItemBackgroundBorderless"
- android:contentDescription="@string/copy_omemo_clipboard_description"
- android:padding="@dimen/image_button_padding"
- android:src="?attr/icon_copy"
- android:visibility="visible" />
+ android:layout_alignParentRight="true"
+ android:layout_centerVertical="true"
+ android:orientation="vertical">
- <ImageButton
- android:id="@+id/action_regenerate_omemo_key"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:background="?attr/selectableItemBackgroundBorderless"
- android:contentDescription="@string/regenerate_omemo_key"
- android:padding="@dimen/image_button_padding"
- android:src="?attr/icon_refresh"
- android:visibility="gone" />
- </LinearLayout>
- </RelativeLayout>
- </LinearLayout>
+ <ImageButton
+ android:id="@+id/action_copy_axolotl_to_clipboard"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="?attr/selectableItemBackgroundBorderless"
+ android:contentDescription="@string/copy_omemo_clipboard_description"
+ android:padding="@dimen/image_button_padding"
+ android:src="?attr/icon_copy"
+ android:visibility="visible" />
+
+ <ImageButton
+ android:id="@+id/action_regenerate_omemo_key"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="?attr/selectableItemBackgroundBorderless"
+ android:contentDescription="@string/regenerate_omemo_key"
+ android:padding="@dimen/image_button_padding"
+ android:src="?attr/icon_refresh"
+ android:visibility="gone" />
+ </LinearLayout>
+ </RelativeLayout>
+ </LinearLayout>
+ </android.support.v7.widget.CardView>
- <LinearLayout
+ <android.support.v7.widget.CardView
android:id="@+id/other_device_keys_card"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@@ -598,11 +604,14 @@
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
- android:background="@drawable/infocard_border"
- android:orientation="vertical"
- android:padding="@dimen/card_padding_regular"
android:visibility="gone">
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:padding="@dimen/card_padding_list">
+
<TextView
android:id="@+id/other_device_keys_title"
android:layout_width="wrap_content"
@@ -615,7 +624,7 @@
android:id="@+id/other_device_keys"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:orientation="vertical">
+ android:orientation="vertical"/>
<Button
android:id="@+id/clear_devices"
@@ -626,7 +635,7 @@
android:text="@string/clear_other_devices"
android:textColor="@color/accent" />
</LinearLayout>
- </LinearLayout>
+ </android.support.v7.widget.CardView>
</LinearLayout>
</ScrollView>