Merge "Only offset header icon when description is possible to overlap keyboard" into udc-dev
This commit is contained in:
@@ -68,15 +68,15 @@ class CredentialPasswordView(context: Context, attrs: AttributeSet?) :
|
|||||||
var inputTopBound: Int
|
var inputTopBound: Int
|
||||||
var headerRightBound = right
|
var headerRightBound = right
|
||||||
var headerTopBounds = top
|
var headerTopBounds = top
|
||||||
|
var headerBottomBounds = bottom
|
||||||
val subTitleBottom: Int = if (subtitleView.isGone) titleView.bottom else subtitleView.bottom
|
val subTitleBottom: Int = if (subtitleView.isGone) titleView.bottom else subtitleView.bottom
|
||||||
val descBottom = if (descriptionView.isGone) subTitleBottom else descriptionView.bottom
|
val descBottom = if (descriptionView.isGone) subTitleBottom else descriptionView.bottom
|
||||||
if (resources.configuration.orientation == ORIENTATION_LANDSCAPE) {
|
if (resources.configuration.orientation == ORIENTATION_LANDSCAPE) {
|
||||||
inputTopBound = (bottom - credentialInput.height) / 2
|
inputTopBound = (bottom - credentialInput.height) / 2
|
||||||
inputLeftBound = (right - left) / 2
|
inputLeftBound = (right - left) / 2
|
||||||
headerRightBound = inputLeftBound
|
headerRightBound = inputLeftBound
|
||||||
|
if (descriptionView.bottom > headerBottomBounds) {
|
||||||
headerTopBounds -= iconView.bottom.coerceAtMost(bottomInset)
|
headerTopBounds -= iconView.bottom.coerceAtMost(bottomInset)
|
||||||
|
|
||||||
if (descriptionView.bottom > bottomInset) {
|
|
||||||
credentialHeader.layout(left, headerTopBounds, headerRightBound, bottom)
|
credentialHeader.layout(left, headerTopBounds, headerRightBound, bottom)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user