- 博客(20)
- 资源 (3)
- 收藏
- 关注
原创 Android 手机距离感知器 代码实现
完美实现 感应距离让手机自动息屏 防止用户误触界面 private void initSensor() { mManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); // 获取系统服务POWER_SERVICE,返回一个PowerManager对象 localP...
2019-01-23 21:36:03 1010
原创 Android app 获取底部虚拟按键的高度
public static int getVirtualBarHeight(Context context) { int vh = 0; WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); Display di...
2019-01-23 21:26:53 4975
原创 小米手机 全面屏 状态判断
小米手机判断当前是不是全面屏状态public static boolean isFullScreen(Context context) { // true 是手势,默认是 false // https://www.v2ex.com/t/470543 return Settings.Global.getInt(context.getContentResol...
2019-01-23 21:22:38 1327 1
原创 Toast util
customer_toast_bg<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <corners andro
2019-01-11 19:05:54 148
原创 FloatWindow 简单的悬浮窗
悬浮窗 适配完美的悬浮窗支持滑动 双击放大逻辑public class Test extends Activity { private static WindowManager mWindowManager; private WindowManager.LayoutParams wmParams; private int width, height; pri...
2019-01-11 18:58:49 2263
原创 Android 按钮双击检测
Android 按钮双击检测public abstract class DoubleClickListener implements View.OnClickListener { // 两次点击按钮之间的点击间隔 private static final int MIN_CLICK_DELAY_TIME = 500; private static long lastCl...
2019-01-11 17:38:29 1218
转载 android NDK 系列问题1
Android: Type Method 'NewStringUTF' could not be resolved http://rzwwd.blog.163.com/blog/static/387040642013126113941766/
2015-03-19 09:26:46 298
原创 N的阶乘 有多少个末尾0
N != 1*2*3*4*.............................................N;0 由
2014-09-10 20:45:04 389
原创 字符串全排列
#include #include using namespace std;void swap(char * a, char * b) { char temp = * a; *a = *b; *b = temp;}void swapArea(char * a, char *b) { while( a swap(
2014-09-06 21:37:43 258
原创 单链表操作
#include #include using namespace std;struct ListNode{ int m_nValue; ListNode * m_pNext;};void addToTail (ListNode ** pHead, int value){ ListNode * pNode = new L
2014-09-06 18:00:59 326
原创 C++实现7种基本排序
#include using namespace std;void printData(int data[],int n) { for(int i =0 ; i data[t]) { t = j; } } swap(data[i], data[t]); }}void InsertSort(int data[], int n) { for(int i = 1; i = 0; --j) { if
2014-09-06 17:56:14 384
Nifty stuff that you can still do with Android by Xavier Martin
2015-12-10
Art-Exploring-the-New-Android-KitKat-Runtime
2015-12-10
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人