Skip to content

Commit

Permalink
v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
CreeperSan committed Feb 24, 2019
1 parent 1315c70 commit 1c7b572
Show file tree
Hide file tree
Showing 28 changed files with 461 additions and 324 deletions.
Binary file modified .gradle/4.10.1/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/4.10.1/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/4.10.1/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified .gradle/4.10.1/javaCompile/classAnalysis.bin
Binary file not shown.
Binary file modified .gradle/4.10.1/javaCompile/jarAnalysis.bin
Binary file not shown.
Binary file modified .gradle/4.10.1/javaCompile/javaCompile.lock
Binary file not shown.
Binary file modified .gradle/4.10.1/javaCompile/taskHistory.bin
Binary file not shown.
Binary file modified .gradle/4.10.1/taskHistory/taskHistory.bin
Binary file not shown.
Binary file modified .gradle/4.10.1/taskHistory/taskHistory.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

446 changes: 128 additions & 318 deletions .idea/workspace.xml

Large diffs are not rendered by default.

Binary file modified app/.DS_Store
Binary file not shown.
4 changes: 3 additions & 1 deletion app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/.DS_Store" />
<excludeFolder url="file://$MODULE_DIR$/build/generated/not_namespaced_r_class_sources" />
<excludeFolder url="file://$MODULE_DIR$/build/generated/source/r" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotation_processor_list" />
Expand All @@ -128,6 +129,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check_manifest_result" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/compatible_screen_manifest" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/external_libs_dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-runtime-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-verifier" />
Expand All @@ -139,7 +141,6 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant_run_split_apk_resources" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javac" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint_jar" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifest-checker" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_manifests" />
Expand All @@ -158,6 +159,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/kotlin" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/reports" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 28 Platform" jdkType="Android SDK" />
Expand Down
Binary file added app/release/app-release.apk
Binary file not shown.
1 change: 1 addition & 0 deletions app/release/output.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"v0.1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ class PreviewActivity : BaseActivity(), Toolbar.OnMenuItemClickListener {
private fun downloadImage(){
val bingimage = mViewModel.bingImage.value!!
val resolution = mViewModel.getDownloadResolution()
val url = bingimage.getImageUrl(resolution)
toast(R.string.previewToastDownload.toResString())

application.downloadImage(bingimage, resolution)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.creepersan.bingimage.config

import android.annotation.SuppressLint
import android.content.Context
import com.creepersan.bingimage.database.bean.BingImage
import com.creepersan.bingimage.database.bean.BingImage.Resolution
Expand Down Expand Up @@ -43,12 +44,18 @@ class ConfigManager(context: Context){
fun setPreviewResolution(resolution:Resolution){
mPreviewConfig.edit().putInt(KEY_PREVIEW_RESOLUTION, resolution.value).apply()
}
fun setPreviewResolutionSync(resolution:Resolution){
mPreviewConfig.edit().putInt(KEY_PREVIEW_RESOLUTION, resolution.value).commit()
}
fun getDownloadResolution():Resolution{
return mPreviewConfig.getInt(KEY_DOWNLOAD_RESOLUTION, Resolution.L_1920_1080.value).toResolution()
}
fun setDownloadResolution(resolution:Resolution){
mPreviewConfig.edit().putInt(KEY_DOWNLOAD_RESOLUTION, resolution.value).apply()
}
fun setDownloadResolutionSync(resolution:Resolution){
mPreviewConfig.edit().putInt(KEY_DOWNLOAD_RESOLUTION, resolution.value).commit()
}
fun getListResolution():Resolution{
return mPreviewConfig.getInt(KEY_LIST_RESOLUTION, Resolution.L_400_240.value).toResolution()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ class PreviewModel : ViewModel() {
return previewResolution.value!!
}
fun setPreviewResolution(resolution: Resolution){
config.setPreviewResolutionSync(resolution)
previewResolution.value = resolution
config.setPreviewResolution(resolution)
// config.setPreviewResolution(resolution)
}
fun observerPreviewResolution(owner:LifecycleOwner, observer: Observer<Resolution>){
previewResolution.observe(owner, observer)
Expand All @@ -44,12 +45,14 @@ class PreviewModel : ViewModel() {
return downloadResolution.value!!
}
fun setDownloadResolution(resolution: Resolution){
config.setDownloadResolutionSync(resolution)
downloadResolution.value = resolution
config.setDownloadResolution(resolution)
// config.setDownloadResolution(resolution)
}

fun getPreviewImageUrl():String{
return bingImage.value?.getImageUrl(previewResolution.value!!) ?: ""
// return bingImage.value?.getImageUrl(previewResolution.value!!) ?: ""
return bingImage.value?.getImageUrl(config.getPreviewResolution()) ?: ""
}

fun isDownloadDialogDefaultNotDisplay():Boolean{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8'?>
<android.arch.lifecycle>
<compiler versions="1.0.0-alpha1,1.0.0-alpha2,1.0.0-alpha3,1.0.0-alpha4,1.0.0-alpha5,1.0.0-alpha6,1.0.0-alpha7,1.0.0-alpha8,1.0.0-alpha9,1.0.0-alpha9-1,1.0.0-beta1,1.0.0-beta2,1.0.0-rc1,1.0.0,1.1.0,1.1.1"/>
<runtime versions="1.0.0-alpha1,1.0.0-alpha2,1.0.0-alpha3,1.0.0-alpha4,1.0.0-alpha5,1.0.0-alpha6,1.0.0-alpha7,1.0.0-alpha8,1.0.0-alpha9,1.0.0,1.0.3,1.1.0,1.1.1"/>
<extensions versions="1.0.0-alpha1,1.0.0-alpha2,1.0.0-alpha3,1.0.0-alpha4,1.0.0-alpha5,1.0.0-alpha6,1.0.0-alpha7,1.0.0-alpha8,1.0.0-alpha9,1.0.0-alpha9-1,1.0.0-beta1,1.0.0-beta2,1.0.0-rc1,1.0.0,1.1.0,1.1.1"/>
<reactivestreams versions="1.0.0-alpha1,1.0.0-alpha2,1.0.0-alpha3,1.0.0-alpha4,1.0.0-alpha5,1.0.0-alpha6,1.0.0-alpha7,1.0.0-alpha8,1.0.0-alpha9,1.0.0-alpha9-1,1.0.0-beta1,1.0.0-beta2,1.0.0-rc1,1.0.0,1.1.0,1.1.1"/>
<common versions="1.0.0-alpha1,1.0.0-alpha2,1.0.0-alpha3,1.0.0-alpha4,1.0.0-alpha5,1.0.0-alpha6,1.0.0-alpha7,1.0.0-alpha8,1.0.0-alpha9,1.0.0,1.0.1,1.0.2,1.0.3,1.1.0,1.1.1"/>
<common-java8 versions="1.0.0-beta1,1.0.0-beta2,1.0.0-rc1,1.0.0,1.1.0,1.1.1"/>
<viewmodel versions="1.1.0,1.1.1"/>
<livedata-core versions="1.1.0,1.1.1"/>
<livedata versions="1.1.0,1.1.1"/>
</android.arch.lifecycle>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<android.arch.persistence.room>
<compiler versions="1.0.0-alpha1,1.0.0-alpha2,1.0.0-alpha3,1.0.0-alpha4,1.0.0-alpha5,1.0.0-alpha6,1.0.0-alpha7,1.0.0-alpha8,1.0.0-alpha9,1.0.0-alpha9-1,1.0.0-beta1,1.0.0-beta2,1.0.0-rc1,1.0.0,1.1.0-alpha1,1.1.0-alpha2,1.1.0-alpha3,1.1.0-beta1,1.1.0-beta2,1.1.0-beta3,1.1.0-rc1,1.1.0,1.1.1-rc1,1.1.1"/>
<support-db-impl versions="1.0.0-alpha1,1.0.0-alpha2,1.0.0-alpha3,1.0.0-alpha4,1.0.0-alpha5,1.0.0-alpha6,1.0.0-alpha7,1.0.0-alpha8,1.0.0-alpha9"/>
<runtime versions="1.0.0-alpha1,1.0.0-alpha2,1.0.0-alpha3,1.0.0-alpha4,1.0.0-alpha5,1.0.0-alpha6,1.0.0-alpha7,1.0.0-alpha8,1.0.0-alpha9,1.0.0-alpha9-1,1.0.0-beta1,1.0.0-beta2,1.0.0-rc1,1.0.0,1.1.0-alpha1,1.1.0-alpha2,1.1.0-alpha3,1.1.0-beta1,1.1.0-beta2,1.1.0-beta3,1.1.0-rc1,1.1.0,1.1.1-rc1,1.1.1"/>
<support-db versions="1.0.0-alpha1,1.0.0-alpha2,1.0.0-alpha3,1.0.0-alpha4,1.0.0-alpha5,1.0.0-alpha6,1.0.0-alpha7,1.0.0-alpha8,1.0.0-alpha9"/>
<migration versions="1.0.0-alpha1,1.0.0-alpha2,1.0.0-alpha3,1.0.0-alpha4,1.0.0-alpha5,1.0.0-alpha6,1.0.0-alpha7,1.0.0-alpha8,1.0.0-alpha9,1.0.0-alpha9-1,1.0.0-beta1,1.0.0-beta2,1.0.0-rc1,1.0.0,1.1.0-alpha1,1.1.0-alpha2,1.1.0-alpha3,1.1.0-beta1,1.1.0-beta2,1.1.0-beta3,1.1.0-rc1,1.1.0,1.1.1-rc1,1.1.1"/>
<rxjava2 versions="1.0.0-alpha1,1.0.0-alpha2,1.0.0-alpha3,1.0.0-alpha4,1.0.0-alpha5,1.0.0-alpha6,1.0.0-alpha7,1.0.0-alpha8,1.0.0-alpha9,1.0.0-alpha9-1,1.0.0-beta1,1.0.0-beta2,1.0.0-rc1,1.0.0,1.1.0-alpha1,1.1.0-alpha2,1.1.0-alpha3,1.1.0-beta1,1.1.0-beta2,1.1.0-beta3,1.1.0-rc1,1.1.0,1.1.1-rc1,1.1.1"/>
<testing versions="1.0.0-alpha1,1.0.0-alpha2,1.0.0-alpha3,1.0.0-alpha4,1.0.0-alpha5,1.0.0-alpha6,1.0.0-alpha7,1.0.0-alpha8,1.0.0-alpha9,1.0.0-alpha9-1,1.0.0-beta1,1.0.0-beta2,1.0.0-rc1,1.0.0,1.1.0-alpha1,1.1.0-alpha2,1.1.0-alpha3,1.1.0-beta1,1.1.0-beta2,1.1.0-beta3,1.1.0-rc1,1.1.0,1.1.1-rc1,1.1.1"/>
<common versions="1.0.0-alpha1,1.0.0-alpha2,1.0.0-alpha3,1.0.0-alpha4,1.0.0-alpha5,1.0.0-alpha6,1.0.0-alpha7,1.0.0-alpha8,1.0.0-alpha9,1.0.0-alpha9-1,1.0.0-beta1,1.0.0-beta2,1.0.0-rc1,1.0.0,1.1.0-alpha1,1.1.0-alpha2,1.1.0-alpha3,1.1.0-beta1,1.1.0-beta2,1.1.0-beta3,1.1.0-rc1,1.1.0,1.1.1-rc1,1.1.1"/>
<db versions="1.0.0-alpha9-1"/>
<db-impl versions="1.0.0-alpha9-1"/>
<guava versions="1.1.0-alpha2,1.1.0-alpha3,1.1.0-beta1,1.1.0-beta2,1.1.0-beta3,1.1.0-rc1,1.1.0,1.1.1-rc1,1.1.1"/>
</android.arch.persistence.room>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<com.android.support.constraint>
<constraint-layout-solver versions="1.0.2,1.1.0-beta1,1.1.0-beta2,1.1.0-beta3,1.1.0-beta4,1.1.0-beta5,1.1.0-beta6,1.1.0,1.1.1,1.1.2,1.1.3,2.0.0-alpha1,2.0.0-alpha2,2.0.0-alpha3"/>
<constraint-layout versions="1.0.2,1.1.0-beta1,1.1.0-beta2,1.1.0-beta3,1.1.0-beta4,1.1.0-beta5,1.1.0-beta6,1.1.0,1.1.1,1.1.2,1.1.3,2.0.0-alpha1,2.0.0-alpha2,2.0.0-alpha3"/>
</com.android.support.constraint>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<com.android.support.test.espresso>
<espresso-core versions="2.0,2.1,2.2,2.2.1,2.2.2,2.3-alpha,3.0.0,3.0.1-alpha-1,3.0.1,3.0.2-alpha1,3.0.2-beta1,3.0.2"/>
<espresso-web versions="2.2,2.2.1,2.2.2,2.3-alpha,3.0.0,3.0.1-alpha-1,3.0.1,3.0.2-alpha1,3.0.2-beta1,3.0.2"/>
<espresso-intents versions="2.1,2.2,2.2.1,2.2.2,2.3-alpha,3.0.0,3.0.1-alpha-1,3.0.1,3.0.2-alpha1,3.0.2-beta1,3.0.2"/>
<espresso-contrib versions="2.0,2.1,2.2,2.2.1,2.2.2,2.3-alpha,3.0.0,3.0.1-alpha-1,3.0.1,3.0.2-alpha1,3.0.2-beta1,3.0.2"/>
<espresso-idling-resource versions="2.0,2.1,2.2,2.2.1,2.2.2,2.3-alpha,3.0.0,3.0.1-alpha-1,3.0.1,3.0.2-alpha1,3.0.2-beta1,3.0.2"/>
<espresso-accessibility versions="3.0.0,3.0.1-alpha-1,3.0.1,3.0.2-alpha1,3.0.2-beta1,3.0.2"/>
<espresso-remote versions="3.0.2-beta1,3.0.2"/>
</com.android.support.test.espresso>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<com.android.support.test>
<runner versions="0.2,0.3,0.4,0.4.1,0.5,0.6-alpha,1.0.0,1.0.1-alpha-1,1.0.1,1.0.2-alpha1,1.0.2-beta1,1.0.2"/>
<rules versions="0.2,0.3,0.4,0.4.1,0.5,0.6-alpha,1.0.0,1.0.1-alpha-1,1.0.1,1.0.2-alpha1,1.0.2-beta1,1.0.2"/>
<exposed-instrumentation-api-publish versions="0.2,0.3,0.4,0.4.1,0.5,0.6-alpha"/>
<testing-support-lib versions="0.1"/>
<orchestrator versions="1.0.0,1.0.1-alpha-1,1.0.1,1.0.2-alpha1,1.0.2-beta1,1.0.2"/>
<monitor versions="1.0.2-alpha1,1.0.2-beta1,1.0.2"/>
</com.android.support.test>
122 changes: 122 additions & 0 deletions build/intermediates/lint-cache/maven.google/master-index.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<com.android.support.constraint/>
<com.android.databinding/>
<com.android.support/>
<com.android.support.test/>
<com.android.support.test.janktesthelper/>
<com.android.support.test.uiautomator/>
<com.android.support.test.espresso/>
<android.arch.persistence.room/>
<android.arch.lifecycle/>
<android.arch.core/>
<com.google.android.instantapps/>
<com.google.android.instantapps.thirdpartycompat/>
<com.android.java.tools.build/>
<com.android.tools/>
<com.android.tools.layoutlib/>
<com.android.tools.ddms/>
<com.android.tools.external.com-intellij/>
<com.android.tools.build/>
<com.android.tools.analytics-library/>
<com.android.tools.internal.build.test/>
<com.android.tools.lint/>
<com.android.tools.external.org-jetbrains/>
<com.android.support.test.espresso.idling/>
<com.android.support.test.services/>
<com.google.firebase/>
<com.google.android.gms/>
<com.google.gms/>
<android.arch.paging/>
<com.crashlytics.sdk.android/>
<io.fabric.sdk.android/>
<android.arch.persistence/>
<com.google.android.wearable/>
<com.google.android.support/>
<com.android.installreferrer/>
<com.google.ar/>
<androidx.core/>
<com.google.android.things/>
<com.android.tools.build.jetifier/>
<tools.base.build-system.debug/>
<androidx.databinding/>
<androidx.constraintlayout/>
<org.chromium.net/>
<com.google.android.play/>
<androidx.multidex/>
<com.google.android.material/>
<androidx.test.services/>
<androidx.test.janktesthelper/>
<androidx.test/>
<androidx.test.espresso/>
<androidx.test.espresso.idling/>
<androidx.test.uiautomator/>
<androidx.room/>
<androidx.paging/>
<androidx.lifecycle/>
<androidx.sqlite/>
<androidx.arch.core/>
<android.arch.work/>
<android.arch.navigation/>
<androidx.mediarouter/>
<androidx.percentlayout/>
<androidx.emoji/>
<androidx.cardview/>
<androidx.preference/>
<androidx.wear/>
<androidx.legacy/>
<androidx.documentfile/>
<androidx.car/>
<androidx.swiperefreshlayout/>
<androidx.leanback/>
<androidx.appcompat/>
<androidx.customview/>
<androidx.gridlayout/>
<androidx.vectordrawable/>
<androidx.heifwriter/>
<androidx.transition/>
<androidx.print/>
<androidx.viewpager/>
<androidx.annotation/>
<androidx.exifinterface/>
<androidx.dynamicanimation/>
<androidx.browser/>
<androidx.localbroadcastmanager/>
<androidx.asynclayoutinflater/>
<androidx.contentpager/>
<androidx.slidingpanelayout/>
<androidx.cursoradapter/>
<androidx.media/>
<androidx.loader/>
<androidx.interpolator/>
<androidx.coordinatorlayout/>
<androidx.fragment/>
<androidx.tvprovider/>
<androidx.slice/>
<androidx.collection/>
<androidx.recommendation/>
<androidx.drawerlayout/>
<androidx.recyclerview/>
<androidx.webkit/>
<androidx.palette/>
<com.google.ar.sceneform/>
<com.google.ar.sceneform.ux/>
<androidx.test.ext/>
<com.google.android.ads.consent/>
<androidx.versionedparcelable/>
<androidx.media2/>
<com.google.ads.afsn/>
<com.google.android.ads/>
<androidx.biometric/>
<androidx.concurrent/>
<androidx.activity/>
<com.android.tools.apkparser/>
<com.android.tools.pixelprobe/>
<androidx.textclassifier/>
<androidx.remotecallback/>
<com.android.tools.chunkio/>
<com.android.tools.fakeadbserver/>
<androidx.savedstate/>
<com.google.android.libraries.places/>
<androidx.viewpager2/>
</metadata>
Loading

0 comments on commit 1c7b572

Please sign in to comment.