mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-19 19:28:26 +00:00
WIP
This commit is contained in:
parent
b75a15a063
commit
df61e9565c
@ -21,6 +21,7 @@
|
||||
android:autoLink="none"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/very_small_font_size"
|
||||
android:linksClickable="false"
|
||||
style="@style/Signal.Text.Caption.MessageSent"
|
||||
android:textColor="?conversation_item_sent_text_secondary_color"
|
||||
|
@ -19,25 +19,21 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/conversation_individual_right_gutter"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingStart="@dimen/large_spacing"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/contact_photo_container"
|
||||
android:layout_width="36dp"
|
||||
android:layout_width="@dimen/small_profile_picture_size"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentBottom="true">
|
||||
android:layout_alignParentStart="true">
|
||||
|
||||
<org.thoughtcrime.securesms.components.AvatarImageView
|
||||
android:id="@+id/contact_photo"
|
||||
android:foreground="@drawable/contact_photo_background"
|
||||
android:layout_width="@dimen/conversation_item_avatar_size"
|
||||
android:layout_height="@dimen/conversation_item_avatar_size"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:cropToPadding="true"
|
||||
android:contentDescription="@string/conversation_item_received__contact_photo_description" />
|
||||
<org.thoughtcrime.securesms.loki.redesign.views.ProfilePictureView
|
||||
android:id="@+id/profilePictureView"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_width="@dimen/small_profile_picture_size"
|
||||
android:layout_height="@dimen/small_profile_picture_size" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/moderator_icon_image_view"
|
||||
@ -64,7 +60,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/message_bubble_edge_margin"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginStart="@dimen/large_spacing"
|
||||
android:orientation="vertical"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false"
|
||||
@ -175,7 +171,7 @@
|
||||
android:id="@+id/conversation_item_body"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/message_bubble_top_padding"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginBottom="@dimen/message_bubble_collapsed_footer_padding"
|
||||
android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
|
||||
android:layout_marginEnd="@dimen/message_bubble_horizontal_padding"
|
||||
@ -197,7 +193,7 @@
|
||||
android:layout_marginBottom="@dimen/message_bubble_bottom_padding"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:alpha="0.7"
|
||||
android:alpha="0.6"
|
||||
app:footer_text_color="?conversation_item_received_text_secondary_color"
|
||||
app:footer_icon_color="?conversation_item_received_text_secondary_color"/>
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/conversation_individual_right_gutter"
|
||||
android:layout_marginEnd="@dimen/large_spacing"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false">
|
||||
|
||||
@ -106,7 +106,7 @@
|
||||
android:id="@+id/conversation_item_body"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/message_bubble_top_padding"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
|
||||
android:layout_marginEnd="@dimen/message_bubble_horizontal_padding"
|
||||
android:layout_marginBottom="@dimen/message_bubble_collapsed_footer_padding"
|
||||
|
@ -28,7 +28,9 @@
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="?attr/actionBarTabBarStyle"
|
||||
android:theme="@style/Session.DarkTabLayout"
|
||||
app:tabRippleColor="@color/cell_selected"
|
||||
app:tabIndicatorColor="@color/accent"
|
||||
android:scrollbars="horizontal"/>
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
@ -23,11 +23,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="0px"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:hint="@string/giphy_activity_toolbar__search_gifs_and_stickers"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="@color/white"
|
||||
android:textCursorDrawable="@null"
|
||||
android:textColor="@color/text"
|
||||
android:textColorHint="@color/text"
|
||||
android:textCursorDrawable="@drawable/session_edit_text_cursor"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
|
@ -1,27 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/giphy_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical"/>
|
||||
android:id="@+id/giphy_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical"/>
|
||||
|
||||
<ProgressBar android:id="@+id/loading_progress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="visible"
|
||||
android:indeterminate="true"/>
|
||||
<com.github.ybq.android.spinkit.SpinKitView
|
||||
style="@style/SpinKitView.Large.ThreeBounce"
|
||||
android:id="@+id/loading_progress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="visible"
|
||||
app:SpinKit_Color="@color/text" />
|
||||
|
||||
<TextView android:id="@+id/no_results"
|
||||
android:text="@string/giphy_fragment__nothing_found"
|
||||
android:gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center"/>
|
||||
<TextView
|
||||
android:id="@+id/no_results"
|
||||
android:text="@string/giphy_fragment__nothing_found"
|
||||
android:gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text"
|
||||
android:textSize="@dimen/medium_font_size"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
</FrameLayout>
|
@ -8,7 +8,7 @@
|
||||
android:id="@+id/linkpreview_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp"
|
||||
android:padding="@dimen/small_spacing"
|
||||
android:background="?linkpreview_background_color">
|
||||
|
||||
<org.thoughtcrime.securesms.components.OutlinedThumbnailView
|
||||
@ -33,7 +33,8 @@
|
||||
android:layout_marginEnd="8dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:maxLines="1"
|
||||
android:maxLines="2"
|
||||
android:textSize="@dimen/medium_font_size"
|
||||
android:textColor="?linkpreview_primary_text_color"
|
||||
app:layout_constraintEnd_toStartOf="@+id/linkpreview_close"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
@ -48,8 +49,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:textAllCaps="true"
|
||||
android:maxLines="1"
|
||||
android:textSize="@dimen/very_small_font_size"
|
||||
android:textColor="?linkpreview_secondary_text_color"
|
||||
android:alpha="0.6"
|
||||
app:layout_constraintStart_toEndOf="@+id/linkpreview_thumbnail"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linkpreview_title"
|
||||
tools:text="dailybugle.com" />
|
||||
@ -82,21 +85,19 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.pnikosis.materialishprogress.ProgressWheel
|
||||
<com.github.ybq.android.spinkit.SpinKitView
|
||||
style="@style/SpinKitView.DoubleBounce"
|
||||
android:id="@+id/linkpreview_progress_wheel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:indeterminate="true"
|
||||
android:padding="8dp"
|
||||
android:layout_gravity="center"
|
||||
android:padding="@dimen/small_spacing"
|
||||
app:SpinKit_Color="@color/text"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/linkpreview_divider"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:matProg_barColor="@color/core_blue"
|
||||
app:matProg_progressIndeterminate="true" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
<color name="progress_bar_background">#0AFFFFFF</color>
|
||||
<color name="compose_view_background">#1B1B1B</color>
|
||||
<color name="compose_text_view_background">#141414</color>
|
||||
<color name="received_message_background">#222325</color>
|
||||
<color name="sent_message_background">#3F4146</color>
|
||||
<!-- Session -->
|
||||
|
||||
<!-- Loki -->
|
||||
|
@ -72,15 +72,15 @@
|
||||
<dimen name="album_5_cell_size_big">104dp</dimen>
|
||||
<dimen name="album_5_cell_size_small">69dp</dimen>
|
||||
|
||||
<dimen name="message_corner_radius">16dp</dimen>
|
||||
<dimen name="message_corner_radius">10dp</dimen>
|
||||
<dimen name="message_corner_collapse_radius">4dp</dimen>
|
||||
<dimen name="message_bubble_corner_radius">2dp</dimen>
|
||||
<dimen name="message_bubble_shadow_distance">1.5dp</dimen>
|
||||
<dimen name="message_bubble_horizontal_padding">12dp</dimen>
|
||||
<dimen name="message_bubble_top_padding">6dp</dimen>
|
||||
<dimen name="message_bubble_collapsed_footer_padding">6dp</dimen>
|
||||
<dimen name="message_bubble_horizontal_padding">@dimen/medium_spacing</dimen>
|
||||
<dimen name="message_bubble_top_padding">@dimen/medium_spacing</dimen>
|
||||
<dimen name="message_bubble_collapsed_footer_padding">@dimen/small_spacing</dimen>
|
||||
<dimen name="message_bubble_edge_margin">32dp</dimen>
|
||||
<dimen name="message_bubble_bottom_padding">8dp</dimen>
|
||||
<dimen name="message_bubble_bottom_padding">@dimen/medium_spacing</dimen>
|
||||
<dimen name="media_bubble_remove_button_size">24dp</dimen>
|
||||
<dimen name="media_bubble_edit_button_size">24dp</dimen>
|
||||
<dimen name="media_bubble_default_dimens">210dp</dimen>
|
||||
@ -101,9 +101,9 @@
|
||||
<dimen name="thumbnail_default_radius">4dp</dimen>
|
||||
|
||||
<dimen name="conversation_compose_height">40dp</dimen>
|
||||
<dimen name="conversation_individual_right_gutter">16dp</dimen>
|
||||
<dimen name="conversation_individual_left_gutter">16dp</dimen>
|
||||
<dimen name="conversation_group_left_gutter">52dp</dimen>
|
||||
<dimen name="conversation_individual_right_gutter">@dimen/large_spacing</dimen>
|
||||
<dimen name="conversation_individual_left_gutter">@dimen/large_spacing</dimen>
|
||||
<dimen name="conversation_group_left_gutter">60dp</dimen>
|
||||
<dimen name="conversation_vertical_message_spacing_default">8dp</dimen>
|
||||
<dimen name="conversation_vertical_message_spacing_collapse">1dp</dimen>
|
||||
|
||||
|
@ -232,14 +232,14 @@
|
||||
<item name="emoji_category_emoticons">@drawable/ic_emoji_emoticon_light_20</item>
|
||||
<item name="emoji_variation_selector_background">@drawable/emoji_variation_selector_background_light</item>
|
||||
|
||||
<item name="conversation_item_bubble_background">@color/core_grey_05</item>
|
||||
<item name="conversation_item_bubble_background">@color/sent_message_background</item>
|
||||
<item name="conversation_item_sent_text_primary_color">@color/core_grey_90</item>
|
||||
<item name="conversation_item_sent_text_secondary_color">@color/core_grey_60</item>
|
||||
<item name="conversation_item_sent_icon_color">@color/core_grey_60</item>
|
||||
<item name="conversation_item_sent_download_icon_color">@color/core_grey_60</item>
|
||||
<item name="conversation_item_sent_text_indicator_tab_color">#99000000</item>
|
||||
<item name="conversation_item_received_text_primary_color">@color/core_white</item>
|
||||
<item name="conversation_item_received_text_secondary_color">@color/core_white</item>
|
||||
<item name="conversation_item_received_text_primary_color">@color/text</item>
|
||||
<item name="conversation_item_received_text_secondary_color">@color/text</item>
|
||||
<item name="conversation_item_update_text_color">@color/core_grey_60</item>
|
||||
<item name="conversation_item_last_seen_text_color">@color/core_grey_90</item>
|
||||
<item name="conversation_item_last_seen_line_color">@color/core_grey_60</item>
|
||||
@ -368,14 +368,14 @@
|
||||
|
||||
<item name="conversation_group_member_name">#99ffffff</item>
|
||||
|
||||
<item name="conversation_item_bubble_background">@color/core_grey_75</item>
|
||||
<item name="conversation_item_bubble_background">@color/sent_message_background</item>
|
||||
<item name="conversation_item_sent_text_primary_color">@color/core_grey_05</item>
|
||||
<item name="conversation_item_sent_text_secondary_color">@color/core_grey_25</item>
|
||||
<item name="conversation_item_sent_icon_color">@color/core_grey_25</item>
|
||||
<item name="conversation_item_sent_download_icon_color">@color/core_white</item>
|
||||
<item name="conversation_item_sent_text_indicator_tab_color">#99ffffff</item>
|
||||
<item name="conversation_item_received_text_primary_color">@color/core_grey_05</item>
|
||||
<item name="conversation_item_received_text_secondary_color">@color/core_grey_25</item>
|
||||
<item name="conversation_item_received_text_primary_color">@color/text</item>
|
||||
<item name="conversation_item_received_text_secondary_color">@color/text</item>
|
||||
<item name="conversation_item_sent_indicator_text_background">@drawable/conversation_item_sent_indicator_text_shape_dark</item>
|
||||
<item name="conversation_item_update_text_color">@color/core_grey_45</item>
|
||||
<item name="conversation_item_last_seen_text_color">@color/core_grey_25</item>
|
||||
@ -447,10 +447,10 @@
|
||||
<item name="emoji_category_emoticons">@drawable/ic_emoji_emoticon_dark_20</item>
|
||||
<item name="emoji_variation_selector_background">@drawable/emoji_variation_selector_background_dark</item>
|
||||
|
||||
<item name="linkpreview_background_color">@color/core_grey_95</item>
|
||||
<item name="linkpreview_primary_text_color">@color/core_white</item>
|
||||
<item name="linkpreview_secondary_text_color">@color/core_grey_25</item>
|
||||
<item name="linkpreview_divider_color">@color/core_grey_60</item>
|
||||
<item name="linkpreview_background_color">@color/black</item>
|
||||
<item name="linkpreview_primary_text_color">@color/text</item>
|
||||
<item name="linkpreview_secondary_text_color">@color/text</item>
|
||||
<item name="linkpreview_divider_color">@color/transparent</item>
|
||||
|
||||
<item name="quick_camera_icon">@drawable/quick_camera_dark</item>
|
||||
<item name="quick_mic_icon">@drawable/ic_mic_white_24dp</item>
|
||||
|
@ -2,22 +2,16 @@ package org.thoughtcrime.securesms.components;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.view.animation.RotateAnimation;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import network.loki.messenger.R;
|
||||
|
||||
import pl.tajchert.sample.DotsTextView;
|
||||
|
||||
public class DeliveryStatusView extends FrameLayout {
|
||||
|
||||
private static final String TAG = DeliveryStatusView.class.getSimpleName();
|
||||
@ -66,7 +60,7 @@ public class DeliveryStatusView extends FrameLayout {
|
||||
}
|
||||
|
||||
public void setPending() {
|
||||
this.setVisibility(View.VISIBLE);
|
||||
this.setVisibility(View.GONE);
|
||||
pendingIndicator.setVisibility(View.VISIBLE);
|
||||
pendingIndicator.startAnimation(ROTATION_ANIMATION);
|
||||
sentIndicator.setVisibility(View.GONE);
|
||||
@ -75,7 +69,7 @@ public class DeliveryStatusView extends FrameLayout {
|
||||
}
|
||||
|
||||
public void setSent() {
|
||||
this.setVisibility(View.VISIBLE);
|
||||
this.setVisibility(View.GONE);
|
||||
pendingIndicator.setVisibility(View.GONE);
|
||||
pendingIndicator.clearAnimation();
|
||||
sentIndicator.setVisibility(View.VISIBLE);
|
||||
@ -84,7 +78,7 @@ public class DeliveryStatusView extends FrameLayout {
|
||||
}
|
||||
|
||||
public void setDelivered() {
|
||||
this.setVisibility(View.VISIBLE);
|
||||
this.setVisibility(View.GONE);
|
||||
pendingIndicator.setVisibility(View.GONE);
|
||||
pendingIndicator.clearAnimation();
|
||||
sentIndicator.setVisibility(View.GONE);
|
||||
@ -93,7 +87,7 @@ public class DeliveryStatusView extends FrameLayout {
|
||||
}
|
||||
|
||||
public void setRead() {
|
||||
this.setVisibility(View.VISIBLE);
|
||||
this.setVisibility(View.GONE);
|
||||
pendingIndicator.setVisibility(View.GONE);
|
||||
pendingIndicator.clearAnimation();
|
||||
sentIndicator.setVisibility(View.GONE);
|
||||
|
@ -192,8 +192,8 @@ public class InputPanel extends LinearLayout
|
||||
this.linkPreview.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
int cornerRadius = quoteView.getVisibility() == VISIBLE ? readDimen(R.dimen.message_corner_collapse_radius)
|
||||
: readDimen(R.dimen.message_corner_radius);
|
||||
int largeCornerRadius = (int)(16 * getResources().getDisplayMetrics().density);
|
||||
int cornerRadius = quoteView.getVisibility() == VISIBLE ? readDimen(R.dimen.message_corner_collapse_radius) : largeCornerRadius;
|
||||
|
||||
this.linkPreview.setCorners(cornerRadius, cornerRadius);
|
||||
}
|
||||
|
@ -16,7 +16,6 @@ import org.thoughtcrime.securesms.linkpreview.LinkPreview;
|
||||
import org.thoughtcrime.securesms.mms.GlideRequests;
|
||||
import org.thoughtcrime.securesms.mms.ImageSlide;
|
||||
import org.thoughtcrime.securesms.mms.SlidesClickedListener;
|
||||
import org.thoughtcrime.securesms.util.ThemeUtil;
|
||||
|
||||
import network.loki.messenger.R;
|
||||
import okhttp3.HttpUrl;
|
||||
@ -64,7 +63,7 @@ public class LinkPreviewView extends FrameLayout {
|
||||
cornerMask = new CornerMask(this);
|
||||
outliner = new Outliner();
|
||||
|
||||
outliner.setColor(ThemeUtil.getThemedColor(getContext(), R.attr.conversation_item_image_outline_color));
|
||||
outliner.setColor(getResources().getColor(R.color.transparent));
|
||||
|
||||
if (attrs != null) {
|
||||
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(attrs, R.styleable.LinkPreviewView, 0, 0);
|
||||
|
@ -1,45 +1,12 @@
|
||||
package org.thoughtcrime.securesms.components;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Canvas;
|
||||
import android.net.Uri;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.UiThread;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.bumptech.glide.RequestBuilder;
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation;
|
||||
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
|
||||
import com.bumptech.glide.load.resource.bitmap.FitCenter;
|
||||
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import org.thoughtcrime.securesms.util.ThemeUtil;
|
||||
|
||||
import network.loki.messenger.R;
|
||||
import org.thoughtcrime.securesms.database.AttachmentDatabase;
|
||||
import org.thoughtcrime.securesms.logging.Log;
|
||||
import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader.DecryptableUri;
|
||||
import org.thoughtcrime.securesms.mms.GlideRequest;
|
||||
import org.thoughtcrime.securesms.mms.GlideRequests;
|
||||
import org.thoughtcrime.securesms.mms.Slide;
|
||||
import org.thoughtcrime.securesms.mms.SlideClickListener;
|
||||
import org.thoughtcrime.securesms.mms.SlidesClickedListener;
|
||||
import org.thoughtcrime.securesms.util.ThemeUtil;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
import org.thoughtcrime.securesms.util.ViewUtil;
|
||||
import org.thoughtcrime.securesms.util.concurrent.ListenableFuture;
|
||||
import org.thoughtcrime.securesms.util.concurrent.SettableFuture;
|
||||
import org.whispersystems.libsignal.util.guava.Optional;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Locale;
|
||||
|
||||
import static com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions.withCrossFade;
|
||||
|
||||
public class OutlinedThumbnailView extends ThumbnailView {
|
||||
|
||||
|
@ -2924,7 +2924,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
|
||||
@Override
|
||||
public void onMessageActionToolbarOpened() {
|
||||
searchViewItem.collapseActionView();
|
||||
// searchViewItem.collapseActionView();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -60,7 +60,6 @@ import org.thoughtcrime.securesms.MessageDetailsActivity;
|
||||
import org.thoughtcrime.securesms.attachments.DatabaseAttachment;
|
||||
import org.thoughtcrime.securesms.components.AlertView;
|
||||
import org.thoughtcrime.securesms.components.AudioView;
|
||||
import org.thoughtcrime.securesms.components.AvatarImageView;
|
||||
import org.thoughtcrime.securesms.components.ConversationItemFooter;
|
||||
import org.thoughtcrime.securesms.components.ConversationItemThumbnail;
|
||||
import org.thoughtcrime.securesms.components.DocumentView;
|
||||
@ -87,10 +86,11 @@ import org.thoughtcrime.securesms.jobs.SmsSendJob;
|
||||
import org.thoughtcrime.securesms.linkpreview.LinkPreview;
|
||||
import org.thoughtcrime.securesms.linkpreview.LinkPreviewUtil;
|
||||
import org.thoughtcrime.securesms.logging.Log;
|
||||
import org.thoughtcrime.securesms.loki.redesign.views.FriendRequestView;
|
||||
import org.thoughtcrime.securesms.loki.redesign.views.FriendRequestViewDelegate;
|
||||
import org.thoughtcrime.securesms.loki.LokiMessageDatabase;
|
||||
import org.thoughtcrime.securesms.loki.MentionUtilities;
|
||||
import org.thoughtcrime.securesms.loki.redesign.views.FriendRequestView;
|
||||
import org.thoughtcrime.securesms.loki.redesign.views.FriendRequestViewDelegate;
|
||||
import org.thoughtcrime.securesms.loki.redesign.views.ProfilePictureView;
|
||||
import org.thoughtcrime.securesms.mms.GlideRequests;
|
||||
import org.thoughtcrime.securesms.mms.ImageSlide;
|
||||
import org.thoughtcrime.securesms.mms.PartAuthority;
|
||||
@ -154,7 +154,7 @@ public class ConversationItem extends LinearLayout
|
||||
private TextView groupSender;
|
||||
private TextView groupSenderProfileName;
|
||||
private View groupSenderHolder;
|
||||
private AvatarImageView contactPhoto;
|
||||
private ProfilePictureView profilePictureView;
|
||||
private ImageView moderatorIconImageView;
|
||||
private ViewGroup contactPhotoHolder;
|
||||
private AlertView alertView;
|
||||
@ -211,7 +211,7 @@ public class ConversationItem extends LinearLayout
|
||||
this.groupSender = findViewById(R.id.group_message_sender);
|
||||
this.groupSenderProfileName = findViewById(R.id.group_message_sender_profile);
|
||||
this.alertView = findViewById(R.id.indicators_parent);
|
||||
this.contactPhoto = findViewById(R.id.contact_photo);
|
||||
this.profilePictureView = findViewById(R.id.profilePictureView);
|
||||
this.moderatorIconImageView = findViewById(R.id.moderator_icon_image_view);
|
||||
this.contactPhotoHolder = findViewById(R.id.contact_photo_container);
|
||||
this.bodyBubble = findViewById(R.id.body_bubble);
|
||||
@ -356,9 +356,9 @@ public class ConversationItem extends LinearLayout
|
||||
|
||||
private void setBubbleState(MessageRecord messageRecord) {
|
||||
if (messageRecord.isOutgoing()) {
|
||||
bodyBubble.getBackground().setColorFilter(defaultBubbleColor, PorterDuff.Mode.MULTIPLY);
|
||||
bodyBubble.getBackground().setColorFilter(getResources().getColor(R.color.sent_message_background), PorterDuff.Mode.MULTIPLY);
|
||||
} else {
|
||||
bodyBubble.getBackground().setColorFilter(messageRecord.getRecipient().getColor().toConversationColor(context), PorterDuff.Mode.MULTIPLY);
|
||||
bodyBubble.getBackground().setColorFilter(getResources().getColor(R.color.received_message_background), PorterDuff.Mode.MULTIPLY);
|
||||
}
|
||||
|
||||
if (audioViewStub.resolved()) {
|
||||
@ -745,13 +745,16 @@ public class ConversationItem extends LinearLayout
|
||||
|
||||
private void setContactPhoto(@NonNull Recipient recipient) {
|
||||
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams)bodyBubble.getLayoutParams();
|
||||
float scale = getResources().getDisplayMetrics().density;
|
||||
float marginInDP = groupThread ? 44 : 8;
|
||||
int marginInPX = Math.round(marginInDP * scale);
|
||||
layoutParams.setMarginStart(marginInPX);
|
||||
int groupThreadMargin = (int)(getResources().getDimension(R.dimen.large_spacing) + getResources().getDimension(R.dimen.small_profile_picture_size));
|
||||
int defaultMargin = 0;
|
||||
layoutParams.setMarginStart(groupThread ? groupThreadMargin : defaultMargin);
|
||||
bodyBubble.setLayoutParams(layoutParams);
|
||||
if (contactPhoto == null) return;
|
||||
contactPhoto.setAvatar(glideRequests, recipient, true);
|
||||
if (profilePictureView == null) return;
|
||||
profilePictureView.setHexEncodedPublicKey(recipient.getAddress().toString());
|
||||
profilePictureView.setAdditionalHexEncodedPublicKey(null);
|
||||
profilePictureView.setRSSFeed(false);
|
||||
profilePictureView.setGlide(glideRequests);
|
||||
profilePictureView.update();
|
||||
}
|
||||
|
||||
private SpannableString linkifyMessageBody(SpannableString messageBody, boolean shouldLinkifyAllLinks) {
|
||||
@ -936,7 +939,7 @@ public class ConversationItem extends LinearLayout
|
||||
}
|
||||
|
||||
if (!next.isPresent() || next.get().isUpdate() || !current.getRecipient().getAddress().equals(next.get().getRecipient().getAddress())) {
|
||||
contactPhoto.setVisibility(VISIBLE);
|
||||
profilePictureView.setVisibility(VISIBLE);
|
||||
int visibility = View.GONE;
|
||||
|
||||
LokiPublicChat publicChat = DatabaseFactory.getLokiThreadDatabase(context).getPublicChat(messageRecord.getThreadId());
|
||||
@ -947,7 +950,7 @@ public class ConversationItem extends LinearLayout
|
||||
|
||||
moderatorIconImageView.setVisibility(visibility);
|
||||
} else {
|
||||
contactPhoto.setVisibility(GONE);
|
||||
profilePictureView.setVisibility(GONE);
|
||||
moderatorIconImageView.setVisibility(GONE);
|
||||
|
||||
}
|
||||
@ -964,17 +967,13 @@ public class ConversationItem extends LinearLayout
|
||||
private void setMessageShape(@NonNull MessageRecord current, @NonNull Optional<MessageRecord> previous, @NonNull Optional<MessageRecord> next, boolean isGroupThread) {
|
||||
int background;
|
||||
if (isSingularMessage(current, previous, next, isGroupThread)) {
|
||||
background = current.isOutgoing() ? R.drawable.message_bubble_background_sent_alone
|
||||
: R.drawable.message_bubble_background_received_alone;
|
||||
background = current.isOutgoing() ? R.drawable.message_bubble_background_sent_alone : R.drawable.message_bubble_background_received_alone;
|
||||
} else if (isStartOfMessageCluster(current, previous, isGroupThread)) {
|
||||
background = current.isOutgoing() ? R.drawable.message_bubble_background_sent_start
|
||||
: R.drawable.message_bubble_background_received_start;
|
||||
background = current.isOutgoing() ? R.drawable.message_bubble_background_sent_start : R.drawable.message_bubble_background_received_start;
|
||||
} else if (isEndOfMessageCluster(current, next, isGroupThread)) {
|
||||
background = current.isOutgoing() ? R.drawable.message_bubble_background_sent_end
|
||||
: R.drawable.message_bubble_background_received_end;
|
||||
background = current.isOutgoing() ? R.drawable.message_bubble_background_sent_end : R.drawable.message_bubble_background_received_end;
|
||||
} else {
|
||||
background = current.isOutgoing() ? R.drawable.message_bubble_background_sent_middle
|
||||
: R.drawable.message_bubble_background_received_middle;
|
||||
background = current.isOutgoing() ? R.drawable.message_bubble_background_sent_middle : R.drawable.message_bubble_background_received_middle;
|
||||
}
|
||||
|
||||
bodyBubble.setBackgroundResource(background);
|
||||
|
@ -14,10 +14,8 @@ import android.support.v7.widget.StaggeredGridLayoutManager;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import network.loki.messenger.R;
|
||||
import org.thoughtcrime.securesms.giph.model.GiphyImage;
|
||||
import org.thoughtcrime.securesms.giph.net.GiphyLoader;
|
||||
import org.thoughtcrime.securesms.giph.util.InfiniteScrollListener;
|
||||
@ -28,13 +26,15 @@ import org.thoughtcrime.securesms.util.ViewUtil;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import network.loki.messenger.R;
|
||||
|
||||
public abstract class GiphyFragment extends Fragment implements LoaderManager.LoaderCallbacks<List<GiphyImage>>, GiphyAdapter.OnItemClickListener {
|
||||
|
||||
private static final String TAG = GiphyFragment.class.getSimpleName();
|
||||
|
||||
private GiphyAdapter giphyAdapter;
|
||||
private RecyclerView recyclerView;
|
||||
private ProgressBar loadingProgress;
|
||||
private View loadingProgress;
|
||||
private TextView noResultsView;
|
||||
private GiphyAdapter.OnItemClickListener listener;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user