├── app
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── bools.xml
│ │ │ │ ├── integers.xml
│ │ │ │ ├── colors.xml
│ │ │ │ ├── styles.xml
│ │ │ │ ├── defaults.xml
│ │ │ │ ├── keys.xml
│ │ │ │ ├── arrays.xml
│ │ │ │ └── strings.xml
│ │ │ ├── values-night
│ │ │ │ └── colors.xml
│ │ │ ├── drawable
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ ├── ic_clear.xml
│ │ │ │ ├── ic_open_in_new.xml
│ │ │ │ ├── ic_reset.xml
│ │ │ │ ├── ic_install.xml
│ │ │ │ ├── ic_logo_colour.xml
│ │ │ │ ├── ic_logo_monochrome.xml
│ │ │ │ ├── ic_settings_cog.xml
│ │ │ │ └── store_icon.xml
│ │ │ ├── xml
│ │ │ │ ├── wallpaper.xml
│ │ │ │ └── prefs.xml
│ │ │ └── layout
│ │ │ │ └── main.xml
│ │ ├── ic_launcher-playstore.png
│ │ ├── java
│ │ │ └── net
│ │ │ │ └── viggers
│ │ │ │ └── zade
│ │ │ │ └── wallpaper
│ │ │ │ ├── Shape.kt
│ │ │ │ ├── WallpaperApplication.kt
│ │ │ │ ├── PreferencesActivity.kt
│ │ │ │ ├── MainActivity.kt
│ │ │ │ └── WallpaperService.kt
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── net
│ │ │ └── viggers
│ │ │ └── zade
│ │ │ └── wallpaper
│ │ │ └── ExampleUnitTest.kt
│ └── androidTest
│ │ └── java
│ │ └── net
│ │ └── viggers
│ │ └── zade
│ │ └── wallpaper
│ │ └── ExampleInstrumentedTest.kt
├── release
│ └── output-metadata.json
├── proguard-rules.pro
└── build.gradle
├── metadata
└── en-US
│ ├── title.txt
│ ├── changelogs
│ ├── 11.txt
│ ├── 12.txt
│ ├── 16.txt
│ ├── 19.txt
│ ├── 22.txt
│ ├── 13.txt
│ ├── 18.txt
│ ├── 14.txt
│ ├── 20.txt
│ ├── 21.txt
│ ├── 17.txt
│ ├── 24.txt
│ ├── 23.txt
│ └── 15.txt
│ ├── short_description.txt
│ ├── images
│ ├── icon.png
│ └── phoneScreenshots
│ │ ├── 0.jpg
│ │ ├── 1.jpg
│ │ ├── 2.jpg
│ │ ├── 3.jpg
│ │ └── 4.jpg
│ └── full_description.txt
├── Zades-wallpaper-logo-colour.png
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── Zades-wallpaper-logo-colour.svg
├── Zades-wallpaper-logo-monochrome.svg
├── settings.gradle
├── .gitignore
├── README.md
├── gradle.properties
├── gradlew.bat
├── gradlew
└── LICENSE
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/metadata/en-US/title.txt:
--------------------------------------------------------------------------------
1 | Zade's wallpaper
--------------------------------------------------------------------------------
/metadata/en-US/changelogs/11.txt:
--------------------------------------------------------------------------------
1 | - Publish to F-Droid
--------------------------------------------------------------------------------
/metadata/en-US/short_description.txt:
--------------------------------------------------------------------------------
1 | Draw on your home screen with coloured shapes
--------------------------------------------------------------------------------
/app/src/main/res/values/bools.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/values/integers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/metadata/en-US/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zadeviggers/wallpaper/HEAD/metadata/en-US/images/icon.png
--------------------------------------------------------------------------------
/Zades-wallpaper-logo-colour.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zadeviggers/wallpaper/HEAD/Zades-wallpaper-logo-colour.png
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zadeviggers/wallpaper/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zadeviggers/wallpaper/HEAD/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/metadata/en-US/images/phoneScreenshots/0.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zadeviggers/wallpaper/HEAD/metadata/en-US/images/phoneScreenshots/0.jpg
--------------------------------------------------------------------------------
/metadata/en-US/images/phoneScreenshots/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zadeviggers/wallpaper/HEAD/metadata/en-US/images/phoneScreenshots/1.jpg
--------------------------------------------------------------------------------
/metadata/en-US/images/phoneScreenshots/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zadeviggers/wallpaper/HEAD/metadata/en-US/images/phoneScreenshots/2.jpg
--------------------------------------------------------------------------------
/metadata/en-US/images/phoneScreenshots/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zadeviggers/wallpaper/HEAD/metadata/en-US/images/phoneScreenshots/3.jpg
--------------------------------------------------------------------------------
/metadata/en-US/images/phoneScreenshots/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zadeviggers/wallpaper/HEAD/metadata/en-US/images/phoneScreenshots/4.jpg
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #ffffff
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values-night/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #000000
4 |
--------------------------------------------------------------------------------
/metadata/en-US/changelogs/12.txt:
--------------------------------------------------------------------------------
1 | - Added option to choose shape size
2 | - Added option to randomise shape size
3 | - Added button to remove all shapes from the canvas
4 |
--------------------------------------------------------------------------------
/metadata/en-US/changelogs/16.txt:
--------------------------------------------------------------------------------
1 | - Fix some bugs
2 | - Switch to using a multi-select list for choosing shape types
3 | - Finish removing smooth drawing
4 | - Change defaults to be nicer
--------------------------------------------------------------------------------
/metadata/en-US/changelogs/19.txt:
--------------------------------------------------------------------------------
1 | Version 15.4 (#19)
2 |
3 | - Some string changes
4 | - New screenshots
5 |
6 | **Full Changelog**: https://github.com/zadeviggers/wallpaper/compare/Version15.3...Version15.4
--------------------------------------------------------------------------------
/metadata/en-US/changelogs/22.txt:
--------------------------------------------------------------------------------
1 | Version 15.7 (#22)
2 |
3 | - Fix critical bug causing installation of the wallpaper to fail
4 |
5 | **Full Changelog**: https://github.com/zadeviggers/wallpaper/compare/Version15.6...Version15.7
--------------------------------------------------------------------------------
/metadata/en-US/changelogs/13.txt:
--------------------------------------------------------------------------------
1 | - Fix issue with shape size preference accepting invalid values
2 |
3 | Note: Your shape size preference will be reset by this update. This is done in order to remove any possibly invalid values.
4 |
--------------------------------------------------------------------------------
/metadata/en-US/changelogs/18.txt:
--------------------------------------------------------------------------------
1 | Version 15.3 (#18)
2 |
3 | - Fixed a bug with the wallpaper not being re-drawn when preferences are changed
4 |
5 | **Full Changelog**: https://github.com/zadeviggers/wallpaper/compare/Version15.2...Version15.3
--------------------------------------------------------------------------------
/metadata/en-US/changelogs/14.txt:
--------------------------------------------------------------------------------
1 | - Now targets Android 13
2 | - Minimum SDK version is now 26
3 | - Supports dynamic theme colours within the app
4 | - Supports dynamic icon theming
5 | - New logo!
6 | - Improves some internal code to be more maintainable
--------------------------------------------------------------------------------
/metadata/en-US/changelogs/20.txt:
--------------------------------------------------------------------------------
1 | Version 15.5 (#20)
2 |
3 | - Updated lots of things internally
4 | - Vastly reduced APK size
5 | - Added night mode icon variant
6 |
7 | **Full Changelog**: https://github.com/zadeviggers/wallpaper/compare/Version15.4...Version15.5
--------------------------------------------------------------------------------
/metadata/en-US/changelogs/21.txt:
--------------------------------------------------------------------------------
1 | Version 15.6 (#21)
2 |
3 | - Enabled resource shrinking (should improve download size)
4 | - Fix wide button
5 | - Improve the design of the main screen
6 |
7 | **Full Changelog**: https://github.com/zadeviggers/wallpaper/compare/Version15.5...Version15.6
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Apr 20 15:46:27 NZST 2022
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/metadata/en-US/changelogs/17.txt:
--------------------------------------------------------------------------------
1 | Version 15.2 (#17)
2 |
3 | - Oversimplified the icon because android is bad at dealing with SVGs and I can't be bothered anymore
4 | - Minor bug fixes
5 | - Changes to defaults
6 |
7 | **Full Changelog**: https://github.com/zadeviggers/wallpaper/compare/Version15.1...Version15.2
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/wallpaper.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Zades-wallpaper-logo-colour.svg:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/metadata/en-US/changelogs/24.txt:
--------------------------------------------------------------------------------
1 | Version 15.9 (#24)
2 |
3 | - Added star shape
4 | - Added link to GitHub page
5 | The link to GitHub releases now goes to the store you installed the app from, falling back to GitHub releases if none was found.
6 |
7 | **Full Changelog**: https://github.com/zadeviggers/wallpaper/compare/Version15.8...Version15.9
--------------------------------------------------------------------------------
/Zades-wallpaper-logo-monochrome.svg:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/app/src/main/java/net/viggers/zade/wallpaper/Shape.kt:
--------------------------------------------------------------------------------
1 | package net.viggers.zade.wallpaper
2 |
3 | class Shape(
4 | val num: Int,
5 | val x: Float,
6 | val y: Float,
7 | val angle: Float,
8 | val size: Float,
9 | val colour: Int,
10 | val type: String,
11 | val spawnedByTouch: Boolean,
12 | )
--------------------------------------------------------------------------------
/app/src/main/java/net/viggers/zade/wallpaper/WallpaperApplication.kt:
--------------------------------------------------------------------------------
1 | package net.viggers.zade.wallpaper
2 |
3 | import android.app.Application
4 | import com.google.android.material.color.DynamicColors
5 |
6 | class WallpaperApplication: Application() {
7 | override fun onCreate() {
8 | super.onCreate()
9 | DynamicColors.applyToActivitiesIfAvailable(this)
10 | }
11 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_clear.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/metadata/en-US/changelogs/23.txt:
--------------------------------------------------------------------------------
1 | Version 15.8 (#23)
2 |
3 | - Fix issues affecting some users with crashes and install issues (this should close #3. Thanks for the report, @shuvashish76)
4 | - Add multi-touch support - you can now draw with multiple fingers simultaneously. (thanks for the suggestion, @allmightyasian!)
5 |
6 | **Full Changelog**: https://github.com/zadeviggers/wallpaper/compare/Version15.7...Version15.8
--------------------------------------------------------------------------------
/metadata/en-US/full_description.txt:
--------------------------------------------------------------------------------
1 | Zade's wallpaper lets you draw with shapes on your background, and adds random shapes when you're not drawing.
2 |
3 | Every feature can be turned on or off, you can change the background colour and shape colour, select shape types, and much more.
4 |
5 | Features:
6 | - Very customisable
7 | - Lots of different shape types
8 | - Supports Material 3 icon theming
9 | - Amoled black option
10 | - Multi-touch support
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | gradlePluginPortal()
4 | google()
5 | mavenCentral()
6 | }
7 | }
8 | dependencyResolutionManagement {
9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
10 | repositories {
11 | google()
12 | mavenCentral()
13 | maven { url "https://jitpack.io" }
14 | }
15 | }
16 | rootProject.name = "Wallpaper"
17 | include ':app'
18 |
--------------------------------------------------------------------------------
/app/src/test/java/net/viggers/zade/wallpaper/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package net.viggers.zade.wallpaper
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/app/release/output-metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "artifactType": {
4 | "type": "APK",
5 | "kind": "Directory"
6 | },
7 | "applicationId": "net.viggers.zade.wallpaper",
8 | "variantName": "release",
9 | "elements": [
10 | {
11 | "type": "SINGLE",
12 | "filters": [],
13 | "attributes": [],
14 | "versionCode": 24,
15 | "versionName": "15.9",
16 | "outputFile": "app-release.apk"
17 | }
18 | ],
19 | "elementType": "File"
20 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_open_in_new.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_reset.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_install.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Gradle files
2 | .gradle/
3 | build/
4 |
5 | # Local configuration file (sdk path, etc)
6 | local.properties
7 |
8 | # Log/OS Files
9 | *.log
10 |
11 | # Android Studio generated files and folders
12 | captures/
13 | .externalNativeBuild/
14 | .cxx/
15 | *.apk
16 | output.json
17 |
18 | # IntelliJ
19 | *.iml
20 | .idea/
21 | misc.xml
22 | deploymentTargetDropDown.xml
23 | render.experimental.xml
24 |
25 | # Keystore files
26 | *.jks
27 | *.keystore
28 |
29 | # Google Services (e.g. APIs or Firebase)
30 | google-services.json
31 |
32 | # Android Profiling
33 | *.hprof
34 |
35 | # MacOS
36 | .DS_Store
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_logo_colour.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
15 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_logo_monochrome.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
15 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/app/src/androidTest/java/net/viggers/zade/wallpaper/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package net.viggers.zade.wallpaper
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("net.viggers.zade.wallpaper", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/metadata/en-US/changelogs/15.txt:
--------------------------------------------------------------------------------
1 | ## Changes
2 | - New shapes!
3 | - Pentagon
4 | - Hexagon
5 | - New option: Random rotation
6 | - Material You can now generate a colour pallet from the wallpaper
7 | - You can now reset your preferences to the default
8 | - Improved preferences page layout
9 | - Various UI improvements
10 | - Some internal cleanup & optimizations that might decrease the drain on battery life
11 | - Minimum SDK version is now `27`
12 |
13 | ## Instructions
14 | Download the APK file below onto your Android device, and install it by opening the file and pressing _Install_. You may need to allow your browser or file manager app to install APKs in your settings. To apply the wallpaper, open the app and press the _Install Wallpaper_ button.
15 |
16 | **Full Changelog**: https://github.com/zadeviggers/wallpaper/compare/Version14...Version15
--------------------------------------------------------------------------------
/app/src/main/res/values/defaults.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | true
4 | true
5 | true
6 | false
7 | true
8 | true
9 | true
10 | 40
11 | 20
12 | 500
13 | #000000
14 | #cc0000
15 |
--------------------------------------------------------------------------------
/app/src/main/res/values/keys.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | shapeSize2
4 | shapeTypes
5 | shapeColour
6 | backgroundColour
7 | numberOfShapes
8 | randomShapeSpawnDelay
9 | enableRandomShapeSpawning
10 | randomShapeSizesEnabled
11 | randomShapeColoursEnabled
12 | randomShapeRotationEnabled
13 | enableTouchInteraction
14 | pauseRandomShapesWhenDragging
15 | smoothDrawingEnabled
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_settings_cog.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Zade's Wallpaper
2 |
3 | Draw art on your home screen with coloured shapes.
4 |
5 | ## Install
6 |
7 | [
](https://f-droid.org/packages/net.viggers.zade.wallpaper/)
10 |
11 | Or download the latest APK from the [Releases Section](https://github.com/zadeviggers/wallpaper/releases/latest).
12 |
13 | ## About
14 |
15 | My custom android live wallpaper.
16 |
17 | > Zade's wallpaper lets you draw with shapes on your background and spawns random shapes when you're not drawing.
18 | > It's very customisable - every feature can be turned on or off, you can change the background colour, shape colour, shape type, and many other things.
19 |
20 | ### Features
21 | - Very customisable
22 | - Supports Material 3 icon theming
23 | - Amoled black option
24 | - Multi-touch support
25 |
26 | Please feel free to open an issue suggesting a new feature!
27 |
28 | ## Credit
29 |
30 | I followed [this tutorial](https://www.vogella.com/tutorials/AndroidLiveWallpaper/article.html) to get the basics going, then took it on my own from there.
31 |
32 | ## TODO
33 | - Filled shapes
34 | - Background image
35 | - Better colour picker
36 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/store_icon.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | id 'org.jetbrains.kotlin.android'
4 | }
5 |
6 | android {
7 | compileSdk 33
8 |
9 | defaultConfig {
10 | applicationId "net.viggers.zade.wallpaper"
11 | minSdk 27
12 | targetSdk 33
13 | versionCode 24
14 | versionName "15.9"
15 |
16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17 | }
18 |
19 | buildTypes {
20 | release {
21 | minifyEnabled true
22 | shrinkResources true
23 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
24 | }
25 | }
26 | compileOptions {
27 | sourceCompatibility JavaVersion.VERSION_1_8
28 | targetCompatibility JavaVersion.VERSION_1_8
29 | }
30 | kotlinOptions {
31 | jvmTarget = '1.8'
32 | }
33 | namespace 'net.viggers.zade.wallpaper'
34 | }
35 |
36 | dependencies {
37 | implementation 'androidx.core:core-ktx:1.10.0'
38 | implementation 'androidx.appcompat:appcompat:1.6.1'
39 | implementation 'com.google.android.material:material:1.8.0'
40 | implementation 'androidx.preference:preference-ktx:1.2.0'
41 | implementation 'com.github.kizitonwose.colorpreference:support:1.1.0'
42 | testImplementation 'junit:junit:4.13.2'
43 | androidTestImplementation 'androidx.test.ext:junit:1.1.5'
44 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
45 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app"s APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Kotlin code style for this project: "official" or "obsolete":
19 | kotlin.code.style=official
20 | # Enables namespacing of each library's R class so that its R class includes only the
21 | # resources declared in the library itself and none from the library's dependencies,
22 | # thereby reducing the size of the R class for that library
23 | android.nonTransitiveRClass=true
24 | android.defaults.buildfeatures.buildconfig=true
25 | android.nonFinalResIds=true
26 | org.gradle.unsafe.configuration-cache=true
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
14 |
20 |
21 |
22 |
23 |
26 |
27 |
28 |
29 |
30 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - @string/shape_option_label_circle
5 | - @string/shape_option_label_square
6 | - @string/shape_option_label_triangle
7 | - @string/shape_option_label_pentagon
8 | - @string/shape_option_label_hexagon
9 | - @string/shape_option_label_star
10 |
11 |
12 |
13 | - circle
14 | - square
15 | - triangle
16 | - pentagon
17 | - hexagon
18 | - star
19 |
20 |
21 |
22 | - #33b5e5
23 | - #aa66cc
24 | - #99cc00
25 | - #ffbb33
26 | - #ff4444
27 | - #0099cc
28 | - #9933cc
29 | - #669900
30 | - #ff8800
31 | - #cc0000
32 |
33 |
34 |
35 | - #33b5e5
36 | - #aa66cc
37 | - #99cc00
38 | - #ffbb33
39 | - #ff4444
40 | - #0099cc
41 | - #9933cc
42 | - #669900
43 | - #ff8800
44 | - #cc0000
45 | - #ffffff
46 | - #888888
47 | - #000000
48 |
49 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
16 |
17 |
24 |
25 |
26 |
27 |
28 |
29 |
32 |
33 |
40 |
41 |
42 |
49 |
50 |
53 |
54 |
61 |
68 |
69 |
72 |
73 |
78 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/app/src/main/java/net/viggers/zade/wallpaper/PreferencesActivity.kt:
--------------------------------------------------------------------------------
1 | package net.viggers.zade.wallpaper
2 |
3 | import android.content.SharedPreferences
4 | import android.os.Bundle
5 | import android.os.Debug
6 | import android.util.Log
7 | import android.widget.Toast
8 | import androidx.appcompat.app.AppCompatActivity
9 | import androidx.preference.EditTextPreference
10 | import androidx.preference.MultiSelectListPreference
11 | import androidx.preference.Preference
12 | import androidx.preference.PreferenceFragmentCompat
13 |
14 |
15 | class PreferencesActivity : AppCompatActivity() {
16 | override fun onCreate(savedInstance: Bundle?) {
17 | super.onCreate(savedInstance)
18 |
19 | if (savedInstance == null) {
20 | supportFragmentManager.beginTransaction()
21 | .replace(android.R.id.content, PreferencesFragment()).commit()
22 |
23 | supportActionBar?.setDisplayShowHomeEnabled(true)
24 | supportActionBar?.setDisplayHomeAsUpEnabled(true)
25 | }
26 | }
27 |
28 | override fun onSupportNavigateUp(): Boolean {
29 | finish()
30 | return true
31 | }
32 |
33 | class PreferencesFragment : PreferenceFragmentCompat(),
34 | SharedPreferences.OnSharedPreferenceChangeListener {
35 | override fun onCreate(savedInstanceState: Bundle?) {
36 | super.onCreate(savedInstanceState)
37 | preferenceScreen.sharedPreferences?.registerOnSharedPreferenceChangeListener(this)
38 | }
39 |
40 | override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
41 | setPreferencesFromResource(R.xml.prefs, rootKey)
42 |
43 | val maxShapeNumberPreference =
44 | preferenceScreen.findPreference(getString(R.string.numberOfShapes))
45 | maxShapeNumberPreference?.onPreferenceChangeListener = numberCheckListener
46 |
47 | val shapeSpawnDelayPreference =
48 | preferenceScreen.findPreference(getString(R.string.randomShapeSpawnDelay))
49 | shapeSpawnDelayPreference?.onPreferenceChangeListener = numberCheckListener
50 |
51 | val shapeSizePreference =
52 | preferenceScreen.findPreference(getString(R.string.shapeSize))
53 | shapeSizePreference?.onPreferenceChangeListener = numberCheckListener
54 |
55 | val shapeTypesPreference =
56 | preferenceScreen.findPreference(getString(R.string.shapeType))
57 | shapeTypesPreference?.onPreferenceChangeListener = multiSelectAtLeastOneListener
58 | }
59 |
60 | private var numberCheckListener = Preference.OnPreferenceChangeListener { _, o ->
61 | if ((o != null) and o.toString().isNotEmpty() and o.toString().matches(Regex("\\d*"))) {
62 | val num = Integer.valueOf(o.toString())
63 | if (num >= 1000000) {
64 | Toast.makeText(
65 | activity, R.string.number_too_big_input_toast, Toast.LENGTH_LONG
66 | ).show()
67 | return@OnPreferenceChangeListener false
68 | }
69 | return@OnPreferenceChangeListener true
70 | }
71 | Toast.makeText(
72 | activity, R.string.invalid_number_input_toast, Toast.LENGTH_LONG
73 | ).show()
74 | return@OnPreferenceChangeListener false
75 | }
76 |
77 | private var multiSelectAtLeastOneListener = Preference.OnPreferenceChangeListener { p, o ->
78 | if (p !is MultiSelectListPreference) {
79 | Log.v(
80 | "ZV-Wallpaper:Preferences",
81 | "Non-multiselect preference triggered multiselect change handler."
82 | )
83 | return@OnPreferenceChangeListener false
84 | }
85 |
86 |
87 | if ((o as Set).isNotEmpty()) {
88 | return@OnPreferenceChangeListener true
89 | }
90 |
91 | Log.v(
92 | "ZV-Wallpaper:Preferences",
93 | "No items selected in MultiSelect."
94 | )
95 | Toast.makeText(
96 | activity, R.string.none_selected_multiselect_input_toast, Toast.LENGTH_LONG
97 | ).show()
98 | return@OnPreferenceChangeListener false
99 | }
100 |
101 | override fun onSharedPreferenceChanged(
102 | sharedPreferences: SharedPreferences?, key: String?
103 | ) {
104 | // Nothing to do here, but Kotlin complains if I don't have this here.
105 | }
106 | }
107 | }
--------------------------------------------------------------------------------
/app/src/main/res/xml/prefs.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
9 |
13 |
20 |
25 |
31 |
32 |
33 |
36 |
41 |
46 |
51 |
56 |
61 |
66 |
67 |
70 |
75 |
80 |
81 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Zade\'s Wallpaper
3 | Zade\'s wallpaper
4 | Please enter a real positive integer.
5 | Zade\'s custom live wallpaper
6 | Maximum number of shapes
7 | Install wallpaper
8 | Spawn shapes randomly
9 | Spawn delay (ms)
10 | Shape colour
11 | Enables shapes to be spawned in random places on the screen.
12 | The delay between spawning new shapes. Setting this to less than 500ms might drain your battery.
13 | Once there are this many shapes on the screen, old shapes will be removed.
14 | Background colour
15 | Change preferences
16 | If you have an AMOLED screen, setting this to black will help preserve battery life.
17 | Shape Defaults
18 | Spawning Options
19 | Touch Options
20 | Shape types
21 | Select all the shape types that you want to appear. If you just want one shape type, deselect all of the rest.
22 | Square
23 | Triangle
24 | Circle
25 | Pentagon
26 | Hexagon
27 | Pause random shapes when dragging
28 | Stops random shapes from appearing for a little while after you touch the screen.
29 | Please enter a number that is less than one million
30 | Random coloured shapes
31 | Use a random colour for each shape, rather than the colour set above.
32 | Use a random type for each shape, rather than the type set above.
33 | Enable touch interaction
34 | When enabled, shapes will be spawned where you touch the screen
35 | Random sizes
36 | Use a random size for each shape, rather than the size set above.
37 | Shape size
38 | net.viggers.zade.wallpaper.remove-all-shapes
39 | Clear all shapes
40 | All shapes have been cleared
41 | Github page
42 | Manual updates
43 | Updates from %1$s
44 | Installed with %1$s (%2$s)
45 | Installed manually
46 | Version %1$s (%2$d)
47 | Reset preferences
48 | Reset all preferences?
49 | This will set all your preferences back to their original settings. You can\'t undo this.
50 | Reset
51 | Cancel
52 | Preferences have been reset
53 | Rotate shapes randomly
54 | Shapes will spawn with random rotation. You probably won\'t notice this with circles though.
55 | Select at least one option
56 | Star
57 |
--------------------------------------------------------------------------------
/app/src/main/java/net/viggers/zade/wallpaper/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package net.viggers.zade.wallpaper
2 |
3 | import android.app.WallpaperManager
4 | import android.content.ComponentName
5 | import android.content.Intent
6 | import android.content.pm.ApplicationInfo
7 | import android.content.pm.PackageManager
8 | import android.net.Uri
9 | import android.os.Build
10 | import android.os.Bundle
11 | import android.util.Log
12 | import android.widget.Button
13 | import android.widget.TextView
14 | import android.widget.Toast
15 | import androidx.appcompat.app.AlertDialog
16 | import androidx.appcompat.app.AppCompatActivity
17 |
18 | // Compat stuff
19 | fun PackageManager.getInstallingPackageNameCompat(packageName: String): String? =
20 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
21 | getInstallSourceInfo(packageName).installingPackageName
22 | } else {
23 | @Suppress("DEPRECATION") getInstallerPackageName(packageName)
24 | }
25 |
26 | fun PackageManager.getApplicationInfoCompat(packageName: String): ApplicationInfo {
27 | return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
28 | getApplicationInfo(packageName, PackageManager.ApplicationInfoFlags.of(0));
29 | }else{
30 | @Suppress("DEPRECATION") getApplicationInfo(packageName, PackageManager.GET_META_DATA);
31 | }
32 | }
33 |
34 | class MainActivity : AppCompatActivity() {
35 | override fun onCreate(savedInstanceState: Bundle?) {
36 | super.onCreate(savedInstanceState)
37 |
38 | setContentView(R.layout.main)
39 |
40 | val installButton = findViewById