Avatar improvements (including glitch while a call is incoming and device in landscape on small screens)
This commit is contained in:
parent
d07d039c53
commit
91cef7c6b9
16 changed files with 83 additions and 120 deletions
|
@ -760,4 +760,10 @@ public abstract class MainActivity extends LinphoneGenericActivity
|
||||||
Log.e(ex);
|
Log.e(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Others
|
||||||
|
|
||||||
|
public SideMenuFragment getSideMenuFragment() {
|
||||||
|
return mSideMenuFragment;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -419,8 +419,9 @@ public class AccountSettingsFragment extends SettingsFragment {
|
||||||
core.setDefaultProxyConfig(mProxyConfig);
|
core.setDefaultProxyConfig(mProxyConfig);
|
||||||
mUseAsDefault.setEnabled(false);
|
mUseAsDefault.setEnabled(false);
|
||||||
}
|
}
|
||||||
// FIXME TODO
|
((SettingsActivity) getActivity())
|
||||||
// LinphoneActivity.instance().refreshAccounts();
|
.getSideMenuFragment()
|
||||||
|
.displayAccountsInSideMenu();
|
||||||
} else {
|
} else {
|
||||||
Log.e("[Account Settings] No proxy config !");
|
Log.e("[Account Settings] No proxy config !");
|
||||||
}
|
}
|
||||||
|
@ -536,9 +537,10 @@ public class AccountSettingsFragment extends SettingsFragment {
|
||||||
core.removeAuthInfo(mAuthInfo);
|
core.removeAuthInfo(mAuthInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// FIXME TODO
|
((SettingsActivity) getActivity()).popBackStack();
|
||||||
/*LinphoneActivity.instance().displaySettings();
|
((SettingsActivity) getActivity())
|
||||||
LinphoneActivity.instance().refreshAccounts();*/
|
.getSideMenuFragment()
|
||||||
|
.displayAccountsInSideMenu();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -187,12 +187,7 @@ public class AdvancedSettingsFragment extends SettingsFragment {
|
||||||
i.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
i.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||||
i.addCategory(Intent.CATEGORY_DEFAULT);
|
i.addCategory(Intent.CATEGORY_DEFAULT);
|
||||||
i.setData(Uri.parse("package:" + context.getPackageName()));
|
i.setData(Uri.parse("package:" + context.getPackageName()));
|
||||||
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
||||||
i.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
|
i.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
|
||||||
i.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
|
|
||||||
// FIXME TODO
|
|
||||||
// startActivityForResult(i,
|
|
||||||
// LinphoneActivity.ANDROID_APP_SETTINGS_ACTIVITY);
|
|
||||||
startActivity(i);
|
startActivity(i);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -21,7 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Paint;
|
import android.graphics.Paint;
|
||||||
import android.graphics.PorterDuff;
|
import android.graphics.PorterDuff;
|
||||||
|
@ -31,12 +30,11 @@ import android.net.Uri;
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import org.linphone.R;
|
|
||||||
|
|
||||||
public class ImageUtils {
|
public class ImageUtils {
|
||||||
|
|
||||||
public static Bitmap getRoundBitmapFromUri(Context context, Uri fromPictureUri) {
|
public static Bitmap getRoundBitmapFromUri(Context context, Uri fromPictureUri) {
|
||||||
Bitmap bm;
|
Bitmap bm = null;
|
||||||
Bitmap roundBm;
|
Bitmap roundBm;
|
||||||
if (fromPictureUri != null) {
|
if (fromPictureUri != null) {
|
||||||
try {
|
try {
|
||||||
|
@ -44,10 +42,8 @@ public class ImageUtils {
|
||||||
MediaStore.Images.Media.getBitmap(
|
MediaStore.Images.Media.getBitmap(
|
||||||
context.getContentResolver(), fromPictureUri);
|
context.getContentResolver(), fromPictureUri);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
bm = BitmapFactory.decodeResource(context.getResources(), R.drawable.topbar_avatar);
|
return null;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
bm = BitmapFactory.decodeResource(context.getResources(), R.drawable.topbar_avatar);
|
|
||||||
}
|
}
|
||||||
if (bm != null) {
|
if (bm != null) {
|
||||||
roundBm = getRoundBitmap(bm);
|
roundBm = getRoundBitmap(bm);
|
||||||
|
|
|
@ -27,7 +27,6 @@ import android.graphics.Bitmap;
|
||||||
import android.graphics.drawable.Icon;
|
import android.graphics.drawable.Icon;
|
||||||
import android.util.ArraySet;
|
import android.util.ArraySet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import org.linphone.LinphoneService;
|
|
||||||
import org.linphone.R;
|
import org.linphone.R;
|
||||||
import org.linphone.chat.ChatActivity;
|
import org.linphone.chat.ChatActivity;
|
||||||
import org.linphone.contacts.ContactsManager;
|
import org.linphone.contacts.ContactsManager;
|
||||||
|
@ -59,9 +58,7 @@ public class LinphoneShortcutManager {
|
||||||
|
|
||||||
Bitmap bm = null;
|
Bitmap bm = null;
|
||||||
if (contact != null && contact.getThumbnailUri() != null) {
|
if (contact != null && contact.getThumbnailUri() != null) {
|
||||||
bm =
|
bm = ImageUtils.getRoundBitmapFromUri(mContext, contact.getThumbnailUri());
|
||||||
ImageUtils.getRoundBitmapFromUri(
|
|
||||||
LinphoneService.instance(), contact.getThumbnailUri());
|
|
||||||
}
|
}
|
||||||
Icon icon =
|
Icon icon =
|
||||||
bm == null
|
bm == null
|
||||||
|
@ -101,9 +98,7 @@ public class LinphoneShortcutManager {
|
||||||
if (contact != null) {
|
if (contact != null) {
|
||||||
Bitmap bm = null;
|
Bitmap bm = null;
|
||||||
if (contact != null && contact.getThumbnailUri() != null) {
|
if (contact != null && contact.getThumbnailUri() != null) {
|
||||||
bm =
|
bm = ImageUtils.getRoundBitmapFromUri(mContext, contact.getThumbnailUri());
|
||||||
ImageUtils.getRoundBitmapFromUri(
|
|
||||||
LinphoneService.instance(), contact.getThumbnailUri());
|
|
||||||
}
|
}
|
||||||
Icon icon =
|
Icon icon =
|
||||||
bm == null
|
bm == null
|
||||||
|
|
|
@ -20,35 +20,33 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.provider.MediaStore;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import java.io.IOException;
|
|
||||||
import org.linphone.LinphoneService;
|
|
||||||
import org.linphone.R;
|
import org.linphone.R;
|
||||||
import org.linphone.contacts.LinphoneContact;
|
import org.linphone.contacts.LinphoneContact;
|
||||||
import org.linphone.core.ChatRoomSecurityLevel;
|
import org.linphone.core.ChatRoomSecurityLevel;
|
||||||
import org.linphone.core.tools.Log;
|
import org.linphone.utils.ImageUtils;
|
||||||
|
|
||||||
class ContactAvatarHolder {
|
class ContactAvatarHolder {
|
||||||
public final ImageView contactPicture;
|
public final ImageView contactPicture;
|
||||||
public final ImageView avatarMask;
|
|
||||||
public final ImageView avatarBorder;
|
public final ImageView avatarBorder;
|
||||||
public final ImageView securityLevel;
|
public final ImageView securityLevel;
|
||||||
public final TextView generatedAvatar;
|
public final TextView generatedAvatar;
|
||||||
|
public final ImageView generatedAvatarBackground;
|
||||||
|
|
||||||
public ContactAvatarHolder(View v) {
|
public ContactAvatarHolder(View v) {
|
||||||
contactPicture = v.findViewById(R.id.contact_picture);
|
contactPicture = v.findViewById(R.id.contact_picture);
|
||||||
avatarMask = v.findViewById(R.id.mask);
|
|
||||||
securityLevel = v.findViewById(R.id.security_level);
|
securityLevel = v.findViewById(R.id.security_level);
|
||||||
generatedAvatar = v.findViewById(R.id.generated_avatar);
|
generatedAvatar = v.findViewById(R.id.generated_avatar);
|
||||||
|
generatedAvatarBackground = v.findViewById(R.id.generated_avatar_background);
|
||||||
avatarBorder = v.findViewById(R.id.border);
|
avatarBorder = v.findViewById(R.id.border);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
contactPicture.setVisibility(View.VISIBLE);
|
contactPicture.setVisibility(View.VISIBLE);
|
||||||
generatedAvatar.setVisibility(View.VISIBLE);
|
generatedAvatar.setVisibility(View.VISIBLE);
|
||||||
|
generatedAvatarBackground.setVisibility(View.VISIBLE);
|
||||||
securityLevel.setVisibility(View.GONE);
|
securityLevel.setVisibility(View.GONE);
|
||||||
avatarBorder.setVisibility(View.GONE);
|
avatarBorder.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
@ -99,8 +97,7 @@ public class ContactAvatar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void displayAvatar(
|
public static void displayAvatar(String displayName, View v, boolean showBorder) {
|
||||||
String displayName, View v, boolean showBorder, int maskResource) {
|
|
||||||
if (displayName == null || v == null) return;
|
if (displayName == null || v == null) return;
|
||||||
|
|
||||||
ContactAvatarHolder holder = new ContactAvatarHolder(v);
|
ContactAvatarHolder holder = new ContactAvatarHolder(v);
|
||||||
|
@ -112,31 +109,27 @@ public class ContactAvatar {
|
||||||
// If display name is a phone number, use default avatar because generated one will be
|
// If display name is a phone number, use default avatar because generated one will be
|
||||||
// +...
|
// +...
|
||||||
holder.generatedAvatar.setVisibility(View.GONE);
|
holder.generatedAvatar.setVisibility(View.GONE);
|
||||||
|
holder.generatedAvatarBackground.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
String generatedAvatar = generateAvatar(displayName);
|
String generatedAvatar = generateAvatar(displayName);
|
||||||
if (generatedAvatar != null && generatedAvatar.length() > 0) {
|
if (generatedAvatar != null && generatedAvatar.length() > 0) {
|
||||||
holder.generatedAvatar.setText(generatedAvatar);
|
holder.generatedAvatar.setText(generatedAvatar);
|
||||||
holder.generatedAvatar.setVisibility(View.VISIBLE);
|
holder.generatedAvatar.setVisibility(View.VISIBLE);
|
||||||
|
holder.generatedAvatarBackground.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
holder.generatedAvatar.setVisibility(View.GONE);
|
holder.generatedAvatar.setVisibility(View.GONE);
|
||||||
|
holder.generatedAvatarBackground.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
holder.securityLevel.setVisibility(View.GONE);
|
holder.securityLevel.setVisibility(View.GONE);
|
||||||
|
|
||||||
if (maskResource != 0) {
|
|
||||||
holder.avatarMask.setImageResource(maskResource);
|
|
||||||
}
|
|
||||||
if (showBorder) {
|
if (showBorder) {
|
||||||
holder.avatarBorder.setVisibility(View.VISIBLE);
|
holder.avatarBorder.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void displayAvatar(String displayName, View v, boolean showBorder) {
|
|
||||||
displayAvatar(displayName, v, showBorder, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void displayAvatar(String displayName, View v) {
|
public static void displayAvatar(String displayName, View v) {
|
||||||
displayAvatar(displayName, v, false, 0);
|
displayAvatar(displayName, v, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void displayAvatar(
|
public static void displayAvatar(
|
||||||
|
@ -145,8 +138,7 @@ public class ContactAvatar {
|
||||||
setSecurityLevel(securityLevel, v);
|
setSecurityLevel(securityLevel, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void displayAvatar(
|
public static void displayAvatar(LinphoneContact contact, View v, boolean showBorder) {
|
||||||
LinphoneContact contact, View v, boolean showBorder, int maskResource) {
|
|
||||||
if (contact == null || v == null) return;
|
if (contact == null || v == null) return;
|
||||||
|
|
||||||
ContactAvatarHolder holder = new ContactAvatarHolder(v);
|
ContactAvatarHolder holder = new ContactAvatarHolder(v);
|
||||||
|
@ -163,47 +155,28 @@ public class ContactAvatar {
|
||||||
: contact.getFullName()));
|
: contact.getFullName()));
|
||||||
|
|
||||||
holder.generatedAvatar.setVisibility(View.GONE);
|
holder.generatedAvatar.setVisibility(View.GONE);
|
||||||
|
holder.generatedAvatarBackground.setVisibility(View.GONE);
|
||||||
holder.contactPicture.setVisibility(View.VISIBLE);
|
holder.contactPicture.setVisibility(View.VISIBLE);
|
||||||
holder.securityLevel.setVisibility(View.GONE);
|
holder.securityLevel.setVisibility(View.GONE);
|
||||||
|
|
||||||
Bitmap bm = null;
|
Bitmap bm = ImageUtils.getRoundBitmapFromUri(v.getContext(), contact.getThumbnailUri());
|
||||||
try {
|
|
||||||
if (contact.getThumbnailUri() != null) {
|
|
||||||
bm =
|
|
||||||
MediaStore.Images.Media.getBitmap(
|
|
||||||
LinphoneService.instance().getContentResolver(),
|
|
||||||
contact.getThumbnailUri());
|
|
||||||
}
|
|
||||||
} catch (IOException e) {
|
|
||||||
Log.e(e);
|
|
||||||
}
|
|
||||||
if (bm != null) {
|
if (bm != null) {
|
||||||
holder.contactPicture.setImageBitmap(bm);
|
holder.contactPicture.setImageBitmap(bm);
|
||||||
holder.contactPicture.setVisibility(View.VISIBLE);
|
holder.contactPicture.setVisibility(View.VISIBLE);
|
||||||
holder.generatedAvatar.setVisibility(View.GONE);
|
holder.generatedAvatar.setVisibility(View.GONE);
|
||||||
|
holder.generatedAvatarBackground.setVisibility(View.GONE);
|
||||||
} else if (generated_avatars) {
|
} else if (generated_avatars) {
|
||||||
holder.generatedAvatar.setText(
|
|
||||||
generateAvatar(
|
|
||||||
contact.getFullName() == null
|
|
||||||
? contact.getFirstName() + " " + contact.getLastName()
|
|
||||||
: contact.getFullName()));
|
|
||||||
holder.generatedAvatar.setVisibility(View.VISIBLE);
|
holder.generatedAvatar.setVisibility(View.VISIBLE);
|
||||||
|
holder.generatedAvatarBackground.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (maskResource != 0) {
|
|
||||||
holder.avatarMask.setImageResource(maskResource);
|
|
||||||
}
|
|
||||||
if (showBorder) {
|
if (showBorder) {
|
||||||
holder.avatarBorder.setVisibility(View.VISIBLE);
|
holder.avatarBorder.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void displayAvatar(LinphoneContact contact, View v, boolean showBorder) {
|
|
||||||
displayAvatar(contact, v, showBorder, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void displayAvatar(LinphoneContact contact, View v) {
|
public static void displayAvatar(LinphoneContact contact, View v) {
|
||||||
displayAvatar(contact, v, false, 0);
|
displayAvatar(contact, v, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void displayAvatar(
|
public static void displayAvatar(
|
||||||
|
@ -224,6 +197,7 @@ public class ContactAvatar {
|
||||||
ContactAvatarHolder holder = new ContactAvatarHolder(v);
|
ContactAvatarHolder holder = new ContactAvatarHolder(v);
|
||||||
holder.contactPicture.setImageResource(R.drawable.chat_group_avatar);
|
holder.contactPicture.setImageResource(R.drawable.chat_group_avatar);
|
||||||
holder.generatedAvatar.setVisibility(View.GONE);
|
holder.generatedAvatar.setVisibility(View.GONE);
|
||||||
|
holder.generatedAvatarBackground.setVisibility(View.GONE);
|
||||||
holder.securityLevel.setVisibility(View.GONE);
|
holder.securityLevel.setVisibility(View.GONE);
|
||||||
holder.avatarBorder.setVisibility(View.GONE);
|
holder.avatarBorder.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 26 KiB |
5
app/src/main/res/drawable/avatar_border.xml
Normal file
5
app/src/main/res/drawable/avatar_border.xml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||||
|
<stroke android:width="5dp" android:color="?attr/accentColor"/>
|
||||||
|
<size android:width="200dp" android:height="200dp" />
|
||||||
|
</shape>
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||||
<solid android:color="?attr/primaryTextColor"/>
|
<solid android:color="?attr/primaryTextColor"/>
|
||||||
<size android:width="35dp" android:height="35dp"/>
|
<size android:width="35dp" android:height="35dp" />
|
||||||
</shape>
|
</shape>
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:alpha="0.8"
|
android:alpha="0.8"
|
||||||
android:background="@color/white_color"
|
android:background="?attr/backgroundColor"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center" />
|
android:layout_gravity="center" />
|
||||||
|
remote_pause
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
android:id="@+id/pause"
|
android:id="@+id/pause"
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="80dp"
|
android:layout_height="80dp"
|
||||||
android:layout_below="@+id/active_call_info"
|
android:layout_below="@id/active_call_info"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:contentDescription="@string/content_description_pause"
|
android:contentDescription="@string/content_description_pause"
|
||||||
android:padding="20dp"
|
android:padding="20dp"
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
android:id="@+id/switchCamera"
|
android:id="@+id/switchCamera"
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="80dp"
|
android:layout_height="80dp"
|
||||||
android:layout_below="@+id/active_call_info"
|
android:layout_below="@id/active_call_info"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:contentDescription="@string/content_description_switch_camera"
|
android:contentDescription="@string/content_description_switch_camera"
|
||||||
android:padding="20dp"
|
android:padding="20dp"
|
||||||
|
|
|
@ -112,7 +112,7 @@
|
||||||
android:id="@+id/pause"
|
android:id="@+id/pause"
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_below="@+id/active_call_info"
|
android:layout_below="@id/active_call_info"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_margin="20dp"
|
android:layout_margin="20dp"
|
||||||
android:contentDescription="@string/content_description_pause"
|
android:contentDescription="@string/content_description_pause"
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
android:id="@+id/switchCamera"
|
android:id="@+id/switchCamera"
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_below="@+id/active_call_info"
|
android:layout_below="@id/active_call_info"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_margin="20dp"
|
android:layout_margin="20dp"
|
||||||
android:contentDescription="@string/content_description_switch_camera"
|
android:contentDescription="@string/content_description_switch_camera"
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
android:id="@+id/avatar"
|
android:id="@+id/avatar"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_margin="5dp"
|
||||||
android:gravity="center">
|
android:gravity="center">
|
||||||
|
|
||||||
<include layout="@layout/contact_avatar" />
|
<include layout="@layout/contact_avatar" />
|
||||||
|
|
|
@ -12,33 +12,30 @@
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:src="@drawable/avatar" />
|
android:src="@drawable/avatar" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/generated_avatar_background"
|
||||||
|
android:layout_width="35dp"
|
||||||
|
android:layout_height="35dp"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:src="@drawable/generated_avatar_bg" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/generated_avatar"
|
android:id="@+id/generated_avatar"
|
||||||
style="@style/generated_contact_avatar_font"
|
style="@style/generated_contact_avatar_font"
|
||||||
android:layout_width="35dp"
|
android:layout_width="35dp"
|
||||||
android:layout_height="35dp"
|
android:layout_height="35dp"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:background="@drawable/generated_avatar_bg"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1" />
|
android:maxLines="1" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/mask"
|
|
||||||
android:layout_width="35dp"
|
|
||||||
android:layout_height="35dp"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:src="@drawable/avatar_mask"
|
|
||||||
android:tint="?attr/backgroundColor" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/border"
|
android:id="@+id/border"
|
||||||
android:layout_width="35dp"
|
android:layout_width="35dp"
|
||||||
android:layout_height="35dp"
|
android:layout_height="35dp"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:src="@drawable/avatar_border"
|
android:src="@drawable/avatar_border" />
|
||||||
android:tint="?attr/accentColor" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/security_level"
|
android:id="@+id/security_level"
|
||||||
|
|
|
@ -12,33 +12,30 @@
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:src="@drawable/avatar" />
|
android:src="@drawable/avatar" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/generated_avatar_background"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="100dp"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:src="@drawable/generated_avatar_bg" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/generated_avatar"
|
android:id="@+id/generated_avatar"
|
||||||
style="@style/generated_contact_avatar_100_font"
|
style="@style/generated_contact_avatar_100_font"
|
||||||
android:layout_width="100dp"
|
android:layout_width="100dp"
|
||||||
android:layout_height="100dp"
|
android:layout_height="100dp"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:background="@drawable/generated_avatar_bg"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1" />
|
android:maxLines="1" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/mask"
|
|
||||||
android:layout_width="100dp"
|
|
||||||
android:layout_height="100dp"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:src="@drawable/avatar_mask"
|
|
||||||
android:tint="?attr/backgroundColor" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/border"
|
android:id="@+id/border"
|
||||||
android:layout_width="100dp"
|
android:layout_width="100dp"
|
||||||
android:layout_height="100dp"
|
android:layout_height="100dp"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:src="@drawable/avatar_border"
|
android:src="@drawable/avatar_border" />
|
||||||
android:tint="?attr/accentColor" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/security_level"
|
android:id="@+id/security_level"
|
||||||
|
|
|
@ -12,33 +12,30 @@
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:src="@drawable/avatar" />
|
android:src="@drawable/avatar" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/generated_avatar_background"
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="200dp"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:src="@drawable/generated_avatar_bg" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/generated_avatar"
|
android:id="@+id/generated_avatar"
|
||||||
style="@style/generated_contact_avatar_100_font"
|
style="@style/generated_contact_avatar_100_font"
|
||||||
android:layout_width="200dp"
|
android:layout_width="200dp"
|
||||||
android:layout_height="200dp"
|
android:layout_height="200dp"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:background="@drawable/generated_avatar_bg"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1" />
|
android:maxLines="1" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/mask"
|
|
||||||
android:layout_width="200dp"
|
|
||||||
android:layout_height="200dp"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:src="@drawable/avatar_mask"
|
|
||||||
android:tint="?attr/backgroundColor" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/border"
|
android:id="@+id/border"
|
||||||
android:layout_width="200dp"
|
android:layout_width="200dp"
|
||||||
android:layout_height="200dp"
|
android:layout_height="200dp"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:src="@drawable/avatar_border"
|
android:src="@drawable/avatar_border" />
|
||||||
android:tint="?attr/accentColor" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/security_level"
|
android:id="@+id/security_level"
|
||||||
|
|
|
@ -12,33 +12,30 @@
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:src="@drawable/avatar" />
|
android:src="@drawable/avatar" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/generated_avatar_background"
|
||||||
|
android:layout_width="35dp"
|
||||||
|
android:layout_height="35dp"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:src="@drawable/generated_avatar_bg" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/generated_avatar"
|
android:id="@+id/generated_avatar"
|
||||||
style="@style/generated_contact_avatar_font"
|
style="@style/generated_contact_avatar_font"
|
||||||
android:layout_width="35dp"
|
android:layout_width="35dp"
|
||||||
android:layout_height="35dp"
|
android:layout_height="35dp"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:background="@drawable/generated_avatar_bg"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1" />
|
android:maxLines="1" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/mask"
|
|
||||||
android:layout_width="35dp"
|
|
||||||
android:layout_height="35dp"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:src="@drawable/avatar_mask"
|
|
||||||
android:tint="?attr/accentColorLight30"/>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/border"
|
android:id="@+id/border"
|
||||||
android:layout_width="35dp"
|
android:layout_width="35dp"
|
||||||
android:layout_height="35dp"
|
android:layout_height="35dp"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:src="@drawable/avatar_border"
|
android:src="@drawable/avatar_border" />
|
||||||
android:tint="?attr/accentColor" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/security_level"
|
android:id="@+id/security_level"
|
||||||
|
|
Loading…
Reference in a new issue