Commit fc270e13 authored by fallenstardust's avatar fallenstardust

增加横屏下轮播图高度调整

parent 26e30000
......@@ -214,8 +214,13 @@ public class HomeFragment extends BaseFragemnt implements OnDuelAssistantListene
cv_banner = view.findViewById(R.id.cv_banner);
cv_banner.post(() -> {
ViewGroup.LayoutParams layoutParams = cv_banner.getLayoutParams();
layoutParams.width = cv_banner.getWidth();
layoutParams.height = layoutParams.width / 3;
if (isHorizontal) {
layoutParams.width = cv_banner.getWidth();
layoutParams.height = layoutParams.width / 5;
} else {
layoutParams.width = cv_banner.getWidth();
layoutParams.height = layoutParams.width / 3;
}
cv_banner.setLayoutParams(layoutParams);
});
tv_banner_loading = view.findViewById(R.id.tv_banner_loading);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment