Make avatar in drawer rounded
This commit is contained in:
3 files changed
+8
-4
No files matched your search
@@ -22,12 +22,11 @@ import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatImageView;
|
||||
|
||||
import com.google.android.material.imageview.ShapeableImageView;
|
||||
import com.hippo.ehviewer.R;
|
||||
import com.hippo.yorozuya.MathUtils;
|
||||
|
||||
public class FixedAspectImageView extends AppCompatImageView {
|
||||
public class FixedAspectImageView extends ShapeableImageView {
|
||||
|
||||
private static final int[] MIN_ATTRS = {
|
||||
android.R.attr.minWidth,
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
android:layout_height="64dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginBottom="48dp" />
|
||||
android:layout_marginBottom="48dp"
|
||||
app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.App.CornerSize50Percent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/display_name"
|
||||
|
||||
@@ -113,4 +113,8 @@
|
||||
<item name="cardBackgroundColor">?attr/contentColorReactive</item>
|
||||
</style>
|
||||
|
||||
<style name="ShapeAppearanceOverlay.App.CornerSize50Percent" parent="">
|
||||
<item name="cornerSize">50%</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
Reference in new issue
Block a user