mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-17 12:30:07 +03:00
VoIP: clean code after benoit review
This commit is contained in:
parent
8bb98d9ecc
commit
e36059a427
7 changed files with 16 additions and 14 deletions
|
@ -56,7 +56,7 @@ fun TextView.setTextOrHide(newText: CharSequence?, hideWhenBlank: Boolean = true
|
|||
* @param coloredTextRes the resource id of the colored part of the text
|
||||
* @param colorAttribute attribute of the color. Default to colorAccent
|
||||
* @param underline true to also underline the text. Default to false
|
||||
* @param onClick attributes to handle click on the colored part if needed required
|
||||
* @param onClick attributes to handle click on the colored part if needed
|
||||
*/
|
||||
fun TextView.setTextWithColoredPart(@StringRes fullTextRes: Int,
|
||||
@StringRes coloredTextRes: Int,
|
||||
|
@ -83,8 +83,7 @@ fun TextView.setTextWithColoredPart(@StringRes fullTextRes: Int,
|
|||
|
||||
override fun updateDrawState(ds: TextPaint) {
|
||||
ds.color = color
|
||||
// underline will be handled separately if needed, see below
|
||||
ds.isUnderlineText = false
|
||||
ds.isUnderlineText = !underline
|
||||
}
|
||||
}
|
||||
setSpan(clickableSpan, index, index + coloredPart.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2019 New Vector Ltd
|
||||
* Copyright 2020 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -50,13 +50,15 @@
|
|||
android:id="@+id/messageVerificationRequestStub"
|
||||
style="@style/TimelineContentStubBaseParams"
|
||||
android:layout="@layout/item_timeline_event_verification_stub"
|
||||
tools:visibility="gone" />
|
||||
tools:layout_marginTop= "250dp"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/messageVerificationDoneStub"
|
||||
style="@style/TimelineContentStubBaseParams"
|
||||
tools:layout_marginTop= "450dp"
|
||||
android:layout="@layout/item_timeline_event_status_tile_stub"
|
||||
tools:visibility="gone" />
|
||||
tools:visibility="visible" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
android:id="@+id/itemCallCreatorAvatar"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
tools:src="@tools:sample/avatars"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
|
||||
<TextView
|
||||
|
|
Loading…
Add table
Reference in a new issue