Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions app/src/main/java/org/cssnr/remotewallpaper/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import android.content.ComponentName
import android.content.Intent
import android.content.res.Configuration
import android.graphics.Color
import android.os.Build
import android.os.Bundle
import android.util.Log
import android.view.Menu
import android.view.MenuItem
import android.widget.TextView
import androidx.activity.SystemBarStyle
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.edit
Expand Down Expand Up @@ -55,7 +55,13 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Log.d(LOG_TAG, "onCreate: savedInstanceState: ${savedInstanceState?.size()}")
enableEdgeToEdge()
enableEdgeToEdge(
statusBarStyle = SystemBarStyle.dark(Color.TRANSPARENT),
//statusBarStyle = SystemBarStyle.auto(Color.TRANSPARENT, Color.TRANSPARENT),

//navigationBarStyle = SystemBarStyle.dark(Color.TRANSPARENT),
navigationBarStyle = SystemBarStyle.auto(Color.TRANSPARENT, Color.TRANSPARENT)
)
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)

Expand Down Expand Up @@ -147,14 +153,14 @@ class MainActivity : AppCompatActivity() {
PreferenceManager.setDefaultValues(this, R.xml.preferences_widget, false)

// Update Status Bar
window.statusBarColor = Color.TRANSPARENT
//window.statusBarColor = Color.TRANSPARENT
WindowInsetsControllerCompat(window, window.decorView).isAppearanceLightStatusBars = false

// Update Navigation Bar
window.navigationBarColor = Color.TRANSPARENT
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
window.setNavigationBarContrastEnforced(false)
}
//// Update Navigation Bar - NOTE: this is now handled by enableEdgeToEdge()
//window.navigationBarColor = Color.TRANSPARENT
//if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
// window.setNavigationBarContrastEnforced(false)
//}

// Set Global Left/Right System Insets
ViewCompat.setOnApplyWindowInsetsListener(binding.contentMain.contentMainLayout) { v, insets ->
Expand Down Expand Up @@ -212,7 +218,7 @@ class MainActivity : AppCompatActivity() {
return when (item.itemId) {
R.id.option_add_remote -> {
Log.i(LOG_TAG, "ADD REMOTE OPTIONS CLICK")
// NOTE: This seems to work to navigation to a top-level desitnation with args...
// NOTE: This seems to work to navigation to a top-level destination with args...
val bundle = bundleOf("add_remote" to true)
val menuItem = binding.navView.menu.findItem(R.id.nav_remotes)
NavigationUI.onNavDestinationSelected(menuItem, navController)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import org.cssnr.remotewallpaper.R
Expand All @@ -24,8 +23,8 @@ class HistoryAdapter(

private lateinit var context: Context

inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val itemWrapper: LinearLayout = view.findViewById(R.id.item_wrapper)
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
//val itemWrapper: LinearLayout = view.findViewById(R.id.item_wrapper)
val itemUrl: TextView = view.findViewById(R.id.item_url)
val itemTimestamp: TextView = view.findViewById(R.id.item_timestamp)
val itemCode: TextView = view.findViewById(R.id.item_code)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class RemotesAdapter(

private lateinit var context: Context

inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val itemWrapper: LinearLayout = view.findViewById(R.id.item_wrapper)
val propertiesName: TextView = view.findViewById(R.id.properties_name)
//val propertiesID: TextView = view.findViewById(R.id.properties_id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import android.widget.EditText
import android.widget.TextView
import android.widget.Toast
import androidx.appcompat.app.AlertDialog
import androidx.core.content.pm.PackageInfoCompat
import androidx.core.net.toUri
import androidx.lifecycle.lifecycleScope
import androidx.navigation.fragment.findNavController
Expand All @@ -31,9 +32,9 @@ import org.cssnr.remotewallpaper.work.enqueueWorkRequest

class SettingsFragment : PreferenceFragmentCompat() {

companion object {
const val LOG_TAG = "Settings"
}
//companion object {
// const val LOG_TAG = "Settings"
//}

@SuppressLint("BatteryLife")
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
Expand Down Expand Up @@ -238,7 +239,7 @@ class SettingsFragment : PreferenceFragmentCompat() {
val formattedVersion = getString(
R.string.version_code_string,
packageInfo.versionName,
packageInfo.versionCode.toString()
PackageInfoCompat.getLongVersionCode(packageInfo).toString()
)
Log.d("showAppInfoDialog", "formattedVersion: $formattedVersion")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ class WidgetProvider : AppWidgetProvider() {
val selectedTextColor = colorMap[textColor] ?: Color.WHITE
Log.d("Widget[onUpdate]", "selectedTextColor: $selectedTextColor")

val opacityPercent = bgOpacity
val alpha = (opacityPercent * 255 / 100).coerceIn(1, 255)
val alpha = (bgOpacity * 255 / 100).coerceIn(1, 255)
val finalBgColor = ColorUtils.setAlphaComponent(selectedBgColor, alpha)
Log.d("Widget[onUpdate]", "finalBgColor: $finalBgColor")

Expand Down
13 changes: 13 additions & 0 deletions gradle/gradle-daemon-jvm.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#This file is generated by updateDaemonJvm
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/29ee363f71d060405f729a8f1b7f7aef/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/ecd23fd7707c683afbcd6052998cb6a9/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/29ee363f71d060405f729a8f1b7f7aef/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/ecd23fd7707c683afbcd6052998cb6a9/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/10fc3bf1ee0001078a473afe6e43cfdb/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/9c55677aff3966382f3d853c0959bfb2/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/29ee363f71d060405f729a8f1b7f7aef/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/ecd23fd7707c683afbcd6052998cb6a9/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/39846e8427e64a3824c13e399d7d813c/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/ac151d55def6b6a9a159dc4cb4642851/redirect
toolchainVendor=JETBRAINS
toolchainVersion=21
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri May 30 22:11:27 PDT 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
5 changes: 5 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("UnstableApiUsage")

pluginManagement {
repositories {
google {
Expand All @@ -11,6 +13,9 @@ pluginManagement {
gradlePluginPortal()
}
}
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
Expand Down
Loading