as modules use android stdio modules
1. Add variables in gradle
# Project-wide Gradle settings. # IDE (eg Android Studio) users: # Gradle settings configured through the IDE *will override* # any settings specified in this file. # For more details on how to configure your build environment visit # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx1536m # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true # org.gradle.parallel=true COMPILE_SDK_VERSION=24 BUILD_TOOLS_VERSION=24.0.3 JUNIT_VERSION=4.12 SUPPORT_VERSION=24.2.1 #verticalrefreshlayout LIB_MINI_SDK_VERSION=16 LIB_TARGET_SDK_VERSION=24 #sample SAMPLE_MIN_SDK_VERSION=16 SAMPLE_TARGET_SDK_VERSION=23
2. Modify the references in the app
apply plugin: 'com.android.application' android { compileSdkVersion Integer.parseInt(COMPILE_SDK_VERSION) buildToolsVersion BUILD_TOOLS_VERSION defaultConfig { applicationId "cn.baoyou.curiousby.com.newrproject" minSdkVersion SAMPLE_MIN_SDK_VERSION targetSdkVersion SAMPLE_TARGET_SDK_VERSION versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile "com.android.support:appcompat-v7:$SUPPORT_VERSION" compile "com.android.support:recyclerview-v7:$SUPPORT_VERSION" compile "com.android.support:design:$SUPPORT_VERSION" compile 'com.tomergoldst.android:tooltips:1.0.6' compile 'q.rorbin:badgeview:1.0.5' compile 'com.muddzdev:styleabletoast:1.0.5' compile 'com.wang.avi:library:2.1.3' testCompile "junit:junit:$JUNIT_VERSION" compile project(":verticalrefreshlayout") compile project(":xrecyclerview") }
3. Select file -> new -> import module
3. Download some open source modules on github and introduce them
This article refers to the github xrecyclerview link https://github.com/curoiusby/XRecyclerView
4. Modify the configuration in the open source module
5. snyc now
6.test
to add on:
as shortcut key
Action Mac OSX Win/LinuxComment code (//) | Cmd + / | Ctrl + / |
Comment code (/**/) | Cmd + Option + / | Ctrl + Shift + / |
format code | Cmd + Option + L | Ctrl + Alt + L |
Clear invalid package references | Option + Control + O | Alt + Ctrl + O |
find | Cmd + F | Ctrl + F |
find+replace | Cmd + R | Ctrl + R |
Move code up and down | Option + Shift + Up/Down | Alt + Shift + Up/Down |
delete row | Cmd + Delete | Ctrl + Y |
Expand and narrow the selection | Option + Up/Down | Ctrl + W/Ctrl + Shift + W |
Quickly generate structures | Cmd + Option + T | Ctrl + Alt + T |
Quick override method | Cmd + O | Ctrl + O |
Quickly locate to the beginning/end of the line | Cmd + Left/Right | Ctrl + Left/Right |
Collapse expand code block | Cmd + Plus,Minus | Ctrl + Plus/Minus |
Collapse and expand all code blocks | Cmd + Shift + Plus,Minus | Ctrl + Shift + Plus,Minus |
file method structure | Cmd + F12 | Ctrl + F12 |
Find where to call | Ctrl + Option + H | Ctrl + Alt + H |
case conversion | Cmd + Shift + U | Ctrl + Shift + U |
Donate to developers
Driven by interest, I write 免费
something with joy and sweat. I hope you like my work and can support it at the same time. Of course, if you have money to support a money field (support Alipay and WeChat donations, join the it technology buckle group), but have no money to support a personal field, thank you.
Thank you for your sponsorship, I will do better!