zoukankan      html  css  js  c++  java
  • [android] 界面的划分

    1.统一界面管理

    1.1利用一个activity去管理应用的所有的界面

    1.1.1 理解ActivityWindowView之间的关系

    1.1.2 避免Activity过多导致的问题,

    例如:彻底退出应用,频繁改动清单文件等

    统一界面风格,降低用户的学习成本

     

    2.界面划分

    2.1展示效果图,将界面进行初步划分

    2.2界面管理实现

    2.2.1抽取标题管理

    2.2.2抽取底部导航管理

    2.2.3抽取中间内容部分管理,建立内容部分切换机制

    2.2.4完善用户提示机制

     

    2.3 准备工作

    2.3.1 导入图片和文字等资源文件

    可以把项目作为一个libirary

     

    2.3.2 命名规则说明

    防止名称冲突

    2.4 Activity设置布局文件

    2.4.1 创建三种标题部分布局,两种导航部分布局

    2.4.2 主布局文件中使用<include/>包含布局文件

     

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >
    
        <!-- 标题部分 -->
    
        <include
            android:id="@+id/il_title"
            android:layout_width="match_parent"
            android:layout_height="20dp"
            android:layout_alignParentTop="true"
            layout="@layout/il_title" />
        <!-- 导航部分 -->
        <include
            android:id="@+id/il_bottom"
            android:layout_width="match_parent"
            android:layout_height="20dp"
            android:layout_alignParentBottom="true"
            layout="@layout/il_bottom" />
        <!-- 主体部分 -->
        <RelativeLayout 
            android:layout_below="@id/il_title"
            android:layout_above="@id/il_bottom"></RelativeLayout>
    
    </RelativeLayout>

     

     

    2.5 屏幕适配

    2.5.1 宽度适配

    2.5.2 高度适配

  • 相关阅读:
    java第九周上机
    安卓-计算器
    安卓第四周作业
    第十五周作业
    第十三周作业
    第十三周上机作业
    第十二周作业
    第十二周上机作业
    第十一周作业
    第十一周上机作业
  • 原文地址:https://www.cnblogs.com/taoshihan/p/5618276.html
Copyright © 2011-2022 走看看