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.res.Resources
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.RelativeLayout
|
||||
@ -59,9 +60,12 @@ class QuoteView : LinearLayout {
|
||||
fun getIntrinsicContentHeight(): Int {
|
||||
var result = 0
|
||||
val width = screenWidth
|
||||
val author = quoteViewAuthorTextView.text
|
||||
val authorTextViewIntrinsicHeight = TextUtilities.getIntrinsicHeight(author, quoteViewAuthorTextView.paint, width)
|
||||
result += authorTextViewIntrinsicHeight
|
||||
var authorTextViewIntrinsicHeight = 0
|
||||
if (quoteViewAuthorTextView.isVisible) {
|
||||
val author = quoteViewAuthorTextView.text
|
||||
authorTextViewIntrinsicHeight = TextUtilities.getIntrinsicHeight(author, quoteViewAuthorTextView.paint, width)
|
||||
result += authorTextViewIntrinsicHeight
|
||||
}
|
||||
val body = quoteViewBodyTextView.text
|
||||
val bodyTextViewIntrinsicHeight = TextUtilities.getIntrinsicHeight(body, quoteViewBodyTextView.paint, width)
|
||||
result += bodyTextViewIntrinsicHeight
|
||||
|
@ -26,6 +26,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:orientation="vertical">
|
||||
|
Loading…
Reference in New Issue
Block a user