• Android手机屏幕相关知识(launcher2中)


    1、屏幕数量launcher.java

      原来:
        static final int SCREEN_COUNT = 5; // 五屏  
        static final int DEFAULT_SCREEN = 2; // 默认屏幕为中间的屏幕  
    
     改成:
        static final int SCREEN_COUNT = 1; // 一个屏  
        static final int DEFAULT_SCREEN = 0; // 默认屏幕为中间的屏幕  
    

    注:当java 文件修改了,则对应的launcher.xml文件也要修改,一个横屏的xml文件,一个竖屏的
    res/layout-land/launcher.xml

      原来:
        <com.android.launcher2.Workspace  
                  android:id="@+id/workspace"  
                  android:layout_width="match_parent"  
                  android:layout_height="match_parent"  
                  android:paddingLeft="@dimen/workspace_left_padding"  
                  android:paddingRight="@dimen/workspace_right_padding"  
                  android:paddingTop="@dimen/workspace_top_padding"  
                  android:paddingBottom="@dimen/workspace_bottom_padding"  
                  launcher:defaultScreen="2"  
                  launcher:cellCountX="@integer/cell_count_x"  
                  launcher:cellCountY="@integer/cell_count_y"  
                  launcher:pageSpacing="@dimen/workspace_page_spacing"  
                  launcher:scrollIndicatorPaddingLeft="@dimen/qsb_bar_height"  
                  launcher:scrollIndicatorPaddingRight="@dimen/button_bar_height">  
          
                  <include android:id="@+id/cell1" layout="@layout/workspace_screen" />  
                  <include android:id="@+id/cell2" layout="@layout/workspace_screen" />  
                  <include android:id="@+id/cell3" layout="@layout/workspace_screen" />  
                  <include android:id="@+id/cell4" layout="@layout/workspace_screen" />  
                  <include android:id="@+id/cell5" layout="@layout/workspace_screen" />  
              </com.android.launcher2.Workspace>  
    
    改成:
        <com.android.launcher2.Workspace  
            android:id="@+id/workspace"  
            android:layout_width="match_parent"  
            android:layout_height="match_parent"  
            android:paddingLeft="@dimen/workspace_left_padding"  
            android:paddingRight="@dimen/workspace_right_padding"  
            android:paddingTop="@dimen/workspace_top_padding"  
            android:paddingBottom="@dimen/workspace_bottom_padding"  
            launcher:defaultScreen="0"  
            launcher:cellCountX="@integer/cell_count_x"  
            launcher:cellCountY="@integer/cell_count_y"  
            launcher:pageSpacing="@dimen/workspace_page_spacing"  
            launcher:scrollIndicatorPaddingLeft="@dimen/qsb_bar_height"  
            launcher:scrollIndicatorPaddingRight="@dimen/button_bar_height">  
          
            <include android:id="@+id/cell1" layout="@layout/workspace_screen" />  
          
        </com.android.launcher2.Workspace>  
    

    同理,res/layout-port/launcher.xml也是这样修改

    2、

  • 相关阅读:
    Pig与Hive的区别
    Hadoop MapReduceV2(Yarn) 框架简介
    Spark技术内幕:Client,Master和Worker 通信源码解析
    Spark技术内幕:Stage划分及提交源码分析
    无责任比较thrift vs protocol buffers
    理解hadoop的Map-Reduce数据流(data flow)
    hadoop-2.5安装与配置
    linux下查看本地程序占用的端口
    MFC安装与部署(程序打包)
    关系数据库设计中数据字典设计例子
  • 原文地址:https://www.cnblogs.com/xhf-wonder/p/7337602.html
Copyright © 2020-2023  润新知