Commit d767a89a authored by Grigory Fedorov's avatar Grigory Fedorov

AccountInfoEditorFragment: account jabber id shown on the top.

parent 170b52b2
...@@ -97,6 +97,7 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi ...@@ -97,6 +97,7 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
private Uri photoFileUri; private Uri photoFileUri;
private boolean removeAvatarFlag = false; private boolean removeAvatarFlag = false;
private View birthDateRemoveButton; private View birthDateRemoveButton;
private TextView account_jid;
interface Listener { interface Listener {
void onVCardSavingStarted(); void onVCardSavingStarted();
...@@ -147,7 +148,7 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi ...@@ -147,7 +148,7 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
progressBar = view.findViewById(R.id.vcard_save_progress_bar); progressBar = view.findViewById(R.id.vcard_save_progress_bar);
avatarSize = (TextView) view.findViewById(R.id.vcard_avatar_size_text_view); account_jid = (TextView) view.findViewById(R.id.vcard_jid);
prefixName = (EditText) view.findViewById(R.id.vcard_prefix_name); prefixName = (EditText) view.findViewById(R.id.vcard_prefix_name);
formattedName = (EditText) view.findViewById(R.id.vcard_formatted_name); formattedName = (EditText) view.findViewById(R.id.vcard_formatted_name);
...@@ -158,6 +159,7 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi ...@@ -158,6 +159,7 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
nickName = (EditText) view.findViewById(R.id.vcard_nickname); nickName = (EditText) view.findViewById(R.id.vcard_nickname);
avatar = (ImageView) view.findViewById(R.id.vcard_avatar); avatar = (ImageView) view.findViewById(R.id.vcard_avatar);
avatarSize = (TextView) view.findViewById(R.id.vcard_avatar_size_text_view);
changeAvatarButton = view.findViewById(R.id.vcard_change_avatar); changeAvatarButton = view.findViewById(R.id.vcard_change_avatar);
changeAvatarButton.setOnClickListener(new View.OnClickListener() { changeAvatarButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
...@@ -231,6 +233,8 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi ...@@ -231,6 +233,8 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
} }
private void setFieldsFromVCard() { private void setFieldsFromVCard() {
account_jid.setText(Jid.getBareAddress(account));
formattedName.setText(vCard.getField(VCardProperty.FN.name())); formattedName.setText(vCard.getField(VCardProperty.FN.name()));
prefixName.setText(vCard.getPrefix()); prefixName.setText(vCard.getPrefix());
givenName.setText(vCard.getFirstName()); givenName.setText(vCard.getFirstName());
......
...@@ -5,16 +5,57 @@ ...@@ -5,16 +5,57 @@
android:layout_height="match_parent" android:layout_height="match_parent"
> >
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout
android:orientation="vertical" android:layout_width="match_parent" android:orientation="vertical"
android:layout_height="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/vcard_fields_layout" android:id="@+id/vcard_fields_layout"
> >
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="72dp"
>
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="32dp"
android:layout_marginTop="24dp"
android:src="@drawable/ic_vcard_xmpp_24dp"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_jid"
android:singleLine="true"
android:text="@string/name_example_com"
android:textAppearance="?android:textAppearanceMedium"
android:textColor="?android:attr/textColorPrimary"
android:paddingLeft="4dp"
android:paddingTop="12dp"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:orientation="horizontal"
...@@ -112,7 +153,6 @@ ...@@ -112,7 +153,6 @@
</LinearLayout> </LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -503,7 +543,7 @@ ...@@ -503,7 +543,7 @@
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
<ProgressBar <ProgressBar
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment