Git Product home page Git Product logo

liuyi-android-app's Introduction

LiuYi App DevLog

  • 挑选每个页面的背景图,大小需统一
  • 重设计主页 UI
  • 重设计生成报告页 UI
  • 卡片增加背景图
  • [ ]

5.15

Done : 优化 toolbar 界面

目前先在 allTaskActivity 页做测试

https://www.jianshu.com/p/bbc703a0015e

https://www.heqiangfly.com/2021/05/01/android-statusbar-and-navigationbar/

  • 设置顶部状态栏背景+图标

    理想是白底黑字,尝试过很多方法,真机上符合要求的只有以下一种

    // themes.xml 文件中添加如下内容
    <item name="android:windowLightStatusBar">true</item>			设置状态栏图标颜色
    <item name="android:statusBarColor">@color/white</item>			设置状态栏背景颜色
    
  • 设置状态栏文本和图标颜色为黑色

    • 解决 toolbar 收缩之后标题不居中的问题

      奇淫巧计 : 因为 CollapsingToolbarLayout 原生计算方式将 toolbar 左侧的按钮也算进去了,所以我们可以在 toolbar 下插入一个不显示的 textview,来中和它。。

      <TextView
          android:id="@+id/tv_for_title_to_middle"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="XXXXXXX"
          android:textSize="15sp"
          android:layout_gravity="right"
          android:scrollHorizontally="true"
          android:visibility="invisible"  />

      同时设置 CollapsingToolbarLayout 中:app:expandedTitleGravity="center"

Done : 修复 idea 界面图片显示不全或者有拉伸的问题

android:adjustViewBounds="true"
android:scaleType="fitXY"

Todo : 统一 UI 相关尺寸

存放在 values/dimens.xml

  • 统一背景图片高度
  • 统一 cardview 相关尺寸

~ - 5.15

Problems & Solving

  • fitsSystemWindows 属性可用于实现沉浸式状态栏,但是使用不当会出现意向不到的结果

    比如,当 coordinatorLayout 和 AppBarLayout 都设置该属性时,就会出现下述结果:

    image-20220515232944668

image-20220515233036801

也就是图片无法填充满,而会有空当。

具体解释可参考该博客 https://www.jianshu.com/p/9555f2386850

大概感觉是这个原因

image-20220515233153545

image-20220517001840249

有用的资料

liuyi-android-app's People

Contributors

crepuscule-v avatar

Stargazers

Liu Junhan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.