This is a Chinese version of https://gist.github.com/1207002/86f48cd3b3b72c85e6293926cf7c730de03b2f08 from lucasfais
| ⌘T | 前往文件 |
| ⌘⌃P | 前往项目 |
| ⌘R | 前往 method |
| ⌘⇧P | 命令提示 |
This is a Chinese version of https://gist.github.com/1207002/86f48cd3b3b72c85e6293926cf7c730de03b2f08 from lucasfais
| ⌘T | 前往文件 |
| ⌘⌃P | 前往项目 |
| ⌘R | 前往 method |
| ⌘⇧P | 命令提示 |
| pm list packages -f |
| #!/usr/bin/python | |
| ''' | |
| Copyright 2009, 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://www.apache.org/licenses/LICENSE-2.0 |
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import subprocess | |
| import re | |
| ntfs_pattern = re.compile(r'File System Personality: NTFS') | |
| ntfs_device_node = re.compile(r'.*Device Node:.*') | |
| device_dict = {} |
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <!-- google's material design colours from | |
| http://www.google.com/design/spec/style/color.html#color-ui-color-palette --> | |
| <!--reds--> | |
| <color name="md_red_50">#FFEBEE</color> | |
| <color name="md_red_100">#FFCDD2</color> | |
| <color name="md_red_200">#EF9A9A</color> |
| /* | |
| * Copyright (C) 2014 skyfish.jy@gmail.com | |
| * | |
| * 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://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| private void setTaskDescription(){ | |
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { | |
| String title = getString(R.string.app_name); | |
| Bitmap icon = BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher); | |
| int color = getResources().getColor(R.color.task_background); | |
| // The legacy method call | |
| // setTaskDescription(new ActivityManager.TaskDescription(title, icon, color)); | |
| // The reflected method call |
| 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; |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> | |
| <!-- Generated by RHY @will_awoke --> | |
| <module name="Checker"> | |
| <property name="charset" value="UTF-8"/> | |
| <property name="severity" value="warning"/> |
Centralize the support libraries dependencies in gradle
Working with multi-modules project, it is very useful to centralize the dependencies, especially the support libraries.
A very good way is to separate gradle build files, defining something like:
root
--gradleScript
----dependencies.gradle