forked from thunderbird/thunderbird-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request thunderbird#4891 from k9mail/update_tokenautocomplete
Update TokenAutoComplete
- Loading branch information
Showing
9 changed files
with
337 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
app/ui/legacy/src/main/java/com/fsck/k9/ui/compose/RecipientTokenConstraintLayout.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.fsck.k9.ui.compose | ||
|
||
import android.content.Context | ||
import android.util.AttributeSet | ||
import android.widget.TextView | ||
import androidx.constraintlayout.widget.ConstraintLayout | ||
|
||
/** | ||
* Custom [ConstraintLayout] that returns an appropriate baseline value for our recipient token layout. | ||
*/ | ||
class RecipientTokenConstraintLayout @JvmOverloads constructor( | ||
context: Context, | ||
attrs: AttributeSet? = null, | ||
defStyleAttr: Int = 0 | ||
) : ConstraintLayout(context, attrs, defStyleAttr) { | ||
private lateinit var textView: TextView | ||
|
||
override fun onFinishInflate() { | ||
super.onFinishInflate() | ||
textView = findViewById(android.R.id.text1) | ||
} | ||
|
||
override fun getBaseline(): Int { | ||
return textView.top + textView.baseline | ||
} | ||
} |
Oops, something went wrong.