mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-27 08:41:50 +00:00
Implement profile picture view
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
android:interpolator="@android:anim/decelerate_interpolator">
|
||||
|
||||
<scale
|
||||
android:duration="150"
|
||||
android:duration="250"
|
||||
android:fromXScale="1.0"
|
||||
android:fromYScale="1.0"
|
||||
android:toXScale="0.85"
|
||||
@@ -14,7 +14,7 @@
|
||||
android:pivotY="50%" />
|
||||
|
||||
<alpha
|
||||
android:duration="150"
|
||||
android:duration="250"
|
||||
android:fromAlpha="1.0"
|
||||
android:toAlpha="0.6" />
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
android:interpolator="@android:anim/decelerate_interpolator">
|
||||
|
||||
<translate
|
||||
android:duration="150"
|
||||
android:duration="250"
|
||||
android:fromXDelta="-100%"
|
||||
android:toXDelta="0%" />
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
android:interpolator="@android:anim/decelerate_interpolator">
|
||||
|
||||
<translate
|
||||
android:duration="150"
|
||||
android:duration="250"
|
||||
android:fromXDelta="100%"
|
||||
android:toXDelta="0%" />
|
||||
|
||||
|
11
res/drawable/profile_picture_view_medium_background.xml
Normal file
11
res/drawable/profile_picture_view_medium_background.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="@color/unimportant" />
|
||||
|
||||
<corners android:radius="23dp" />
|
||||
|
||||
<stroke android:width="@dimen/profile_picture_border_thickness" android:color="@color/border" />
|
||||
</shape>
|
11
res/drawable/profile_picture_view_rss_medium_background.xml
Normal file
11
res/drawable/profile_picture_view_rss_medium_background.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="#353535" />
|
||||
|
||||
<corners android:radius="23dp" />
|
||||
|
||||
<stroke android:width="@dimen/profile_picture_border_thickness" android:color="@color/border" />
|
||||
</shape>
|
11
res/drawable/profile_picture_view_small_background.xml
Normal file
11
res/drawable/profile_picture_view_small_background.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="@color/unimportant" />
|
||||
|
||||
<corners android:radius="18dp" />
|
||||
|
||||
<stroke android:width="@dimen/profile_picture_border_thickness" android:color="@color/border" />
|
||||
</shape>
|
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<org.thoughtcrime.securesms.loki.redesign.views.ConversationView
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -13,13 +13,13 @@
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/accent" />
|
||||
|
||||
<View
|
||||
<org.thoughtcrime.securesms.loki.redesign.views.ProfilePictureView
|
||||
android:id="@+id/profilePictureView"
|
||||
android:layout_width="@dimen/medium_profile_picture_size"
|
||||
android:layout_height="@dimen/medium_profile_picture_size"
|
||||
android:layout_marginTop="@dimen/medium_spacing"
|
||||
android:layout_marginLeft="@dimen/medium_spacing"
|
||||
android:layout_marginBottom="@dimen/medium_spacing"
|
||||
android:background="@color/unimportant" />
|
||||
android:layout_marginBottom="@dimen/medium_spacing" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -95,4 +95,4 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</org.thoughtcrime.securesms.loki.redesign.views.ConversationView>
|
||||
</LinearLayout>
|
46
res/layout/profile_picture_view.xml
Normal file
46
res/layout/profile_picture_view.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/doubleModeImageViewContainer"
|
||||
android:layout_width="@dimen/medium_profile_picture_size"
|
||||
android:layout_height="@dimen/medium_profile_picture_size">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/doubleModeImageView1"
|
||||
android:layout_width="@dimen/small_profile_picture_size"
|
||||
android:layout_height="@dimen/small_profile_picture_size"
|
||||
android:background="@drawable/profile_picture_view_small_background"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/doubleModeImageView2"
|
||||
android:layout_width="@dimen/small_profile_picture_size"
|
||||
android:layout_height="@dimen/small_profile_picture_size"
|
||||
android:background="@drawable/profile_picture_view_small_background"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/singleModeImageView"
|
||||
android:layout_width="@dimen/medium_profile_picture_size"
|
||||
android:layout_height="@dimen/medium_profile_picture_size"
|
||||
android:background="@drawable/profile_picture_view_medium_background" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rssTextView"
|
||||
android:layout_width="@dimen/medium_profile_picture_size"
|
||||
android:layout_height="@dimen/medium_profile_picture_size"
|
||||
android:gravity="center"
|
||||
android:text="RSS"
|
||||
android:textColor="@color/text"
|
||||
android:textSize="@dimen/small_font_size"
|
||||
android:background="@drawable/profile_picture_view_rss_medium_background" />
|
||||
|
||||
</RelativeLayout>
|
@@ -5,6 +5,7 @@
|
||||
<color name="accent">#00F782</color>
|
||||
<color name="text">#FFFFFF</color>
|
||||
<color name="unimportant">#D8D8D8</color>
|
||||
<color name="border">#979797</color>
|
||||
<color name="cell_background">#1B1B1B</color>
|
||||
<color name="cell_selected">#0C0C0C</color>
|
||||
<color name="action_bar_background">#171717</color>
|
||||
|
@@ -14,9 +14,11 @@
|
||||
<!-- Element Sizes -->
|
||||
<dimen name="medium_button_height">48dp</dimen>
|
||||
<dimen name="accent_line_thickness">4dp</dimen>
|
||||
<dimen name="medium_profile_picture_size">45dp</dimen>
|
||||
<dimen name="small_profile_picture_size">36dp</dimen>
|
||||
<dimen name="medium_profile_picture_size">46dp</dimen>
|
||||
<dimen name="conversation_view_status_indicator_size">14dp</dimen>
|
||||
<dimen name="border_thickness">2dp</dimen>
|
||||
<dimen name="profile_picture_border_thickness">1dp</dimen>
|
||||
<dimen name="new_conversation_button_size">56dp</dimen>
|
||||
<dimen name="text_view_corner_radius">8dp</dimen>
|
||||
<dimen name="fake_chat_view_bubble_width">224dp</dimen>
|
||||
|
Reference in New Issue
Block a user