System directories
| Method | Result |
|---|---|
| Environment.getDataDirectory() | /data |
| Environment.getDownloadCacheDirectory() | /cache |
| Environment.getRootDirectory() | /system |
External storage directories
| var _ = require('lodash'), | |
| colors = require('colors/safe'), | |
| Table = require('cli-table2'), | |
| format = require('util').format, | |
| util = require('../../util'), | |
| cliUtils = require('./cli-utils'), | |
| print = require('../../print'), | |
| pad = cliUtils.padLeft, |
| import android.content.Context; | |
| import android.content.res.TypedArray; | |
| import android.graphics.Canvas; | |
| import android.graphics.Rect; | |
| import android.graphics.drawable.Drawable; | |
| import android.support.v7.widget.LinearLayoutManager; | |
| import android.support.v7.widget.RecyclerView; | |
| import android.util.AttributeSet; | |
| import android.view.View; |
| public class DeepScrollView extends ScrollView { | |
| public ShrinkWatchScrollView(Context context, AttributeSet attrs, | |
| int defStyle) { | |
| super(context, attrs, defStyle); | |
| } | |
| public ShrinkWatchScrollView(Context context, AttributeSet attrs) { | |
| this(context, attrs, 0); |
| /* Copyright 2013 Google Inc. | |
| Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html */ | |
| package com.example.latlnginterpolation; | |
| import android.animation.ObjectAnimator; | |
| import android.animation.TypeEvaluator; | |
| import android.animation.ValueAnimator; | |
| import android.annotation.TargetApi; | |
| import android.os.Build; |
System directories
| Method | Result |
|---|---|
| Environment.getDataDirectory() | /data |
| Environment.getDownloadCacheDirectory() | /cache |
| Environment.getRootDirectory() | /system |
External storage directories
| import android.content.Context; | |
| import android.content.res.TypedArray; | |
| import android.graphics.Canvas; | |
| import android.graphics.drawable.Drawable; | |
| import android.util.AttributeSet; | |
| import android.widget.ImageView; | |
| public class ForegroundImageView extends ImageView { | |
| private Drawable foreground; |
This is a Chinese version of https://gist.github.com/1207002/86f48cd3b3b72c85e6293926cf7c730de03b2f08 from lucasfais
| ⌘T | 前往文件 |
| ⌘⌃P | 前往项目 |
| ⌘R | 前往 method |
| ⌘⇧P | 命令提示 |
| Intent intent = new Intent(Intent.ACTION_MAIN); | |
| intent.setData(Uri.parse("content://mms-sms/")); | |
| startActivity(intent); |
| public class RC4 { | |
| private final byte[] S = new byte[256]; | |
| private final byte[] T = new byte[256]; | |
| private final int keylen; | |
| public RC4(final byte[] key) { | |
| if (key.length < 1 || key.length > 256) { | |
| throw new IllegalArgumentException( | |
| "key must be between 1 and 256 bytes"); | |
| } else { |
| public void turnGPSOn() | |
| { | |
| Intent intent = new Intent("android.location.GPS_ENABLED_CHANGE"); | |
| intent.putExtra("enabled", true); | |
| this.ctx.sendBroadcast(intent); | |
| String provider = Settings.Secure.getString(ctx.getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED); | |
| if(!provider.contains("gps")){ //if gps is disabled | |
| final Intent poke = new Intent(); | |
| poke.setClassName("com.android.settings", "com.android.settings.widget.SettingsAppWidgetProvider"); |