/* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://w…
一:关机菜单添加飞行模式选项 源码路径:frameworks/base/core/res/res/values/config.xml 增加<item>airplane</item> <!-- Defines the default set of global actions. Actions may still be disabled or hidden based on the current state of the device. Each item must be o…
1.在阅读源码的时候经常发现有一些标志属性使用一些位操作来判断是否具有该标志,增加标志或者去除标志. 比如View.java中的 /** * This view does not want keystrokes. Use with TAKES_FOCUS_MASK when * calling setFlags. */ private static final int NOT_FOCUSABLE = 0x00000000; /** * This view wants keystrokes. Us…
1.编译种错误提示: arm-none-linux-gnueabi-gcc: directory: No such file or directory arm-none-linux-gnueabi-gcc: directory": No such file or directory <command-line>:0:16: warning: missing terminating " character 解决方案: https://github.com/Pivosgroup…
Android color(颜色) 在XML文件和java代码中,有需要的朋友可以参考下. 1.使用Color类的常量,如: int color = Color.BLUE;//创建一个蓝色 是使用Android提供的颜色 int color = Color.RED; int color = Color.WHITE; 2.通过ARGB构建,如: int color = Color.argb(127, 255, 0, 255); //半透明的紫色其中第一个参数表示透明,0表示完全透明,255(ff)…