全面屏开屏页引导页适配尺寸

拼搏飞 2019-04-01 11:38:31


这个图片尺寸是UI按照苹果的来的 Android全面屏图片就变形了

全面屏开屏页适配的时候 ,开屏图需要设计多大尺寸啊 大佬们




...全文
1397 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
Joe_n 2019-07-09
  • 打赏
  • 举报
回复
https://blog.csdn.net/wds1181977/article/details/88095843 比较好的解决方案
拼搏飞 2019-04-01
  • 打赏
  • 举报
回复
引用 5 楼 韩曙亮 的回复:
[quote=引用 2 楼 拼搏飞 的回复:] [quote=引用 1 楼 韩曙亮 的回复:] 你这个 可能 是 按照 9:16 宽高比设计 , 结果 实际宽高比是 9 : 20 或者 9:21 ; 背景 和 元素 要 单独 分离出来 , 背景里的 元素 所有的 元素 文字 , 都要设计 宽高比例 , 如果 布局中 没有 layout_aspectRatio 之类的 设置宽高比的属性 , 在 代码里 动态设置 布局 ; 尽量用 PercentRelativeLayout 或者 CoordinatorLayout , 这些新式布局 有宽高比配置; 可以完美解决 安卓 适配问题 ;
 <!--闪屏页-->
    <!--<style name="SplashTheme" parent="@android:style/Theme.NoTitleBar.Fullscreen">-->
    <!--<style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">-->
    <style name="SplashTheme" parent="AppBaseTheme">
        <!--<item name="android:adjustViewBounds">true</item>-->
        <!--<item name="colorPrimary">@color/colorPrimary</item>-->
        <!--<item name="colorPrimaryDark">@color/colorPrimary</item>-->
        <!--<item name="colorAccent">@color/colorPrimary</item>-->
        <!--<item name="android:windowFullscreen">true</item>-->
        <!--<item name="android:background">@drawable/bg_splash</item>-->
        <item name="android:background">@mipmap/splash_bg</item>
        <!--<item name="android:windowBackground">@mipmap/splash_bg</item>-->
    </style>
我现在是设置的主题,没有用布局,也用layer-list将背景和元素分离出来的方法试过了,在部分机型上图片两边还有很多空白的地方,所有我觉得是图片尺寸的问题,因为以前没做过全面屏开屏图的适配,对尺寸邀请不大清楚 [/quote] 不用布局的话 , 也就 没法 适配 , 你还是改成 布局的吧 , 放在 主题 里 没法弄 [/quote] 好吧
韩曙亮 2019-04-01
  • 打赏
  • 举报
回复
引用 2 楼 拼搏飞 的回复:
[quote=引用 1 楼 韩曙亮 的回复:]
你这个 可能 是 按照 9:16 宽高比设计 , 结果 实际宽高比是 9 : 20 或者 9:21 ;


背景 和 元素 要 单独 分离出来 , 背景里的 元素
所有的 元素 文字 , 都要设计 宽高比例 , 如果 布局中 没有 layout_aspectRatio 之类的 设置宽高比的属性 , 在 代码里 动态设置 布局 ;
尽量用 PercentRelativeLayout 或者 CoordinatorLayout , 这些新式布局 有宽高比配置; 可以完美解决 安卓 适配问题 ;

 <!--闪屏页-->
<!--<style name="SplashTheme" parent="@android:style/Theme.NoTitleBar.Fullscreen">-->
<!--<style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">-->
<style name="SplashTheme" parent="AppBaseTheme">
<!--<item name="android:adjustViewBounds">true</item>-->
<!--<item name="colorPrimary">@color/colorPrimary</item>-->
<!--<item name="colorPrimaryDark">@color/colorPrimary</item>-->
<!--<item name="colorAccent">@color/colorPrimary</item>-->
<!--<item name="android:windowFullscreen">true</item>-->
<!--<item name="android:background">@drawable/bg_splash</item>-->
<item name="android:background">@mipmap/splash_bg</item>
<!--<item name="android:windowBackground">@mipmap/splash_bg</item>-->
</style>

我现在是设置的主题,没有用布局,也用layer-list将背景和元素分离出来的方法试过了,在部分机型上图片两边还有很多空白的地方,所有我觉得是图片尺寸的问题,因为以前没做过全面屏开屏图的适配,对尺寸邀请不大清楚
[/quote]

不用布局的话 , 也就 没法 适配 , 你还是改成 布局的吧 , 放在 主题 里 没法弄
拼搏飞 2019-04-01
  • 打赏
  • 举报
回复
引用 3 楼 王能 的回复:
你这种背景只能拉伸。 把背景做简单点然后使用.9图只拉伸纯色这样好些。
他要是背景做简单点或者纯色 就没那么麻烦了 关键是他要这个样子
王能 2019-04-01
  • 打赏
  • 举报
回复
你这种背景只能拉伸。 把背景做简单点然后使用.9图只拉伸纯色这样好些。
拼搏飞 2019-04-01
  • 打赏
  • 举报
回复
引用 1 楼 韩曙亮 的回复:
你这个 可能 是 按照 9:16 宽高比设计 , 结果 实际宽高比是 9 : 20 或者 9:21 ; 背景 和 元素 要 单独 分离出来 , 背景里的 元素 所有的 元素 文字 , 都要设计 宽高比例 , 如果 布局中 没有 layout_aspectRatio 之类的 设置宽高比的属性 , 在 代码里 动态设置 布局 ; 尽量用 PercentRelativeLayout 或者 CoordinatorLayout , 这些新式布局 有宽高比配置; 可以完美解决 安卓 适配问题 ;
 <!--闪屏页-->
    <!--<style name="SplashTheme" parent="@android:style/Theme.NoTitleBar.Fullscreen">-->
    <!--<style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">-->
    <style name="SplashTheme" parent="AppBaseTheme">
        <!--<item name="android:adjustViewBounds">true</item>-->
        <!--<item name="colorPrimary">@color/colorPrimary</item>-->
        <!--<item name="colorPrimaryDark">@color/colorPrimary</item>-->
        <!--<item name="colorAccent">@color/colorPrimary</item>-->
        <!--<item name="android:windowFullscreen">true</item>-->
        <!--<item name="android:background">@drawable/bg_splash</item>-->
        <item name="android:background">@mipmap/splash_bg</item>
        <!--<item name="android:windowBackground">@mipmap/splash_bg</item>-->
    </style>
我现在是设置的主题,没有用布局,也用layer-list将背景和元素分离出来的方法试过了,在部分机型上图片两边还有很多空白的地方,所有我觉得是图片尺寸的问题,因为以前没做过全面屏开屏图的适配,对尺寸邀请不大清楚
韩曙亮 2019-04-01
  • 打赏
  • 举报
回复
你这个 可能 是 按照 9:16 宽高比设计 , 结果 实际宽高比是 9 : 20 或者 9:21 ;


背景 和 元素 要 单独 分离出来 , 背景里的 元素
所有的 元素 文字 , 都要设计 宽高比例 , 如果 布局中 没有 layout_aspectRatio 之类的 设置宽高比的属性 , 在 代码里 动态设置 布局 ;
尽量用 PercentRelativeLayout 或者 CoordinatorLayout , 这些新式布局 有宽高比配置; 可以完美解决 安卓 适配问题 ;

80,350

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧