-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,8 @@ | ||
# Windows image file caches | ||
Thumbs.db | ||
ehthumbs.db | ||
|
||
# Folder config file | ||
Desktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msm | ||
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
|
||
# ========================= | ||
# Operating System Files | ||
# ========================= | ||
|
||
# OSX | ||
# ========================= | ||
|
||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/workspace.xml | ||
/.idea/libraries | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear on external disk | ||
.Spotlight-V100 | ||
.Trashes | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
/build | ||
/captures |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion 23 | ||
buildToolsVersion "23.0.3" | ||
|
||
defaultConfig { | ||
applicationId "com.example.groovemax.splashimg" | ||
minSdkVersion 15 | ||
targetSdkVersion 23 | ||
versionCode 1 | ||
versionName "1.0" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
compile fileTree(dir: 'libs', include: ['*.jar']) | ||
testCompile 'junit:junit:4.12' | ||
compile 'com.android.support:appcompat-v7:23.2.1' | ||
compile 'com.android.support:design:23.2.1' | ||
compile 'com.github.dexafree:materiallist:3.2.1' | ||
compile 'com.baoyz.pullrefreshlayout:library:1.2.0' | ||
compile 'com.squareup.picasso:picasso:2.5.2' | ||
compile 'com.yalantis:contextmenu:1.0.6' | ||
compile 'jp.wasabeef:recyclerview-animators:1.3.0' | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Add project specific ProGuard rules here. | ||
# By default, the flags in this file are appended to flags specified | ||
# in C:\Users\60546\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt | ||
# You can edit the include path and order by changing the proguardFiles | ||
# directive in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# Add any project specific keep options here: | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.example.groovemax.splashimg; | ||
|
||
import android.app.Application; | ||
import android.test.ApplicationTestCase; | ||
|
||
/** | ||
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> | ||
*/ | ||
public class ApplicationTest extends ApplicationTestCase<Application> { | ||
public ApplicationTest() { | ||
super(Application.class); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.example.groovemax.splashimg"> | ||
|
||
<uses-permission android:name="android.permission.INTERNET"/> | ||
<uses-permission android:name="android.permission.SET_WALLPAPER"/> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> | ||
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/> | ||
|
||
<application | ||
android:name=".Application.MyApplication" | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme"> | ||
<activity | ||
android:name=".MainActivity" | ||
android:label="@string/app_name" | ||
android:theme="@style/AppTheme.NoActionBar"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name=".WebActivity"/> | ||
<activity android:name=".ImageDetailActivity"/> | ||
|
||
<service android:name=".DownLoadService" android:enabled="true"> | ||
<intent-filter> | ||
<action android:name="com.example.groovemax.service"/> | ||
</intent-filter> | ||
</service> | ||
|
||
</application> | ||
|
||
</manifest> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.example.groovemax.splashimg.Application; | ||
|
||
import android.app.Application; | ||
import android.content.SharedPreferences; | ||
|
||
import com.example.groovemax.splashimg.net.ThreadPoolManager; | ||
|
||
import java.io.UnsupportedEncodingException; | ||
import java.net.URLEncoder; | ||
|
||
/** | ||
* 注:自定义Application需要在manifest中注册 | ||
*/ | ||
public class MyApplication extends Application{ | ||
private static MyApplication myApplication = null; | ||
|
||
private static ThreadPoolManager threadPoolManager; | ||
|
||
private static String authorizationCode = null; | ||
public static final String TOKEN_URL = "https://unsplash.com/oauth/token/";//the url to get the final token | ||
public static final String TOKEN_URL_PIXABAY = "https://pixabay.com/api/"; | ||
|
||
@Override | ||
public void onCreate() { | ||
super.onCreate(); | ||
myApplication = this; | ||
threadPoolManager = new ThreadPoolManager(0, 10); | ||
threadPoolManager.start(); | ||
|
||
} | ||
|
||
|
||
public static ThreadPoolManager getThreadPoolManager(){ | ||
return threadPoolManager; | ||
} | ||
|
||
public static MyApplication getMyApplication(){ | ||
return myApplication; | ||
} | ||
|
||
public String getAuthorizationCode(){ | ||
return authorizationCode; | ||
} | ||
|
||
public void setAuthorizationCode(String input){ | ||
authorizationCode = input; | ||
} | ||
|
||
} |