3492: Correctly shorten name in drawer and notifications (#3495)

* #3492: Correctly shorten name in drawer and notifications

* Trigger linter again

* 3492: Use a flat ContraintLayout for everything
This commit is contained in:
UlrichKu 2023-04-08 16:55:32 +02:00 committed by GitHub
commit 040268e2d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 133 additions and 121 deletions

View file

@ -27,6 +27,7 @@ import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.Drawable
import android.net.Uri
import android.os.Bundle
import android.text.TextUtils
import android.util.Log
import android.view.KeyEvent
import android.view.Menu
@ -463,6 +464,9 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje
closeDrawerOnProfileListClick = true
}
header.currentProfileName.maxLines = 1
header.currentProfileName.ellipsize = TextUtils.TruncateAt.END
header.accountHeaderBackground.setColorFilter(getColor(R.color.headerBackgroundFilter))
header.accountHeaderBackground.setBackgroundColor(MaterialColors.getColor(header, R.attr.colorBackgroundAccent))
val animateAvatars = preferences.getBoolean("animateGifAvatars", false)