diff --git a/res/drawable/sticky_date_header_background_dark.xml b/res/drawable/sticky_date_header_background_dark.xml
index 554dd74efa..d17517d372 100644
--- a/res/drawable/sticky_date_header_background_dark.xml
+++ b/res/drawable/sticky_date_header_background_dark.xml
@@ -4,5 +4,6 @@
android:shape="rectangle">
-
+
+
\ No newline at end of file
diff --git a/res/layout/conversation_fragment.xml b/res/layout/conversation_fragment.xml
index 43d9e6117e..3222a014bd 100644
--- a/res/layout/conversation_fragment.xml
+++ b/res/layout/conversation_fragment.xml
@@ -25,11 +25,10 @@
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_marginTop="8dp"
- style="@style/Signal.Text.Caption"
- android:textColor="?attr/conversation_item_sticky_date_text_color"
- android:textAllCaps="true"
+ android:textSize="@dimen/small_font_size"
+ android:textColor="#99FFFFFF"
android:background="?attr/conversation_item_sticky_date_background"
- android:elevation="9dp"
+ android:elevation="10dp"
android:visibility="gone"
tools:text="March 1, 2015" />
diff --git a/res/layout/conversation_item_header.xml b/res/layout/conversation_item_header.xml
index 395d27cf3a..80721f010f 100644
--- a/res/layout/conversation_item_header.xml
+++ b/res/layout/conversation_item_header.xml
@@ -15,9 +15,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
- style="@style/Signal.Text.Caption"
- android:textColor="?conversation_item_update_text_color"
- android:textAllCaps="true"
+ android:textColor="#99FFFFFF"
+ android:textSize="@dimen/small_font_size"
tools:text="March 1, 2015" />
diff --git a/res/layout/conversation_item_sent.xml b/res/layout/conversation_item_sent.xml
index 0e985272c5..ff2ea3a0a8 100644
--- a/res/layout/conversation_item_sent.xml
+++ b/res/layout/conversation_item_sent.xml
@@ -37,6 +37,7 @@
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginStart="@dimen/message_bubble_edge_margin"
+ android:paddingBottom="@dimen/medium_spacing"
android:layout_gravity="end"
android:clipToPadding="false"
android:clipChildren="false"
@@ -109,7 +110,6 @@
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"
style="@style/Signal.Text.Body"
android:textColor="?conversation_item_sent_text_primary_color"
android:textColorLink="?conversation_item_sent_text_primary_color"
@@ -140,10 +140,9 @@
android:id="@+id/conversation_item_footer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="-4dp"
+ android:layout_marginTop="4dp"
android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
android:layout_marginEnd="@dimen/message_bubble_horizontal_padding"
- android:layout_marginBottom="@dimen/message_bubble_bottom_padding"
android:clipChildren="false"
android:clipToPadding="false"
app:footer_text_color="?attr/conversation_item_sent_text_secondary_color"
diff --git a/res/layout/link_preview.xml b/res/layout/link_preview.xml
index 2f2c27a86f..aa30b6ae66 100644
--- a/res/layout/link_preview.xml
+++ b/res/layout/link_preview.xml
@@ -50,7 +50,7 @@
android:layout_marginStart="8dp"
android:layout_marginTop="2dp"
android:maxLines="1"
- android:textSize="@dimen/very_small_font_size"
+ android:textSize="@dimen/small_font_size"
android:textColor="?linkpreview_secondary_text_color"
android:alpha="0.6"
app:layout_constraintStart_toEndOf="@+id/linkpreview_thumbnail"
diff --git a/src/org/thoughtcrime/securesms/components/AttachmentTypeSelector.java b/src/org/thoughtcrime/securesms/components/AttachmentTypeSelector.java
index a1deeda36b..bdd60ab56a 100644
--- a/src/org/thoughtcrime/securesms/components/AttachmentTypeSelector.java
+++ b/src/org/thoughtcrime/securesms/components/AttachmentTypeSelector.java
@@ -46,6 +46,8 @@ public class AttachmentTypeSelector extends PopupWindow {
@SuppressWarnings("unused")
private static final String TAG = AttachmentTypeSelector.class.getSimpleName();
+ private final @NonNull Context context;
+ public int keyboardHeight;
private final @NonNull LoaderManager loaderManager;
private final @NonNull RecentPhotoViewRail recentRail;
private final @NonNull ImageView imageButton;
@@ -63,6 +65,9 @@ public class AttachmentTypeSelector extends PopupWindow {
public AttachmentTypeSelector(@NonNull Context context, @NonNull LoaderManager loaderManager, @Nullable AttachmentClickedListener listener, int keyboardHeight) {
super(context);
+ this.context = context;
+ this.keyboardHeight = keyboardHeight;
+
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
LinearLayout layout = (LinearLayout) inflater.inflate(R.layout.attachment_type_selector, null, true);
@@ -97,18 +102,14 @@ public class AttachmentTypeSelector extends PopupWindow {
setFocusable(true);
setTouchable(true);
- int thresholdInDP = 200;
- float scale = context.getResources().getDisplayMetrics().density;
- int thresholdInPX = (int)(thresholdInDP * scale);
- View contentView = ViewUtil.findById(layout, R.id.contentView);
- LinearLayout.LayoutParams contentViewLayoutParams = (LinearLayout.LayoutParams)contentView.getLayoutParams();
- contentViewLayoutParams.height = keyboardHeight > thresholdInPX ? keyboardHeight : LinearLayout.LayoutParams.WRAP_CONTENT;
- contentView.setLayoutParams(contentViewLayoutParams);
+ updateHeight();
loaderManager.initLoader(1, null, recentRail);
}
public void show(@NonNull Activity activity, final @NonNull View anchor) {
+ updateHeight();
+
if (Permissions.hasAll(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
recentRail.setVisibility(View.VISIBLE);
loaderManager.restartLoader(1, null, recentRail);
@@ -146,6 +147,16 @@ public class AttachmentTypeSelector extends PopupWindow {
}
}
+ private void updateHeight() {
+ int thresholdInDP = 120;
+ float scale = context.getResources().getDisplayMetrics().density;
+ int thresholdInPX = (int)(thresholdInDP * scale);
+ View contentView = ViewUtil.findById(getContentView(), R.id.contentView);
+ LinearLayout.LayoutParams contentViewLayoutParams = (LinearLayout.LayoutParams)contentView.getLayoutParams();
+ contentViewLayoutParams.height = keyboardHeight > thresholdInPX ? keyboardHeight : LinearLayout.LayoutParams.WRAP_CONTENT;
+ contentView.setLayoutParams(contentViewLayoutParams);
+ }
+
@Override
public void dismiss() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
diff --git a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java
index 40c7a84150..407d7d16c1 100644
--- a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java
+++ b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java
@@ -421,7 +421,12 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
View rootView = findViewById(R.id.rootView);
rootView.getViewTreeObserver().addOnGlobalLayoutListener(() -> {
int height = rootView.getRootView().getHeight() - rootView.getHeight();
- expandedKeyboardHeight = Math.max(expandedKeyboardHeight, height);
+ int thresholdInDP = 120;
+ float scale = getResources().getDisplayMetrics().density;
+ int thresholdInPX = (int)(thresholdInDP * scale);
+ if (expandedKeyboardHeight == 0 || height > thresholdInPX) {
+ expandedKeyboardHeight = height;
+ }
collapsedKeyboardHeight = Math.min(collapsedKeyboardHeight, height);
keyboardHeight = Math.max(expandedKeyboardHeight - collapsedKeyboardHeight, keyboardHeight);
});
@@ -1175,6 +1180,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
if (attachmentTypeSelector == null) {
attachmentTypeSelector = new AttachmentTypeSelector(this, getSupportLoaderManager(), new AttachmentTypeListener(), keyboardHeight);
}
+ attachmentTypeSelector.keyboardHeight = keyboardHeight;
attachmentTypeSelector.show(this, attachButton);
} else {
handleManualMmsRequired();
diff --git a/src/org/thoughtcrime/securesms/loki/redesign/views/FriendRequestView.kt b/src/org/thoughtcrime/securesms/loki/redesign/views/FriendRequestView.kt
index 00bae19e29..589b6d2866 100644
--- a/src/org/thoughtcrime/securesms/loki/redesign/views/FriendRequestView.kt
+++ b/src/org/thoughtcrime/securesms/loki/redesign/views/FriendRequestView.kt
@@ -70,7 +70,7 @@ class FriendRequestView(context: Context, attrs: AttributeSet?, defStyleAttr: In
if (isUISetUp) { return }
isUISetUp = true
orientation = VERTICAL
- setPadding(resources.getDimension(R.dimen.large_spacing).toInt(), 0, resources.getDimension(R.dimen.large_spacing).toInt(), 0)
+ setPadding(toPx(48, resources), 0, toPx(48, resources), 0)
addView(topSpacer)
addView(label)
if (!message!!.isOutgoing) {