YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.util.image.SquareImageView Class Reference

An AppCompatImageView whose measured height always equals its measured width, regardless of layout_height. More...

Inheritance diagram for de.yaacc.util.image.SquareImageView:
Inheritance graph
Collaboration diagram for de.yaacc.util.image.SquareImageView:
Collaboration graph

Public Member Functions

 SquareImageView (Context context)
 
 SquareImageView (Context context, AttributeSet attrs)
 
 SquareImageView (Context context, AttributeSet attrs, int defStyleAttr)
 

Protected Member Functions

void onMeasure (int widthMeasureSpec, int heightMeasureSpec)
 

Detailed Description

An AppCompatImageView whose measured height always equals its measured width, regardless of layout_height.

Used for the browse card-grid's thumbnail, where a fixed height unrelated to the card's (density/span-count-dependent) actual width forced CENTER_CROP to crop away a large, inconsistent portion of square album art - a 1:1 view keeps the crop close to what CENTER_CROP needs for typically-square source images, across every span count and screen size, without hardcoding a height that only happens to match one specific card width.


The documentation for this class was generated from the following file: