mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +00:00
Minor tweaks
This commit is contained in:
parent
6d9eb0a932
commit
6ddde26496
@ -3,6 +3,7 @@ package org.thoughtcrime.securesms.conversation.v2.messages
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.res.Resources
|
import android.content.res.Resources
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
|
import android.util.Log
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.widget.LinearLayout
|
import android.widget.LinearLayout
|
||||||
import android.widget.RelativeLayout
|
import android.widget.RelativeLayout
|
||||||
@ -59,9 +60,12 @@ class QuoteView : LinearLayout {
|
|||||||
fun getIntrinsicContentHeight(): Int {
|
fun getIntrinsicContentHeight(): Int {
|
||||||
var result = 0
|
var result = 0
|
||||||
val width = screenWidth
|
val width = screenWidth
|
||||||
val author = quoteViewAuthorTextView.text
|
var authorTextViewIntrinsicHeight = 0
|
||||||
val authorTextViewIntrinsicHeight = TextUtilities.getIntrinsicHeight(author, quoteViewAuthorTextView.paint, width)
|
if (quoteViewAuthorTextView.isVisible) {
|
||||||
result += authorTextViewIntrinsicHeight
|
val author = quoteViewAuthorTextView.text
|
||||||
|
authorTextViewIntrinsicHeight = TextUtilities.getIntrinsicHeight(author, quoteViewAuthorTextView.paint, width)
|
||||||
|
result += authorTextViewIntrinsicHeight
|
||||||
|
}
|
||||||
val body = quoteViewBodyTextView.text
|
val body = quoteViewBodyTextView.text
|
||||||
val bodyTextViewIntrinsicHeight = TextUtilities.getIntrinsicHeight(body, quoteViewBodyTextView.paint, width)
|
val bodyTextViewIntrinsicHeight = TextUtilities.getIntrinsicHeight(body, quoteViewBodyTextView.paint, width)
|
||||||
result += bodyTextViewIntrinsicHeight
|
result += bodyTextViewIntrinsicHeight
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginEnd="30dp"
|
android:layout_marginEnd="30dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
Loading…
Reference in New Issue
Block a user