This commit is contained in:
Grishka
2024-05-06 12:56:56 +03:00
parent 4a1b1e19e8
commit bc78c61009

View File

@@ -100,15 +100,19 @@ public class SettingsServerAboutFragment extends LoaderFragment{
scroller.setClipToPadding(false); scroller.setClipToPadding(false);
scroller.addView(scrollingLayout); scroller.addView(scrollingLayout);
FixedAspectRatioImageView banner=new FixedAspectRatioImageView(getActivity()); if(!TextUtils.isEmpty(instance.thumbnail)){
banner.setAspectRatio(1.914893617f); FixedAspectRatioImageView banner=new FixedAspectRatioImageView(getActivity());
banner.setScaleType(ImageView.ScaleType.CENTER_CROP); banner.setAspectRatio(1.914893617f);
banner.setOutlineProvider(OutlineProviders.bottomRoundedRect(16)); banner.setScaleType(ImageView.ScaleType.CENTER_CROP);
banner.setClipToOutline(true); banner.setOutlineProvider(OutlineProviders.bottomRoundedRect(16));
ViewImageLoader.loadWithoutAnimation(banner, getResources().getDrawable(R.drawable.image_placeholder, getActivity().getTheme()), new UrlImageLoaderRequest(instance.thumbnail)); banner.setClipToOutline(true);
LinearLayout.LayoutParams blp=new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); ViewImageLoader.loadWithoutAnimation(banner, getResources().getDrawable(R.drawable.image_placeholder, getActivity().getTheme()), new UrlImageLoaderRequest(instance.thumbnail));
blp.bottomMargin=V.dp(24); LinearLayout.LayoutParams blp=new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
scrollingLayout.addView(banner, blp); blp.bottomMargin=V.dp(24);
scrollingLayout.addView(banner, blp);
}else{
scrollingLayout.setPadding(0, V.dp(24), 0, 0);
}
boolean needDivider=false; boolean needDivider=false;
if(instance.contactAccount!=null){ if(instance.contactAccount!=null){