Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xabber-android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
xabber-android
Commits
faea0b38
Commit
faea0b38
authored
Aug 06, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/1.0.39'
parents
67a1a595
23515f73
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
794 additions
and
462 deletions
+794
-462
build.gradle
app/build.gradle
+2
-2
VCardManager.java
...com/xabber/android/data/extension/vcard/VCardManager.java
+17
-4
AccountInfoEditor.java
...rc/main/java/com/xabber/android/ui/AccountInfoEditor.java
+5
-0
AccountInfoEditorFragment.java
...java/com/xabber/android/ui/AccountInfoEditorFragment.java
+123
-21
AccountViewer.java
app/src/main/java/com/xabber/android/ui/AccountViewer.java
+1
-2
account_info_editor_fragment.xml
app/src/main/res/layout/account_info_editor_fragment.xml
+646
-432
contact_viewer.xml
app/src/main/res/values/contact_viewer.xml
+0
-1
No files found.
app/build.gradle
View file @
faea0b38
...
...
@@ -7,8 +7,8 @@ android {
defaultConfig
{
minSdkVersion
14
targetSdkVersion
22
versionCode
21
1
versionName
'1.0.3
8
'
versionCode
21
2
versionName
'1.0.3
9
'
}
compileOptions
{
...
...
app/src/main/java/com/xabber/android/data/extension/vcard/VCardManager.java
View file @
faea0b38
...
...
@@ -25,6 +25,7 @@ import com.xabber.android.data.account.AccountManager;
import
com.xabber.android.data.account.OnAccountRemovedListener
;
import
com.xabber.android.data.connection.ConnectionItem
;
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.extension.avatar.AvatarManager
;
import
com.xabber.android.data.roster.OnRosterChangedListener
;
...
...
@@ -35,8 +36,8 @@ import com.xabber.android.data.roster.StructuredName;
import
com.xabber.xmpp.address.Jid
;
import
com.xabber.xmpp.vcard.VCardProperty
;
import
org.jivesoftware.smack.AbstractXMPPConnection
;
import
org.jivesoftware.smack.SmackException
;
import
org.jivesoftware.smack.XMPPConnection
;
import
org.jivesoftware.smack.XMPPException
;
import
org.jivesoftware.smack.packet.IQ.Type
;
import
org.jivesoftware.smack.packet.Presence
;
...
...
@@ -261,8 +262,14 @@ public class VCardManager implements OnLoadListener, OnPacketListener,
private
void
requestVCard
(
final
String
account
,
final
String
srcUser
)
{
final
String
user
=
Jid
.
getBareAddress
(
srcUser
);
final
XMPPConnection
xmppConnection
=
AccountManager
.
getInstance
().
getAccount
(
account
).
getConnectionThread
().
getXMPPConnection
();
final
org
.
jivesoftware
.
smackx
.
vcardtemp
.
VCardManager
vCardManager
=
org
.
jivesoftware
.
smackx
.
vcardtemp
.
VCardManager
.
getInstanceFor
(
xmppConnection
);
ConnectionThread
connectionThread
=
AccountManager
.
getInstance
().
getAccount
(
account
).
getConnectionThread
();
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
)
{
@Override
...
...
@@ -305,7 +312,13 @@ public class VCardManager implements OnLoadListener, OnPacketListener,
}
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
Thread
thread
=
new
Thread
(
"Save vCard for account "
+
account
)
{
...
...
app/src/main/java/com/xabber/android/ui/AccountInfoEditor.java
View file @
faea0b38
...
...
@@ -73,6 +73,7 @@ public class AccountInfoEditor extends ManagedActivity implements Toolbar.OnMenu
toolbar
.
inflateMenu
(
SAVE_MENU
);
toolbar
.
setOnMenuItemClickListener
(
this
);
toolbar
.
getMenu
().
findItem
(
R
.
id
.
action_save
).
setEnabled
(
false
);
}
@Override
...
...
@@ -115,6 +116,10 @@ public class AccountInfoEditor extends ManagedActivity implements Toolbar.OnMenu
@Override
public
void
onVCardSavingFinished
()
{
toolbar
.
setTitle
(
R
.
string
.
edit_account_user_info
);
}
@Override
public
void
enableSave
()
{
toolbar
.
getMenu
().
findItem
(
R
.
id
.
action_save
).
setEnabled
(
true
);
}
}
app/src/main/java/com/xabber/android/ui/AccountInfoEditorFragment.java
View file @
faea0b38
...
...
@@ -8,6 +8,8 @@ import android.net.Uri;
import
android.os.Bundle
;
import
android.provider.MediaStore
;
import
android.support.annotation.Nullable
;
import
android.text.Editable
;
import
android.text.TextWatcher
;
import
android.view.LayoutInflater
;
import
android.view.MenuItem
;
import
android.view.View
;
...
...
@@ -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.VCardManager
;
import
com.xabber.xmpp.address.Jid
;
import
com.xabber.xmpp.vcard.AddressProperty
;
import
com.xabber.xmpp.vcard.TelephoneType
;
import
com.xabber.xmpp.vcard.VCardProperty
;
...
...
@@ -49,7 +52,7 @@ import java.util.GregorianCalendar;
import
java.util.Locale
;
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_VCARD
=
"com.xabber.android.ui.AccountInfoEditorFragment.ARGUMENT_USER"
;
...
...
@@ -97,10 +100,27 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
private
Uri
photoFileUri
;
private
boolean
removeAvatarFlag
=
false
;
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
{
void
onVCardSavingStarted
();
void
onVCardSavingFinished
();
void
enableSave
();
}
public
static
AccountInfoEditorFragment
newInstance
(
String
account
,
String
vCard
)
{
...
...
@@ -147,17 +167,18 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
progressBar
=
view
.
findViewById
(
R
.
id
.
vcard_save_progress_bar
);
a
vatarSize
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
vcard_avatar_size_text_view
);
a
ccount_jid
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
vcard_jid
);
prefixName
=
(
EditText
)
view
.
findViewById
(
R
.
id
.
vcard_prefix_name
);
formattedName
=
(
EditText
)
view
.
findViewById
(
R
.
id
.
vcard_formatted_name
);
givenName
=
(
EditText
)
view
.
findViewById
(
R
.
id
.
vcard_given_name
);
middleName
=
(
EditText
)
view
.
findViewById
(
R
.
id
.
vcard_middle_name
);
familyName
=
(
EditText
)
view
.
findViewById
(
R
.
id
.
vcard_family_name
);
suffixName
=
(
EditText
)
view
.
findViewById
(
R
.
id
.
vcard_suffix_name
);
nickName
=
(
EditText
)
view
.
findViewById
(
R
.
id
.
vcard_nickname
);
prefixName
=
setUpInputField
(
view
,
R
.
id
.
vcard_prefix_name
);
formattedName
=
setUpInputField
(
view
,
R
.
id
.
vcard_formatted_name
);
givenName
=
setUpInputField
(
view
,
R
.
id
.
vcard_given_name
);
middleName
=
setUpInputField
(
view
,
R
.
id
.
vcard_middle_name
);
familyName
=
setUpInputField
(
view
,
R
.
id
.
vcard_family_name
);
suffixName
=
setUpInputField
(
view
,
R
.
id
.
vcard_suffix_name
);
nickName
=
setUpInputField
(
view
,
R
.
id
.
vcard_nickname
);
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
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
...
...
@@ -174,6 +195,7 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
datePicker
.
show
();
}
});
birthDate
.
addTextChangedListener
(
this
);
birthDateRemoveButton
=
view
.
findViewById
(
R
.
id
.
vcard_birth_date_remove_button
);
birthDateRemoveButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
...
...
@@ -183,26 +205,48 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
}
});
title
=
(
EditText
)
view
.
findViewById
(
R
.
id
.
vcard_title
);
role
=
(
EditText
)
view
.
findViewById
(
R
.
id
.
vcard_role
);
organization
=
(
EditText
)
view
.
findViewById
(
R
.
id
.
vcard_organization_name
);
organizationUnit
=
(
EditText
)
view
.
findViewById
(
R
.
id
.
vcard_organization_unit
);
title
=
setUpInputField
(
view
,
R
.
id
.
vcard_title
);
role
=
setUpInputField
(
view
,
R
.
id
.
vcard_role
);
organization
=
setUpInputField
(
view
,
R
.
id
.
vcard_organization_name
);
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
);
phoneWork
=
(
EditText
)
view
.
findViewById
(
R
.
id
.
vcard_phone_work
);
addressHomePostOfficeBox
=
setUpInputField
(
view
,
R
.
id
.
vcard_address_home_post_office_box
);
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
);
emailWork
=
(
EditText
)
view
.
findViewById
(
R
.
id
.
vcard_email_work
);
addressWorkPostOfficeBox
=
setUpInputField
(
view
,
R
.
id
.
vcard_address_work_post_office_box
);
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
();
return
view
;
}
private
EditText
setUpInputField
(
View
rootView
,
int
resourceId
)
{
EditText
inputField
=
(
EditText
)
rootView
.
findViewById
(
resourceId
);
inputField
.
addTextChangedListener
(
this
);
return
inputField
;
}
@Override
public
void
onResume
()
{
super
.
onResume
();
...
...
@@ -231,6 +275,10 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
}
private
void
setFieldsFromVCard
()
{
updateFromVCardFlag
=
true
;
account_jid
.
setText
(
Jid
.
getBareAddress
(
account
));
formattedName
.
setText
(
vCard
.
getField
(
VCardProperty
.
FN
.
name
()));
prefixName
.
setText
(
vCard
.
getPrefix
());
givenName
.
setText
(
vCard
.
getFirstName
());
...
...
@@ -270,6 +318,24 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
emailHome
.
setText
(
vCard
.
getEmailHome
());
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
()
{
...
...
@@ -368,6 +434,8 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
newAvatarImageUri
=
null
;
removeAvatarFlag
=
true
;
avatar
.
setImageDrawable
(
AvatarManager
.
getInstance
().
getDefaultAccountAvatar
(
account
));
listener
.
enableSave
();
avatarSize
.
setVisibility
(
View
.
INVISIBLE
);
}
@Override
...
...
@@ -397,6 +465,7 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
File
file
=
new
File
(
newAvatarImageUri
.
getPath
());
avatarSize
.
setText
(
file
.
length
()
/
KB_SIZE_IN_BYTES
+
"KB"
);
avatarSize
.
setVisibility
(
View
.
VISIBLE
);
listener
.
enableSave
();
}
else
if
(
resultCode
==
Crop
.
RESULT_ERROR
)
{
avatarSize
.
setVisibility
(
View
.
INVISIBLE
);
Toast
.
makeText
(
getActivity
(),
Crop
.
getError
(
result
).
getMessage
(),
Toast
.
LENGTH_SHORT
).
show
();
...
...
@@ -457,15 +526,30 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
vCard
.
setEmailHome
(
getValueFromEditText
(
emailHome
));
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
()
{
ChatViewer
.
hideKeyboard
(
getActivity
());
updateVCardFromFields
();
enableProgressMode
();
VCardManager
.
getInstance
().
saveVCard
(
account
,
vCard
);
isSaveSuccess
=
false
;
enableProgressMode
();
}
public
void
enableProgressMode
()
{
...
...
@@ -508,6 +592,7 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
}
disableProgressMode
();
listener
.
enableSave
();
Toast
.
makeText
(
getActivity
(),
getString
(
R
.
string
.
account_user_info_save_fail
),
Toast
.
LENGTH_LONG
).
show
();
isSaveSuccess
=
false
;
}
...
...
@@ -564,4 +649,21 @@ public class AccountInfoEditorFragment extends Fragment implements OnVCardSaveLi
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
)
{
}
}
app/src/main/java/com/xabber/android/ui/AccountViewer.java
View file @
faea0b38
...
...
@@ -9,7 +9,6 @@ import android.view.MenuItem;
import
com.xabber.android.R
;
import
com.xabber.android.data.intent.EntityIntentBuilder
;
import
com.xabber.android.data.roster.GroupManager
;
import
com.xabber.xmpp.address.Jid
;
import
com.xabber.xmpp.vcard.VCardProperty
;
...
...
@@ -26,7 +25,7 @@ public class AccountViewer extends ContactViewer implements Toolbar.OnMenuItemCl
public
static
Intent
createIntent
(
Context
context
,
String
account
)
{
return
new
EntityIntentBuilder
(
context
,
AccountViewer
.
class
)
.
setAccount
(
account
).
setUser
(
GroupManager
.
IS_ACCOUNT
).
build
();
.
setAccount
(
account
).
setUser
(
Jid
.
getBareAddress
(
account
)
).
build
();
}
@Override
...
...
app/src/main/res/layout/account_info_editor_fragment.xml
View file @
faea0b38
...
...
@@ -5,505 +5,719 @@
android:layout_height=
"match_parent"
>
<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"
<ScrollView
xmlns:android=
"http://schemas.android.com/apk/res/android"
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_contact_info_24dp"
/>
android:layout_height=
"match_parent"
>
<LinearLayout
android:orientation=
"vertical"
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"
android:id=
"@+id/vcard_fields_layout"
>
<EditText
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"horizontal"
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"
/>
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"
/>
<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"
/>
<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>
<EditText
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"horizontal"
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"
/>
android:minHeight=
"72dp"
>
<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
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"
/>
<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_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
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"
/>
</LinearLayout>
<EditText
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"horizontal"
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>
</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"
android:minHeight=
"72dp"
>
<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"
<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
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"
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
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"horizontal"
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"
/>
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"
/>
<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"
/>
<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>
<EditText
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"horizontal"
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>
android:minHeight=
"72dp"
>
<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
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_web_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_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
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>
>
<EditText
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"@string/vcard_url"
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"
/>
android:minHeight=
"72dp"
>
<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_decsription"
android:layout_gravity=
"center_vertical"
android:id=
"@+id/vcard_decsription"
android:singleLine=
"true"
/>
</LinearLayout>
</LinearLayout>
<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_web_24dp"
/>
<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_phone_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_height=
"wrap_content"
android:hint=
"@string/vcard_url"
android:layout_gravity=
"center_vertical"
android:id=
"@+id/vcard_url"
android:singleLine=
"true"
android:inputType=
"textUri"
/>
</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>
>
<EditText
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"horizontal"
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_home"
android:inputType=
"phone
"
android:singleLine=
"true
"
/>
<TextView
android:layout_width=
"wrap_content
"
android:layout_height=
"wrap_content
"
android:textColor=
"?android:attr/textColorSecondary"
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
"
/>
android:singleLine=
"true"
android:text=
"@string/vcard_type_home"
/>
<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_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_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>
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_phone_24dp"
/>
<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_email_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_height=
"wrap_content"
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
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>
>
<EditText
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"horizontal"
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: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_email_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_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"
android:text=
"@string/vcard_type_home"
/>
</LinearLayout>
<EditText
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"horizontal"
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: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_address_24dp"
/>
</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>
</ScrollView>
</ScrollView>
<ProgressBar
android:layout_width=
"wrap_content"
...
...
app/src/main/res/values/contact_viewer.xml
View file @
faea0b38
...
...
@@ -52,7 +52,6 @@
<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_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=
"choose_from_gallery"
>
Choose from gallery
</string>
<string
name=
"take_photo"
>
Take photo
</string>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment