-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
576 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: New Release | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Init values | ||
id: values | ||
run: | | ||
version=$(grep -Po -m 1 '(?<=versionName ).*' ./app/build.gradle | tr -d \") | ||
echo ::set-output name=name::DualWallpaper v$version | ||
echo ::set-output name=tag::v$version | ||
echo ::set-output name=apk::DualWallpaper_v$version | ||
- name: Create release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
release_name: ${{ steps.values.outputs.name }} | ||
tag_name: ${{ steps.values.outputs.tag }} | ||
body: No changelog | ||
- name: Add apk | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./app/release/app-release.apk | ||
asset_name: ${{ steps.values.outputs.apk }}.apk | ||
asset_content_type: application/vnd.android.package-archive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# <img align="left" loading="lazy" src="readme-res/icon.png" height="50"/> DualWallpaper | ||
Customize your device even more by having two separate sets of wallpapers for light and dark mode. When your device's theme changes, this app will change your wallpaper to the one you've selected accordingly. To handle the change this app offers two possibilities: ``Wallpaper Service`` and ``Live Wallpaper``. In my opinion the first option is more reliable and works better but in some cases the app might get killed by the system and in this case I'd suggest using the second one. You have to see for yourself which option works best on your device. You can download and install the latest apk [here](https://github.com/Yanndroid/DualWallpaper/raw/master/app/release/app-release.apk), future updates are available directly via the app. | ||
|
||
<img loading="lazy" src="readme-res/1.png" height="350"/> <img loading="lazy" src="readme-res/2.png" height="350"/> <img loading="lazy" src="readme-res/3.png" height="350"/> <img loading="lazy" src="readme-res/4.png" height="350"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/build | ||
/build | ||
google-services.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"version": 3, | ||
"artifactType": { | ||
"type": "APK", | ||
"kind": "Directory" | ||
}, | ||
"applicationId": "de.dlyt.yanndroid.dualwallpaper", | ||
"variantName": "release", | ||
"elements": [ | ||
{ | ||
"type": "SINGLE", | ||
"filters": [], | ||
"attributes": [], | ||
"versionCode": 1, | ||
"versionName": "1.0.0", | ||
"outputFile": "app-release.apk" | ||
} | ||
], | ||
"elementType": "File" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
app/src/main/java/de/dlyt/yanndroid/dualwallpaper/ui/AboutActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
package de.dlyt.yanndroid.dualwallpaper.ui; | ||
|
||
import android.content.Intent; | ||
import android.net.Uri; | ||
import android.os.Bundle; | ||
import android.view.Menu; | ||
import android.view.MenuItem; | ||
import android.view.View; | ||
|
||
import androidx.annotation.NonNull; | ||
import androidx.appcompat.app.AppCompatActivity; | ||
import androidx.appcompat.widget.AppCompatButton; | ||
|
||
import de.dlyt.yanndroid.dualwallpaper.R; | ||
import de.dlyt.yanndroid.dualwallpaper.utils.Updater; | ||
import dev.oneuiproject.oneui.layout.AppInfoLayout; | ||
|
||
public class AboutActivity extends AppCompatActivity implements AppInfoLayout.OnClickListener, Updater.UpdateChecker { | ||
|
||
private AppInfoLayout appInfoLayout; | ||
private String update_url, update_version; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_about); | ||
|
||
appInfoLayout = findViewById(R.id.appInfoLayout); | ||
appInfoLayout.setMainButtonClickListener(this); | ||
Updater.checkForUpdate(this, this); | ||
} | ||
|
||
@Override | ||
public void updateAvailable(boolean available, String url, String versionName) { | ||
appInfoLayout.setStatus(available ? AppInfoLayout.UPDATE_AVAILABLE : AppInfoLayout.NO_UPDATE); | ||
update_url = url; | ||
update_version = versionName; | ||
} | ||
|
||
@Override | ||
public void githubAvailable(String url) { | ||
AppCompatButton about_github = findViewById(R.id.about_github); | ||
about_github.setVisibility(View.VISIBLE); | ||
about_github.setOnClickListener(v -> startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)))); | ||
} | ||
|
||
@Override | ||
public void noConnection() { | ||
appInfoLayout.setStatus(AppInfoLayout.NO_CONNECTION); | ||
} | ||
|
||
@Override | ||
public void onUpdateClicked(View v) { | ||
if (update_url != null) Updater.downloadAndInstall(this, update_url, update_version); | ||
} | ||
|
||
@Override | ||
public void onRetryClicked(View v) { | ||
Updater.checkForUpdate(this, this); | ||
} | ||
|
||
@Override | ||
public boolean onCreateOptionsMenu(@NonNull Menu menu) { | ||
getMenuInflater().inflate(dev.oneuiproject.oneui.R.menu.app_info_menu, menu); | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean onOptionsItemSelected(MenuItem item) { | ||
if (item.getItemId() == dev.oneuiproject.oneui.R.id.menu_app_info) { | ||
appInfoLayout.openSettingsAppInfo(); | ||
return true; | ||
} | ||
return false; | ||
} | ||
} |
Oops, something went wrong.