mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-30 19:57:45 +00:00
Fix look of default group photo in conversation preferences view
Fixes #7022 // FREEBIE
This commit is contained in:
parent
9389fe47bd
commit
b34eb08088
7
res/drawable/ic_group_large.xml
Normal file
7
res/drawable/ic_group_large.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<vector android:height="480dp"
|
||||
android:width="480dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/gray20" android:pathData="M16,11c1.66,0 2.99,-1.34 2.99,-3S17.66,5 16,5c-1.66,0 -3,1.34 -3,3s1.34,3 3,3zM8,11c1.66,0 2.99,-1.34 2.99,-3S9.66,5 8,5C6.34,5 5,6.34 5,8s1.34,3 3,3zM8,13c-2.33,0 -7,1.17 -7,3.5L1,19h14v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5zM16,13c-0.29,0 -0.62,0.02 -0.97,0.05 1.16,0.84 1.97,1.97 1.97,3.45L17,19h6v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5z"/>
|
||||
</vector>
|
4
res/drawable/ic_person_large.xml
Normal file
4
res/drawable/ic_person_large.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<vector android:height="480dp" android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0" android:width="480dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@color/gray20" android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
|
||||
</vector>
|
@ -26,7 +26,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:background="@color/black"
|
||||
android:transitionName="avatar"
|
||||
app:layout_collapseMode="parallax"
|
||||
app:layout_collapseParallaxMultiplier="0.7"/>
|
||||
|
@ -43,11 +43,10 @@
|
||||
<ImageView android:id="@+id/photo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/black"
|
||||
android:scaleType="centerCrop"
|
||||
android:visibility="visible"
|
||||
android:clickable="true"
|
||||
tools:src="@drawable/ic_contact_picture_large"
|
||||
tools:src="@drawable/ic_person_large"
|
||||
/>
|
||||
|
||||
<LinearLayout android:id="@+id/untrusted_layout"
|
||||
|
@ -39,7 +39,7 @@ public class ContactPhotoFactory {
|
||||
}
|
||||
|
||||
public static ContactPhoto getDefaultGroupPhoto() {
|
||||
return new ResourceContactPhoto(R.drawable.ic_group_white_24dp);
|
||||
return new ResourceContactPhoto(R.drawable.ic_group_white_24dp, R.drawable.ic_group_large);
|
||||
}
|
||||
|
||||
public static ContactPhoto getContactPhoto(@NonNull Context context, @Nullable Uri uri, @NonNull Address address, @Nullable String name) {
|
||||
|
@ -48,7 +48,7 @@ public class GeneratedContactPhoto implements ContactPhoto {
|
||||
|
||||
@Override
|
||||
public Drawable asCallCard(Context context) {
|
||||
return ContextCompat.getDrawable(context, R.drawable.ic_contact_picture_large);
|
||||
return ContextCompat.getDrawable(context, R.drawable.ic_person_large);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -16,9 +16,15 @@ import com.makeramen.roundedimageview.RoundedDrawable;
|
||||
public class ResourceContactPhoto implements ContactPhoto {
|
||||
|
||||
private final int resourceId;
|
||||
private final int callCardResourceId;
|
||||
|
||||
ResourceContactPhoto(@DrawableRes int resourceId) {
|
||||
this.resourceId = resourceId;
|
||||
this(resourceId, resourceId);
|
||||
}
|
||||
|
||||
ResourceContactPhoto(@DrawableRes int resourceId, @DrawableRes int callCardResourceId) {
|
||||
this.resourceId = resourceId;
|
||||
this.callCardResourceId = callCardResourceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -42,7 +48,7 @@ public class ResourceContactPhoto implements ContactPhoto {
|
||||
|
||||
@Override
|
||||
public Drawable asCallCard(Context context) {
|
||||
return context.getResources().getDrawable(resourceId);
|
||||
return context.getResources().getDrawable(callCardResourceId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user