This commit is contained in:
Niels Andriesse 2020-01-23 10:25:22 +11:00
parent 1e014a690f
commit 9b01282f61
5 changed files with 17 additions and 11 deletions

View File

@ -67,14 +67,13 @@
</RelativeLayout> </RelativeLayout>
<TextView <ImageView
android:id="@+id/rssTextView" android:id="@+id/rssImageView"
android:layout_width="@dimen/medium_profile_picture_size" android:layout_width="@dimen/medium_profile_picture_size"
android:layout_height="@dimen/medium_profile_picture_size" android:layout_height="@dimen/medium_profile_picture_size"
android:gravity="center" android:gravity="center"
android:text="RSS" android:src="@drawable/session_logo_white"
android:textColor="@color/text" android:padding="12dp"
android:textSize="@dimen/small_font_size"
android:background="@drawable/profile_picture_view_rss_medium_background" /> android:background="@drawable/profile_picture_view_rss_medium_background" />
<RelativeLayout <RelativeLayout

View File

@ -1,5 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<!-- Session -->
<dimen name="medium_button_height">44dp</dimen>
<dimen name="tab_bar_height">48dp</dimen>
<dimen name="setting_button_height">72dp</dimen>
<!-- Session -->
<dimen name="album_total_width">300dp</dimen> <dimen name="album_total_width">300dp</dimen>
<dimen name="album_2_total_height">150dp</dimen> <dimen name="album_2_total_height">150dp</dimen>
<dimen name="album_2_cell_width">149dp</dimen> <dimen name="album_2_cell_width">149dp</dimen>

View File

@ -13,7 +13,7 @@
<!-- Element Sizes --> <!-- Element Sizes -->
<dimen name="small_button_height">34dp</dimen> <dimen name="small_button_height">34dp</dimen>
<dimen name="medium_button_height">44dp</dimen> <dimen name="medium_button_height">38dp</dimen>
<dimen name="accent_line_thickness">4dp</dimen> <dimen name="accent_line_thickness">4dp</dimen>
<dimen name="very_small_profile_picture_size">26dp</dimen> <dimen name="very_small_profile_picture_size">26dp</dimen>
<dimen name="small_profile_picture_size">36dp</dimen> <dimen name="small_profile_picture_size">36dp</dimen>
@ -23,12 +23,12 @@
<dimen name="border_thickness">1dp</dimen> <dimen name="border_thickness">1dp</dimen>
<dimen name="profile_picture_border_thickness">1dp</dimen> <dimen name="profile_picture_border_thickness">1dp</dimen>
<dimen name="new_conversation_button_size">56dp</dimen> <dimen name="new_conversation_button_size">56dp</dimen>
<dimen name="tab_bar_height">48dp</dimen> <dimen name="tab_bar_height">36dp</dimen>
<dimen name="text_view_corner_radius">8dp</dimen> <dimen name="text_view_corner_radius">8dp</dimen>
<dimen name="fake_chat_view_bubble_width">224dp</dimen> <dimen name="fake_chat_view_bubble_width">224dp</dimen>
<dimen name="fake_chat_view_bubble_corner_radius">10dp</dimen> <dimen name="fake_chat_view_bubble_corner_radius">10dp</dimen>
<dimen name="fake_chat_view_height">234dp</dimen> <dimen name="fake_chat_view_height">234dp</dimen>
<dimen name="setting_button_height">72dp</dimen> <dimen name="setting_button_height">56dp</dimen>
<dimen name="dialog_corner_radius">8dp</dimen> <dimen name="dialog_corner_radius">8dp</dimen>
<dimen name="dialog_button_corner_radius">4dp</dimen> <dimen name="dialog_button_corner_radius">4dp</dimen>

View File

@ -148,9 +148,9 @@
<style name="SmallSessionEditText"> <style name="SmallSessionEditText">
<item name="android:background">@drawable/session_id_text_view_background</item> <item name="android:background">@drawable/session_id_text_view_background</item>
<item name="android:paddingLeft">@dimen/medium_spacing</item> <item name="android:paddingLeft">@dimen/medium_spacing</item>
<item name="android:paddingTop">@dimen/large_spacing</item> <item name="android:paddingTop">20dp</item>
<item name="android:paddingRight">@dimen/medium_spacing</item> <item name="android:paddingRight">@dimen/medium_spacing</item>
<item name="android:paddingBottom">@dimen/large_spacing</item> <item name="android:paddingBottom">20dp</item>
<item name="android:textSize">@dimen/small_font_size</item> <item name="android:textSize">@dimen/small_font_size</item>
<item name="android:textColor">@color/text</item> <item name="android:textColor">@color/text</item>
<item name="android:textCursorDrawable">@drawable/session_edit_text_cursor</item> <item name="android:textCursorDrawable">@drawable/session_edit_text_cursor</item>

View File

@ -56,7 +56,7 @@ class ProfilePictureView : RelativeLayout {
doubleModeImageViewContainer.visibility = if (additionalHexEncodedPublicKey != null && !isRSSFeed) View.VISIBLE else View.INVISIBLE doubleModeImageViewContainer.visibility = if (additionalHexEncodedPublicKey != null && !isRSSFeed) View.VISIBLE else View.INVISIBLE
singleModeImageViewContainer.visibility = if (additionalHexEncodedPublicKey == null && !isRSSFeed && !isLarge) View.VISIBLE else View.INVISIBLE singleModeImageViewContainer.visibility = if (additionalHexEncodedPublicKey == null && !isRSSFeed && !isLarge) View.VISIBLE else View.INVISIBLE
largeSingleModeImageViewContainer.visibility = if (additionalHexEncodedPublicKey == null && !isRSSFeed && isLarge) View.VISIBLE else View.INVISIBLE largeSingleModeImageViewContainer.visibility = if (additionalHexEncodedPublicKey == null && !isRSSFeed && isLarge) View.VISIBLE else View.INVISIBLE
rssTextView.visibility = if (isRSSFeed) View.VISIBLE else View.INVISIBLE rssImageView.visibility = if (isRSSFeed) View.VISIBLE else View.INVISIBLE
fun setProfilePictureIfNeeded(imageView: ImageView, hexEncodedPublicKey: String, @DimenRes sizeID: Int) { fun setProfilePictureIfNeeded(imageView: ImageView, hexEncodedPublicKey: String, @DimenRes sizeID: Int) {
glide.clear(imageView) glide.clear(imageView)
if (hexEncodedPublicKey.isNotEmpty()) { if (hexEncodedPublicKey.isNotEmpty()) {