Commit faea0b38 authored by Grigory Fedorov's avatar Grigory Fedorov

Merge branch 'release/1.0.39'

parents 67a1a595 23515f73
...@@ -7,8 +7,8 @@ android { ...@@ -7,8 +7,8 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 14 minSdkVersion 14
targetSdkVersion 22 targetSdkVersion 22
versionCode 211 versionCode 212
versionName '1.0.38' versionName '1.0.39'
} }
compileOptions { compileOptions {
......
...@@ -25,6 +25,7 @@ import com.xabber.android.data.account.AccountManager; ...@@ -25,6 +25,7 @@ import com.xabber.android.data.account.AccountManager;
import com.xabber.android.data.account.OnAccountRemovedListener; import com.xabber.android.data.account.OnAccountRemovedListener;
import com.xabber.android.data.connection.ConnectionItem; import com.xabber.android.data.connection.ConnectionItem;
import com.xabber.android.data.connection.ConnectionManager; import com.xabber.android.data.connection.ConnectionManager;
import com.xabber.android.data.connection.ConnectionThread;
import com.xabber.android.data.connection.OnPacketListener; import com.xabber.android.data.connection.OnPacketListener;
import com.xabber.android.data.extension.avatar.AvatarManager; import com.xabber.android.data.extension.avatar.AvatarManager;
import com.xabber.android.data.roster.OnRosterChangedListener; import com.xabber.android.data.roster.OnRosterChangedListener;
...@@ -35,8 +36,8 @@ import com.xabber.android.data.roster.StructuredName; ...@@ -35,8 +36,8 @@ import com.xabber.android.data.roster.StructuredName;
import com.xabber.xmpp.address.Jid; import com.xabber.xmpp.address.Jid;
import com.xabber.xmpp.vcard.VCardProperty; import com.xabber.xmpp.vcard.VCardProperty;
import org.jivesoftware.smack.AbstractXMPPConnection;
import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.packet.IQ.Type; import org.jivesoftware.smack.packet.IQ.Type;
import org.jivesoftware.smack.packet.Presence; import org.jivesoftware.smack.packet.Presence;
...@@ -261,8 +262,14 @@ public class VCardManager implements OnLoadListener, OnPacketListener, ...@@ -261,8 +262,14 @@ public class VCardManager implements OnLoadListener, OnPacketListener,
private void requestVCard(final String account, final String srcUser) { private void requestVCard(final String account, final String srcUser) {
final String user = Jid.getBareAddress(srcUser); final String user = Jid.getBareAddress(srcUser);
final XMPPConnection xmppConnection = AccountManager.getInstance().getAccount(account).getConnectionThread().getXMPPConnection(); ConnectionThread connectionThread = AccountManager.getInstance().getAccount(account).getConnectionThread();
final org.jivesoftware.smackx.vcardtemp.VCardManager vCardManager = org.jivesoftware.smackx.vcardtemp.VCardManager.getInstanceFor(xmppConnection); if (connectionThread == null) {
onVCardFailed(account, user);
return;
}
final org.jivesoftware.smackx.vcardtemp.VCardManager vCardManager
= org.jivesoftware.smackx.vcardtemp.VCardManager.getInstanceFor(connectionThread.getXMPPConnection());
final Thread thread = new Thread("Get vCard user " + user + " for account " + account) { final Thread thread = new Thread("Get vCard user " + user + " for account " + account) {
@Override @Override
...@@ -305,7 +312,13 @@ public class VCardManager implements OnLoadListener, OnPacketListener, ...@@ -305,7 +312,13 @@ public class VCardManager implements OnLoadListener, OnPacketListener,
} }
public void saveVCard(final String account, final VCard vCard) { public void saveVCard(final String account, final VCard vCard) {
final XMPPConnection xmppConnection = AccountManager.getInstance().getAccount(account).getConnectionThread().getXMPPConnection(); ConnectionThread connectionThread = AccountManager.getInstance().getAccount(account).getConnectionThread();
if (connectionThread == null) {
onVCardSaveFailed(account);
return;
}
final AbstractXMPPConnection xmppConnection = connectionThread.getXMPPConnection();
final org.jivesoftware.smackx.vcardtemp.VCardManager vCardManager = org.jivesoftware.smackx.vcardtemp.VCardManager.getInstanceFor(xmppConnection); final org.jivesoftware.smackx.vcardtemp.VCardManager vCardManager = org.jivesoftware.smackx.vcardtemp.VCardManager.getInstanceFor(xmppConnection);
final Thread thread = new Thread("Save vCard for account " + account) { final Thread thread = new Thread("Save vCard for account " + account) {
......
...@@ -73,6 +73,7 @@ public class AccountInfoEditor extends ManagedActivity implements Toolbar.OnMenu ...@@ -73,6 +73,7 @@ public class AccountInfoEditor extends ManagedActivity implements Toolbar.OnMenu
toolbar.inflateMenu(SAVE_MENU); toolbar.inflateMenu(SAVE_MENU);
toolbar.setOnMenuItemClickListener(this); toolbar.setOnMenuItemClickListener(this);
toolbar.getMenu().findItem(R.id.action_save).setEnabled(false);
} }
@Override @Override
...@@ -115,6 +116,10 @@ public class AccountInfoEditor extends ManagedActivity implements Toolbar.OnMenu ...@@ -115,6 +116,10 @@ public class AccountInfoEditor extends ManagedActivity implements Toolbar.OnMenu
@Override @Override
public void onVCardSavingFinished() { public void onVCardSavingFinished() {
toolbar.setTitle(R.string.edit_account_user_info); toolbar.setTitle(R.string.edit_account_user_info);
}
@Override
public void enableSave() {
toolbar.getMenu().findItem(R.id.action_save).setEnabled(true); toolbar.getMenu().findItem(R.id.action_save).setEnabled(true);
} }
} }
...@@ -8,6 +8,8 @@ import android.net.Uri; ...@@ -8,6 +8,8 @@ import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.provider.MediaStore; import android.provider.MediaStore;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
...@@ -29,6 +31,7 @@ import com.xabber.android.data.extension.vcard.OnVCardListener; ...@@ -29,6 +31,7 @@ import com.xabber.android.data.extension.vcard.OnVCardListener;
import com.xabber.android.data.extension.vcard.OnVCardSaveListener; import com.xabber.android.data.extension.vcard.OnVCardSaveListener;
import com.xabber.android.data.extension.vcard.VCardManager; import com.xabber.android.data.extension.vcard.VCardManager;
import com.xabber.xmpp.address.Jid; import com.xabber.xmpp.address.Jid;
import com.xabber.xmpp.vcard.AddressProperty;
import com.xabber.xmpp.vcard.TelephoneType; import com.xabber.xmpp.vcard.TelephoneType;
import com.xabber.xmpp.vcard.VCardProperty; import com.xabber.xmpp.vcard.VCardProperty;
...@@ -49,7 +52,7 @@ import java.util.GregorianCalendar; ...@@ -49,7 +52,7 @@ import java.util.GregorianCalendar;
import java.util.Locale; import java.util.Locale;
import java.util.TimeZone; import java.util.TimeZone;
public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveListener, OnVCardListener, DatePickerDialog.OnDateSetListener { public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveListener, OnVCardListener, DatePickerDialog.OnDateSetListener, TextWatcher {
public static final String ARGUMENT_ACCOUNT = "com.xabber.android.ui.AccountInfoEditorFragment.ARGUMENT_ACCOUNT"; public static final String ARGUMENT_ACCOUNT = "com.xabber.android.ui.AccountInfoEditorFragment.ARGUMENT_ACCOUNT";
public static final String ARGUMENT_VCARD = "com.xabber.android.ui.AccountInfoEditorFragment.ARGUMENT_USER"; public static final String ARGUMENT_VCARD = "com.xabber.android.ui.AccountInfoEditorFragment.ARGUMENT_USER";
...@@ -97,10 +100,27 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi ...@@ -97,10 +100,27 @@ 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;
private EditText addressHomePostOfficeBox;
private EditText addressHomePostExtended;
private EditText addressHomePostStreet;
private EditText addressHomeLocality;
private EditText addressHomeRegion;
private EditText addressHomeCountry;
private EditText addressHomePostalCode;
private EditText addressWorkPostOfficeBox;
private EditText addressWorkPostExtended;
private EditText addressWorkPostStreet;
private EditText addressWorkLocality;
private EditText addressWorkRegion;
private EditText addressWorkCountry;
private EditText addressWorkPostalCode;
private boolean updateFromVCardFlag = false;
interface Listener { interface Listener {
void onVCardSavingStarted(); void onVCardSavingStarted();
void onVCardSavingFinished(); void onVCardSavingFinished();
void enableSave();
} }
public static AccountInfoEditorFragment newInstance(String account, String vCard) { public static AccountInfoEditorFragment newInstance(String account, String vCard) {
...@@ -147,17 +167,18 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi ...@@ -147,17 +167,18 @@ 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 = setUpInputField(view, R.id.vcard_prefix_name);
formattedName = (EditText) view.findViewById(R.id.vcard_formatted_name); formattedName = setUpInputField(view, R.id.vcard_formatted_name);
givenName = (EditText) view.findViewById(R.id.vcard_given_name); givenName = setUpInputField(view, R.id.vcard_given_name);
middleName = (EditText) view.findViewById(R.id.vcard_middle_name); middleName = setUpInputField(view, R.id.vcard_middle_name);
familyName = (EditText) view.findViewById(R.id.vcard_family_name); familyName = setUpInputField(view, R.id.vcard_family_name);
suffixName = (EditText) view.findViewById(R.id.vcard_suffix_name); suffixName = setUpInputField(view, R.id.vcard_suffix_name);
nickName = (EditText) view.findViewById(R.id.vcard_nickname); nickName = setUpInputField(view, 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
...@@ -174,6 +195,7 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi ...@@ -174,6 +195,7 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
datePicker.show(); datePicker.show();
} }
}); });
birthDate.addTextChangedListener(this);
birthDateRemoveButton = view.findViewById(R.id.vcard_birth_date_remove_button); birthDateRemoveButton = view.findViewById(R.id.vcard_birth_date_remove_button);
birthDateRemoveButton.setOnClickListener(new View.OnClickListener() { birthDateRemoveButton.setOnClickListener(new View.OnClickListener() {
...@@ -183,26 +205,48 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi ...@@ -183,26 +205,48 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
} }
}); });
title = (EditText) view.findViewById(R.id.vcard_title); title = setUpInputField(view, R.id.vcard_title);
role = (EditText) view.findViewById(R.id.vcard_role); role = setUpInputField(view, R.id.vcard_role);
organization = (EditText) view.findViewById(R.id.vcard_organization_name); organization = setUpInputField(view, R.id.vcard_organization_name);
organizationUnit = (EditText) view.findViewById(R.id.vcard_organization_unit); organizationUnit = setUpInputField(view, R.id.vcard_organization_unit);
url = setUpInputField(view, R.id.vcard_url);
description = setUpInputField(view, R.id.vcard_decsription);
url = (EditText) view.findViewById(R.id.vcard_url); phoneHome = setUpInputField(view, R.id.vcard_phone_home);
phoneWork = setUpInputField(view, R.id.vcard_phone_work);
description = (EditText) view.findViewById(R.id.vcard_decsription); emailHome = setUpInputField(view, R.id.vcard_email_home);
emailWork = setUpInputField(view, R.id.vcard_email_work);
phoneHome = (EditText) view.findViewById(R.id.vcard_phone_home); addressHomePostOfficeBox = setUpInputField(view, R.id.vcard_address_home_post_office_box);
phoneWork = (EditText) view.findViewById(R.id.vcard_phone_work); addressHomePostExtended = setUpInputField(view, R.id.vcard_address_home_post_extended);
addressHomePostStreet = setUpInputField(view, R.id.vcard_address_home_post_street);
addressHomeLocality = setUpInputField(view, R.id.vcard_address_home_locality);
addressHomeRegion = setUpInputField(view, R.id.vcard_address_home_region);
addressHomeCountry = setUpInputField(view, R.id.vcard_address_home_country);
addressHomePostalCode = setUpInputField(view, R.id.vcard_address_home_postal_code);
emailHome = (EditText) view.findViewById(R.id.vcard_email_home); addressWorkPostOfficeBox = setUpInputField(view, R.id.vcard_address_work_post_office_box);
emailWork = (EditText) view.findViewById(R.id.vcard_email_work); addressWorkPostExtended = setUpInputField(view, R.id.vcard_address_work_post_extended);
addressWorkPostStreet = setUpInputField(view, R.id.vcard_address_work_post_street);
addressWorkLocality = setUpInputField(view, R.id.vcard_address_work_locality);
addressWorkRegion = setUpInputField(view, R.id.vcard_address_work_region);
addressWorkCountry = setUpInputField(view, R.id.vcard_address_work_country);
addressWorkPostalCode = setUpInputField(view, R.id.vcard_address_work_postal_code);
setFieldsFromVCard(); setFieldsFromVCard();
return view; return view;
} }
private EditText setUpInputField(View rootView, int resourceId) {
EditText inputField = (EditText) rootView.findViewById(resourceId);
inputField.addTextChangedListener(this);
return inputField;
}
@Override @Override
public void onResume() { public void onResume() {
super.onResume(); super.onResume();
...@@ -231,6 +275,10 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi ...@@ -231,6 +275,10 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
} }
private void setFieldsFromVCard() { private void setFieldsFromVCard() {
updateFromVCardFlag = true;
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());
...@@ -270,6 +318,24 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi ...@@ -270,6 +318,24 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
emailHome.setText(vCard.getEmailHome()); emailHome.setText(vCard.getEmailHome());
emailWork.setText(vCard.getEmailWork()); emailWork.setText(vCard.getEmailWork());
addressHomePostOfficeBox.setText(vCard.getAddressFieldHome(AddressProperty.POBOX.name()));
addressHomePostExtended.setText(vCard.getAddressFieldHome(AddressProperty.EXTADR.name()));
addressHomePostStreet.setText(vCard.getAddressFieldHome(AddressProperty.STREET.name()));
addressHomeLocality.setText(vCard.getAddressFieldHome(AddressProperty.LOCALITY.name()));
addressHomeRegion.setText(vCard.getAddressFieldHome(AddressProperty.REGION.name()));
addressHomeCountry.setText(vCard.getAddressFieldHome(AddressProperty.CTRY.name()));
addressHomePostalCode.setText(vCard.getAddressFieldHome(AddressProperty.PCODE.name()));
addressWorkPostOfficeBox.setText(vCard.getAddressFieldWork(AddressProperty.POBOX.name()));
addressWorkPostExtended.setText(vCard.getAddressFieldWork(AddressProperty.EXTADR.name()));
addressWorkPostStreet.setText(vCard.getAddressFieldWork(AddressProperty.STREET.name()));
addressWorkLocality.setText(vCard.getAddressFieldWork(AddressProperty.LOCALITY.name()));
addressWorkRegion.setText(vCard.getAddressFieldWork(AddressProperty.REGION.name()));
addressWorkCountry.setText(vCard.getAddressFieldWork(AddressProperty.CTRY.name()));
addressWorkPostalCode.setText(vCard.getAddressFieldWork(AddressProperty.PCODE.name()));
updateFromVCardFlag = false;
} }
public void updateDatePickerDialog() { public void updateDatePickerDialog() {
...@@ -368,6 +434,8 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi ...@@ -368,6 +434,8 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
newAvatarImageUri = null; newAvatarImageUri = null;
removeAvatarFlag = true; removeAvatarFlag = true;
avatar.setImageDrawable(AvatarManager.getInstance().getDefaultAccountAvatar(account)); avatar.setImageDrawable(AvatarManager.getInstance().getDefaultAccountAvatar(account));
listener.enableSave();
avatarSize.setVisibility(View.INVISIBLE);
} }
@Override @Override
...@@ -397,6 +465,7 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi ...@@ -397,6 +465,7 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
File file = new File(newAvatarImageUri.getPath()); File file = new File(newAvatarImageUri.getPath());
avatarSize.setText(file.length() / KB_SIZE_IN_BYTES + "KB"); avatarSize.setText(file.length() / KB_SIZE_IN_BYTES + "KB");
avatarSize.setVisibility(View.VISIBLE); avatarSize.setVisibility(View.VISIBLE);
listener.enableSave();
} else if (resultCode == Crop.RESULT_ERROR) { } else if (resultCode == Crop.RESULT_ERROR) {
avatarSize.setVisibility(View.INVISIBLE); avatarSize.setVisibility(View.INVISIBLE);
Toast.makeText(getActivity(), Crop.getError(result).getMessage(), Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), Crop.getError(result).getMessage(), Toast.LENGTH_SHORT).show();
...@@ -457,15 +526,30 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi ...@@ -457,15 +526,30 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
vCard.setEmailHome(getValueFromEditText(emailHome)); vCard.setEmailHome(getValueFromEditText(emailHome));
vCard.setEmailWork(getValueFromEditText(emailWork)); vCard.setEmailWork(getValueFromEditText(emailWork));
vCard.setAddressFieldHome(AddressProperty.POBOX.name(), getValueFromEditText(addressHomePostOfficeBox));
vCard.setAddressFieldHome(AddressProperty.EXTADR.name(), getValueFromEditText(addressHomePostExtended));
vCard.setAddressFieldHome(AddressProperty.STREET.name(), getValueFromEditText(addressHomePostStreet));
vCard.setAddressFieldHome(AddressProperty.LOCALITY.name(), getValueFromEditText(addressHomeLocality));
vCard.setAddressFieldHome(AddressProperty.REGION.name(), getValueFromEditText(addressHomeRegion));
vCard.setAddressFieldHome(AddressProperty.CTRY.name(), getValueFromEditText(addressHomeCountry));
vCard.setAddressFieldHome(AddressProperty.PCODE.name(), getValueFromEditText(addressHomePostalCode));
vCard.setAddressFieldWork(AddressProperty.POBOX.name(), getValueFromEditText(addressWorkPostOfficeBox));
vCard.setAddressFieldWork(AddressProperty.EXTADR.name(), getValueFromEditText(addressWorkPostExtended));
vCard.setAddressFieldWork(AddressProperty.STREET.name(), getValueFromEditText(addressWorkPostStreet));
vCard.setAddressFieldWork(AddressProperty.LOCALITY.name(), getValueFromEditText(addressWorkLocality));
vCard.setAddressFieldWork(AddressProperty.REGION.name(), getValueFromEditText(addressWorkRegion));
vCard.setAddressFieldWork(AddressProperty.CTRY.name(), getValueFromEditText(addressWorkCountry));
vCard.setAddressFieldWork(AddressProperty.PCODE.name(), getValueFromEditText(addressWorkPostalCode));
} }
public void saveVCard() { public void saveVCard() {
ChatViewer.hideKeyboard(getActivity()); ChatViewer.hideKeyboard(getActivity());
updateVCardFromFields(); updateVCardFromFields();
enableProgressMode();
VCardManager.getInstance().saveVCard(account, vCard); VCardManager.getInstance().saveVCard(account, vCard);
isSaveSuccess = false; isSaveSuccess = false;
enableProgressMode();
} }
public void enableProgressMode() { public void enableProgressMode() {
...@@ -508,6 +592,7 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi ...@@ -508,6 +592,7 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
} }
disableProgressMode(); disableProgressMode();
listener.enableSave();
Toast.makeText(getActivity(), getString(R.string.account_user_info_save_fail), Toast.LENGTH_LONG).show(); Toast.makeText(getActivity(), getString(R.string.account_user_info_save_fail), Toast.LENGTH_LONG).show();
isSaveSuccess = false; isSaveSuccess = false;
} }
...@@ -564,4 +649,21 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi ...@@ -564,4 +649,21 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
birthDateRemoveButton.setVisibility(View.VISIBLE); birthDateRemoveButton.setVisibility(View.VISIBLE);
} }
} }
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
if (!updateFromVCardFlag) {
listener.enableSave();
}
}
@Override
public void afterTextChanged(Editable s) {
}
} }
...@@ -9,7 +9,6 @@ import android.view.MenuItem; ...@@ -9,7 +9,6 @@ import android.view.MenuItem;
import com.xabber.android.R; import com.xabber.android.R;
import com.xabber.android.data.intent.EntityIntentBuilder; import com.xabber.android.data.intent.EntityIntentBuilder;
import com.xabber.android.data.roster.GroupManager;
import com.xabber.xmpp.address.Jid; import com.xabber.xmpp.address.Jid;
import com.xabber.xmpp.vcard.VCardProperty; import com.xabber.xmpp.vcard.VCardProperty;
...@@ -26,7 +25,7 @@ public class AccountViewer extends ContactViewer implements Toolbar.OnMenuItemCl ...@@ -26,7 +25,7 @@ public class AccountViewer extends ContactViewer implements Toolbar.OnMenuItemCl
public static Intent createIntent(Context context, String account) { public static Intent createIntent(Context context, String account) {
return new EntityIntentBuilder(context, AccountViewer.class) return new EntityIntentBuilder(context, AccountViewer.class)
.setAccount(account).setUser(GroupManager.IS_ACCOUNT).build(); .setAccount(account).setUser(Jid.getBareAddress(account)).build();
} }
@Override @Override
......
...@@ -5,505 +5,719 @@ ...@@ -5,505 +5,719 @@
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_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent">
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_contact_info_24dp"
/>
<LinearLayout <LinearLayout
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:id="@+id/vcard_fields_layout"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
> >
<EditText <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/vcard_formatted_name" android:minHeight="72dp"
android:layout_gravity="center_vertical" >
android:id="@+id/vcard_formatted_name"
android:singleLine="true"
/>
<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"
/>
<EditText <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/vcard_prefix_name" android:orientation="vertical"
android:layout_gravity="center_vertical" android:layout_marginRight="16dp"
android:id="@+id/vcard_prefix_name" android:layout_marginTop="8dp"
android:singleLine="true" 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>
<EditText <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/vcard_given_name" android:minHeight="72dp"
android:layout_gravity="center_vertical" >
android:id="@+id/vcard_given_name"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_middle_name"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_middle_name"
android:singleLine="true"
/>
<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_contact_info_24dp"
/>
<EditText <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/vcard_family_name" android:orientation="vertical"
android:layout_gravity="center_vertical" android:layout_marginRight="16dp"
android:id="@+id/vcard_family_name" android:layout_marginTop="8dp"
android:singleLine="true" android:layout_marginBottom="8dp"
/>
>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_formatted_name"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_formatted_name"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_prefix_name"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_prefix_name"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_given_name"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_given_name"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_middle_name"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_middle_name"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_family_name"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_family_name"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_suffix_name"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_suffix_name"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_nick_name"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_nickname"
android:singleLine="true"
/>
</LinearLayout>
<EditText </LinearLayout>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_suffix_name"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_suffix_name"
android:singleLine="true"
/>
<EditText <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/vcard_nick_name" android:minHeight="72dp"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_nickname"
android:singleLine="true"
/>
</LinearLayout>
</LinearLayout>
<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_camera_grey600_24dp"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
>
<ImageView
android:id="@+id/vcard_avatar"
android:layout_width="@dimen/avatar_large_size"
android:layout_height="@dimen/avatar_large_size"
android:src="@drawable/ic_avatar_1" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
> >
<Button <ImageView
android:layout_width="wrap_content" android:layout_width="24dp"
android:layout_height="wrap_content" android:layout_height="24dp"
android:text="@string/change" android:layout_marginLeft="16dp"
android:id="@+id/vcard_change_avatar" android:layout_marginRight="32dp"
android:layout_marginLeft="44dp" android:layout_marginTop="24dp"
android:layout_gravity="top" /> android:src="@drawable/ic_camera_grey600_24dp"
<TextView
android:layout_marginLeft="56dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/vcard_avatar_size_text_view"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="173KB"
android:visibility="invisible"
/> />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
>
<ImageView
android:id="@+id/vcard_avatar"
android:layout_width="@dimen/avatar_large_size"
android:layout_height="@dimen/avatar_large_size"
android:src="@drawable/ic_avatar_1" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/change"
android:id="@+id/vcard_change_avatar"
android:layout_marginLeft="44dp"
android:layout_gravity="top" />
<TextView
android:layout_marginLeft="56dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/vcard_avatar_size_text_view"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="173KB"
android:visibility="invisible"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
</LinearLayout> android:orientation="horizontal"
<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_birthday_24dp"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginRight="16dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="8dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/vcard_birth_date"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_birth_date"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:inputType="date"
android:paddingLeft="4dp"
android:paddingRight="8dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:background="@drawable/ripple_background"
/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_close_circle_grey600_24dp"
android:padding="8dp"
android:background="@drawable/ripple_background"
android:id="@+id/vcard_birth_date_remove_button"
/>
</LinearLayout>
</LinearLayout>
<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_job_title_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"
>
<EditText
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/vcard_title" android:minHeight="72dp"
android:layout_gravity="center_vertical" >
android:id="@+id/vcard_title" <ImageView
android:singleLine="true" android:layout_width="24dp"
/> android:layout_height="24dp"
android:layout_marginLeft="16dp"
<EditText android:layout_marginRight="32dp"
android:layout_width="match_parent" android:layout_marginTop="24dp"
android:layout_height="wrap_content" android:src="@drawable/ic_vcard_birthday_24dp"
android:hint="@string/vcard_role" />
android:layout_gravity="center_vertical"
android:id="@+id/vcard_role"
android:singleLine="true"
/>
<EditText <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/vcard_organization" android:orientation="horizontal"
android:layout_gravity="center_vertical" android:layout_marginRight="16dp"
android:id="@+id/vcard_organization_name" android:layout_marginTop="12dp"
android:singleLine="true" android:layout_marginBottom="8dp"
/>
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/vcard_birth_date"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_birth_date"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:inputType="date"
android:paddingLeft="4dp"
android:paddingRight="8dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:background="@drawable/ripple_background"
/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_close_circle_grey600_24dp"
android:padding="8dp"
android:background="@drawable/ripple_background"
android:id="@+id/vcard_birth_date_remove_button"
/>
</LinearLayout>
</LinearLayout>
<EditText <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/vcard_organization_unit" android:minHeight="72dp"
android:layout_gravity="center_vertical" >
android:id="@+id/vcard_organization_unit"
android:singleLine="true"
/>
</LinearLayout>
</LinearLayout>
<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_job_title_24dp"
/>
<ImageView <LinearLayout
android:layout_width="24dp" android:layout_width="match_parent"
android:layout_height="24dp" android:layout_height="wrap_content"
android:layout_marginLeft="16dp" android:orientation="vertical"
android:layout_marginRight="32dp" android:layout_marginRight="16dp"
android:layout_marginTop="24dp" android:layout_marginTop="8dp"
android:src="@drawable/ic_vcard_web_24dp" android:layout_marginBottom="8dp"
/>
>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_title"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_title"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_role"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_role"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_organization"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_organization_name"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_organization_unit"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_organization_unit"
android:singleLine="true"
/>
</LinearLayout>
<LinearLayout </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"
> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<EditText android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/vcard_url" android:minHeight="72dp"
android:layout_gravity="center_vertical" >
android:id="@+id/vcard_url"
android:singleLine="true"
android:inputType="textUri" />
</LinearLayout>
</LinearLayout>
<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_notes_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"
> <ImageView
<EditText android:layout_width="24dp"
android:layout_width="match_parent" android:layout_height="24dp"
android:layout_height="wrap_content" android:layout_marginLeft="16dp"
android:hint="@string/vcard_decsription" android:layout_marginRight="32dp"
android:layout_gravity="center_vertical" android:layout_marginTop="24dp"
android:id="@+id/vcard_decsription" android:src="@drawable/ic_vcard_web_24dp"
android:singleLine="true" />
/>
</LinearLayout>
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_height="wrap_content" android:orientation="vertical"
android:minHeight="72dp" android:layout_marginRight="16dp"
> android:layout_marginTop="8dp"
<ImageView android:layout_marginBottom="8dp"
android:layout_width="24dp"
android:layout_height="24dp" >
android:layout_marginLeft="16dp" <EditText
android:layout_marginRight="32dp" android:layout_width="match_parent"
android:layout_marginTop="24dp" android:layout_height="wrap_content"
android:src="@drawable/ic_vcard_phone_24dp" android:hint="@string/vcard_url"
/> android:layout_gravity="center_vertical"
android:id="@+id/vcard_url"
android:singleLine="true"
android:inputType="textUri" />
</LinearLayout>
<LinearLayout </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"
> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<EditText android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/vcard_telephone" android:minHeight="72dp"
android:layout_gravity="center_vertical" >
android:id="@+id/vcard_phone_home" <ImageView
android:inputType="phone" android:layout_width="24dp"
android:singleLine="true" android:layout_height="24dp"
/> android:layout_marginLeft="16dp"
<TextView android:layout_marginRight="32dp"
android:layout_width="wrap_content" android:layout_marginTop="24dp"
android:layout_height="wrap_content" android:src="@drawable/ic_vcard_notes_24dp"
android:textColor="?android:attr/textColorSecondary" />
android:singleLine="true" <LinearLayout
android:text="@string/vcard_type_home" 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"
>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_decsription"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_decsription"
android:singleLine="true"
/>
</LinearLayout>
<EditText </LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/vcard_telephone" android:minHeight="72dp"
android:layout_gravity="center_vertical" >
android:id="@+id/vcard_phone_work" <ImageView
android:inputType="phone" android:layout_width="24dp"
android:singleLine="true" android:layout_height="24dp"
/> android:layout_marginLeft="16dp"
<TextView android:layout_marginRight="32dp"
android:layout_width="wrap_content" android:layout_marginTop="24dp"
android:layout_height="wrap_content" android:src="@drawable/ic_vcard_phone_24dp"
android:textColor="?android:attr/textColorSecondary" />
android:singleLine="true"
android:text="@string/vcard_type_work"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_height="wrap_content" android:orientation="vertical"
android:minHeight="72dp" android:layout_marginRight="16dp"
> android:layout_marginTop="8dp"
<ImageView android:layout_marginBottom="8dp"
android:layout_width="24dp"
android:layout_height="24dp" >
android:layout_marginLeft="16dp" <EditText
android:layout_marginRight="32dp" android:layout_width="match_parent"
android:layout_marginTop="24dp" android:layout_height="wrap_content"
android:src="@drawable/ic_vcard_email_24dp" android:hint="@string/vcard_telephone"
/> android:layout_gravity="center_vertical"
android:id="@+id/vcard_phone_home"
android:inputType="phone"
android:singleLine="true"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorSecondary"
android:singleLine="true"
android:text="@string/vcard_type_home"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_telephone"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_phone_work"
android:inputType="phone"
android:singleLine="true"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorSecondary"
android:singleLine="true"
android:text="@string/vcard_type_work"
/>
</LinearLayout>
<LinearLayout </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"
> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<EditText android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/vcard_email" android:minHeight="72dp"
android:layout_gravity="center_vertical" >
android:id="@+id/vcard_email_home" <ImageView
android:inputType="textEmailAddress" android:layout_width="24dp"
android:singleLine="true" android:layout_height="24dp"
/> android:layout_marginLeft="16dp"
<TextView android:layout_marginRight="32dp"
android:layout_width="wrap_content" android:layout_marginTop="24dp"
android:layout_height="wrap_content" android:src="@drawable/ic_vcard_email_24dp"
android:textColor="?android:attr/textColorSecondary" />
<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"
>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_email"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_email_home"
android:inputType="textEmailAddress"
android:singleLine="true"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorSecondary"
android:singleLine="true"
android:text="@string/vcard_type_home"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_email"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_email_work"
android:inputType="textEmailAddress"
android:singleLine="true"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorSecondary"
android:singleLine="true"
android:text="@string/vcard_type_work"
/>
</LinearLayout>
android:singleLine="true" </LinearLayout>
android:text="@string/vcard_type_home"
/>
<EditText <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/vcard_email" android:minHeight="72dp"
android:layout_gravity="center_vertical" >
android:id="@+id/vcard_email_work" <ImageView
android:inputType="textEmailAddress" android:layout_width="24dp"
android:singleLine="true" android:layout_height="24dp"
/> android:layout_marginLeft="16dp"
<TextView android:layout_marginRight="32dp"
android:layout_width="wrap_content" android:layout_marginTop="24dp"
android:layout_height="wrap_content" android:src="@drawable/ic_vcard_address_24dp"
android:textColor="?android:attr/textColorSecondary" />
android:singleLine="true"
android:text="@string/vcard_type_work"
/>
</LinearLayout>
</LinearLayout> <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"
>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_address_pobox"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_address_home_post_office_box"
android:inputType="textPostalAddress"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_address_extadr"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_address_home_post_extended"
android:inputType="textPostalAddress"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_address_street"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_address_home_post_street"
android:inputType="textPostalAddress"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_address_locality"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_address_home_locality"
android:inputType="textPostalAddress"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_address_region"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_address_home_region"
android:inputType="textPostalAddress"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_address_pcode"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_address_home_postal_code"
android:inputType="textPostalAddress"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_address_ctry"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_address_home_country"
android:inputType="textPostalAddress"
android:singleLine="true"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorSecondary"
android:singleLine="true"
android:text="@string/vcard_type_home"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_address_pobox"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_address_work_post_office_box"
android:inputType="textPostalAddress"
android:singleLine="true"
android:layout_marginTop="16dp"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_address_extadr"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_address_work_post_extended"
android:inputType="textPostalAddress"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_address_street"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_address_work_post_street"
android:inputType="textPostalAddress"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_address_locality"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_address_work_locality"
android:inputType="textPostalAddress"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_address_region"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_address_work_region"
android:inputType="textPostalAddress"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_address_pcode"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_address_work_postal_code"
android:inputType="textPostalAddress"
android:singleLine="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/vcard_address_ctry"
android:layout_gravity="center_vertical"
android:id="@+id/vcard_address_work_country"
android:inputType="textPostalAddress"
android:singleLine="true"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorSecondary"
android:singleLine="true"
android:text="@string/vcard_type_work"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
<ProgressBar <ProgressBar
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
<string name="edit_account_user_info">Edit user info</string> <string name="edit_account_user_info">Edit user info</string>
<string name="account_user_info_save_success">Account user info saved successfully</string> <string name="account_user_info_save_success">Account user info saved successfully</string>
<string name="account_user_info_save_fail">Could not save account user info</string> <string name="account_user_info_save_fail">Could not save account user info</string>
<string name="account_user_info_save_started">Saving account user info…</string>
<string name="saving">Saving…</string> <string name="saving">Saving…</string>
<string name="choose_from_gallery">Choose from gallery</string> <string name="choose_from_gallery">Choose from gallery</string>
<string name="take_photo">Take photo</string> <string name="take_photo">Take photo</string>
......
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