mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Remove android-base; move Dagger classes to uhabits.inject
This commit is contained in:
1
android/android-base/.gitignore
vendored
1
android/android-base/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
/build
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
apply plugin: 'com.android.library'
|
|
||||||
apply plugin: 'kotlin-android'
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdkVersion COMPILE_SDK_VERSION as Integer
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
minSdkVersion MIN_SDK_VERSION as Integer
|
|
||||||
targetSdkVersion TARGET_SDK_VERSION as Integer
|
|
||||||
buildConfigField 'int', 'VERSION_CODE', "$VERSION_CODE"
|
|
||||||
buildConfigField 'String', 'VERSION_NAME', "\"$VERSION_NAME\""
|
|
||||||
}
|
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
||||||
|
|
||||||
lintOptions {
|
|
||||||
checkReleaseBuilds false
|
|
||||||
abortOnError false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation "com.google.dagger:dagger:$DAGGER_VERSION"
|
|
||||||
implementation 'com.google.android.material:material:1.0.0'
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.0.0'
|
|
||||||
implementation "org.apache.commons:commons-lang3:3.5"
|
|
||||||
|
|
||||||
annotationProcessor "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
|
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$KOTLIN_VERSION"
|
|
||||||
}
|
|
||||||
25
android/android-base/proguard-rules.pro
vendored
25
android/android-base/proguard-rules.pro
vendored
@@ -1,25 +0,0 @@
|
|||||||
# Add project specific ProGuard rules here.
|
|
||||||
# By default, the flags in this file are appended to flags specified
|
|
||||||
# in /gemini-b/opt/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 *;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# Uncomment this to preserve the line number information for
|
|
||||||
# debugging stack traces.
|
|
||||||
#-keepattributes SourceFile,LineNumberTable
|
|
||||||
|
|
||||||
# If you keep the line number information, uncomment this to
|
|
||||||
# hide the original source file name.
|
|
||||||
#-renamesourcefileattribute SourceFile
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<manifest package="org.isoron.androidbase"
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"/>
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2017 Álinson Santos Xavier <isoron@gmail.com>
|
|
||||||
*
|
|
||||||
* This file is part of Loop Habit Tracker.
|
|
||||||
*
|
|
||||||
* Loop Habit Tracker is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by the
|
|
||||||
* Free Software Foundation, either version 3 of the License, or (at your
|
|
||||||
* option) any later version.
|
|
||||||
*
|
|
||||||
* Loop Habit Tracker is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
||||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
||||||
* more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along
|
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package org.isoron.androidbase
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import java.security.KeyStore
|
|
||||||
import java.security.cert.CertificateFactory
|
|
||||||
import javax.inject.Inject
|
|
||||||
import javax.net.ssl.SSLContext
|
|
||||||
import javax.net.ssl.TrustManagerFactory
|
|
||||||
|
|
||||||
class SSLContextProvider @Inject constructor(@param:AppContext private val context: Context) {
|
|
||||||
fun getCACertSSLContext(): SSLContext {
|
|
||||||
try {
|
|
||||||
val cf = CertificateFactory.getInstance("X.509")
|
|
||||||
val ca = cf.generateCertificate(context.assets.open("cacert.pem"))
|
|
||||||
val ks = KeyStore.getInstance(KeyStore.getDefaultType()).apply {
|
|
||||||
load(null, null)
|
|
||||||
setCertificateEntry("ca", ca)
|
|
||||||
}
|
|
||||||
val alg = TrustManagerFactory.getDefaultAlgorithm()
|
|
||||||
val tmf = TrustManagerFactory.getInstance(alg).apply {
|
|
||||||
init(ks)
|
|
||||||
}
|
|
||||||
return SSLContext.getInstance("TLS").apply {
|
|
||||||
init(null, tmf.trustManagers, null)
|
|
||||||
}
|
|
||||||
} catch (e: Exception) {
|
|
||||||
throw RuntimeException(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<resources>
|
|
||||||
<item name="toolbar" type="id" />
|
|
||||||
<item name="toolbarShadow" type="id" />
|
|
||||||
<item name="headerShadow" type="id" />
|
|
||||||
<attr name="palette" format="reference"/>
|
|
||||||
</resources>
|
|
||||||
@@ -1 +1 @@
|
|||||||
include ':uhabits-android', ':uhabits-core', ':android-base', ':android-pickers'
|
include ':uhabits-android', ':uhabits-core', ':android-pickers'
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(":uhabits-core")
|
implementation project(":uhabits-core")
|
||||||
implementation project(":android-base")
|
|
||||||
implementation project(":android-pickers")
|
implementation project(":android-pickers")
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.0.0'
|
implementation 'androidx.appcompat:appcompat:1.0.0'
|
||||||
|
|||||||
@@ -32,12 +32,11 @@ import androidx.test.uiautomator.*;
|
|||||||
|
|
||||||
import junit.framework.*;
|
import junit.framework.*;
|
||||||
|
|
||||||
import org.isoron.androidbase.*;
|
|
||||||
import org.isoron.androidbase.utils.*;
|
|
||||||
import org.isoron.uhabits.core.models.*;
|
import org.isoron.uhabits.core.models.*;
|
||||||
import org.isoron.uhabits.core.preferences.*;
|
import org.isoron.uhabits.core.preferences.*;
|
||||||
import org.isoron.uhabits.core.tasks.*;
|
import org.isoron.uhabits.core.tasks.*;
|
||||||
import org.isoron.uhabits.core.utils.*;
|
import org.isoron.uhabits.core.utils.*;
|
||||||
|
import org.isoron.uhabits.inject.*;
|
||||||
import org.isoron.uhabits.utils.*;
|
import org.isoron.uhabits.utils.*;
|
||||||
import org.junit.*;
|
import org.junit.*;
|
||||||
|
|
||||||
|
|||||||
@@ -29,11 +29,9 @@ import org.isoron.uhabits.core.models.*;
|
|||||||
import org.isoron.uhabits.core.preferences.*;
|
import org.isoron.uhabits.core.preferences.*;
|
||||||
import org.isoron.uhabits.core.ui.screens.habits.list.*;
|
import org.isoron.uhabits.core.ui.screens.habits.list.*;
|
||||||
import org.isoron.uhabits.core.utils.*;
|
import org.isoron.uhabits.core.utils.*;
|
||||||
|
import org.isoron.uhabits.inject.*;
|
||||||
import org.junit.*;
|
import org.junit.*;
|
||||||
|
|
||||||
import java.time.*;
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import static androidx.test.core.app.ApplicationProvider.*;
|
import static androidx.test.core.app.ApplicationProvider.*;
|
||||||
import static androidx.test.platform.app.InstrumentationRegistry.*;
|
import static androidx.test.platform.app.InstrumentationRegistry.*;
|
||||||
import static androidx.test.uiautomator.UiDevice.*;
|
import static androidx.test.uiautomator.UiDevice.*;
|
||||||
|
|||||||
@@ -26,8 +26,7 @@ import android.widget.*;
|
|||||||
import androidx.annotation.*;
|
import androidx.annotation.*;
|
||||||
import androidx.test.platform.app.*;
|
import androidx.test.platform.app.*;
|
||||||
|
|
||||||
import org.isoron.androidbase.*;
|
import org.isoron.uhabits.utils.*;
|
||||||
import org.isoron.androidbase.utils.*;
|
|
||||||
import org.isoron.uhabits.widgets.*;
|
import org.isoron.uhabits.widgets.*;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|||||||
@@ -20,11 +20,10 @@
|
|||||||
package org.isoron.uhabits
|
package org.isoron.uhabits
|
||||||
|
|
||||||
import dagger.*
|
import dagger.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.activities.*
|
|
||||||
import org.isoron.uhabits.activities.habits.list.*
|
import org.isoron.uhabits.activities.habits.list.*
|
||||||
import org.isoron.uhabits.activities.habits.list.views.*
|
import org.isoron.uhabits.activities.habits.list.views.*
|
||||||
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
import org.mockito.Mockito.*
|
import org.mockito.Mockito.*
|
||||||
|
|
||||||
@Module
|
@Module
|
||||||
|
|||||||
@@ -20,11 +20,9 @@
|
|||||||
package org.isoron.uhabits;
|
package org.isoron.uhabits;
|
||||||
|
|
||||||
import androidx.test.filters.*;
|
import androidx.test.filters.*;
|
||||||
import androidx.test.runner.*;
|
|
||||||
|
|
||||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||||
|
|
||||||
import org.isoron.androidbase.*;
|
|
||||||
import org.junit.*;
|
import org.junit.*;
|
||||||
import org.junit.runner.*;
|
import org.junit.runner.*;
|
||||||
|
|
||||||
|
|||||||
@@ -19,9 +19,9 @@
|
|||||||
|
|
||||||
package org.isoron.uhabits;
|
package org.isoron.uhabits;
|
||||||
|
|
||||||
import org.isoron.androidbase.*;
|
|
||||||
import org.isoron.uhabits.core.*;
|
import org.isoron.uhabits.core.*;
|
||||||
import org.isoron.uhabits.core.tasks.*;
|
import org.isoron.uhabits.core.tasks.*;
|
||||||
|
import org.isoron.uhabits.inject.*;
|
||||||
import org.isoron.uhabits.intents.*;
|
import org.isoron.uhabits.intents.*;
|
||||||
|
|
||||||
import dagger.*;
|
import dagger.*;
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
package org.isoron.uhabits.database
|
package org.isoron.uhabits.database
|
||||||
|
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.*
|
import org.isoron.uhabits.*
|
||||||
import org.isoron.uhabits.core.utils.*
|
import org.isoron.uhabits.core.utils.*
|
||||||
import org.junit.*
|
import org.junit.*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2017 Álinson Santos Xavier <isoron@gmail.com>
|
* Copyright (C) 2016-2020 Álinson Santos Xavier <isoron@gmail.com>
|
||||||
*
|
*
|
||||||
* This file is part of Loop Habit Tracker.
|
* This file is part of Loop Habit Tracker.
|
||||||
*
|
*
|
||||||
@@ -16,16 +16,16 @@
|
|||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package org.isoron.androidbase
|
package org.isoron.uhabits
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.*
|
||||||
import android.os.Build
|
import android.os.*
|
||||||
import android.os.Environment
|
import android.view.*
|
||||||
import android.view.WindowManager
|
import org.isoron.uhabits.inject.*
|
||||||
import java.io.*
|
import java.io.*
|
||||||
import java.text.SimpleDateFormat
|
import java.text.*
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import javax.inject.Inject
|
import javax.inject.*
|
||||||
|
|
||||||
open class AndroidBugReporter @Inject constructor(@AppContext private val context: Context) {
|
open class AndroidBugReporter @Inject constructor(@AppContext private val context: Context) {
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2017 Álinson Santos Xavier <isoron@gmail.com>
|
* Copyright (C) 2016-2020 Álinson Santos Xavier <isoron@gmail.com>
|
||||||
*
|
*
|
||||||
* This file is part of Loop Habit Tracker.
|
* This file is part of Loop Habit Tracker.
|
||||||
*
|
*
|
||||||
@@ -16,11 +16,12 @@
|
|||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package org.isoron.androidbase
|
package org.isoron.uhabits
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import org.isoron.androidbase.utils.FileUtils
|
import org.isoron.uhabits.inject.*
|
||||||
|
import org.isoron.uhabits.utils.FileUtils
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2017 Álinson Santos Xavier <isoron@gmail.com>
|
* Copyright (C) 2016-2020 Álinson Santos Xavier <isoron@gmail.com>
|
||||||
*
|
*
|
||||||
* This file is part of Loop Habit Tracker.
|
* This file is part of Loop Habit Tracker.
|
||||||
*
|
*
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package org.isoron.androidbase
|
package org.isoron.uhabits
|
||||||
|
|
||||||
import android.app.*
|
import android.app.*
|
||||||
|
|
||||||
@@ -21,11 +21,11 @@ package org.isoron.uhabits
|
|||||||
|
|
||||||
import android.app.*
|
import android.app.*
|
||||||
import android.content.*
|
import android.content.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.core.database.*
|
import org.isoron.uhabits.core.database.*
|
||||||
import org.isoron.uhabits.core.reminders.*
|
import org.isoron.uhabits.core.reminders.*
|
||||||
import org.isoron.uhabits.core.ui.*
|
import org.isoron.uhabits.core.ui.*
|
||||||
import org.isoron.uhabits.core.utils.*
|
import org.isoron.uhabits.core.utils.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
import org.isoron.uhabits.utils.*
|
import org.isoron.uhabits.utils.*
|
||||||
import org.isoron.uhabits.widgets.*
|
import org.isoron.uhabits.widgets.*
|
||||||
import java.io.*
|
import java.io.*
|
||||||
|
|||||||
@@ -24,10 +24,10 @@ import android.content.*
|
|||||||
import android.content.res.Configuration.*
|
import android.content.res.Configuration.*
|
||||||
import android.os.Build.VERSION.*
|
import android.os.Build.VERSION.*
|
||||||
import androidx.core.content.*
|
import androidx.core.content.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.R
|
import org.isoron.uhabits.R
|
||||||
import org.isoron.uhabits.core.preferences.*
|
import org.isoron.uhabits.core.preferences.*
|
||||||
import org.isoron.uhabits.core.ui.*
|
import org.isoron.uhabits.core.ui.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
|
|
||||||
@ActivityScope
|
@ActivityScope
|
||||||
class AndroidThemeSwitcher
|
class AndroidThemeSwitcher
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ package org.isoron.uhabits.activities
|
|||||||
import android.content.*
|
import android.content.*
|
||||||
import android.os.*
|
import android.os.*
|
||||||
import androidx.appcompat.app.*
|
import androidx.appcompat.app.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.*
|
import org.isoron.uhabits.*
|
||||||
import org.isoron.uhabits.core.models.*
|
import org.isoron.uhabits.core.models.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
|
|
||||||
abstract class HabitsActivity : AppCompatActivity() {
|
abstract class HabitsActivity : AppCompatActivity() {
|
||||||
lateinit var component: HabitsActivityComponent
|
lateinit var component: HabitsActivityComponent
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.isoron.uhabits.activities
|
package org.isoron.uhabits.activities
|
||||||
|
|
||||||
import org.isoron.androidbase.*
|
import org.isoron.uhabits.*
|
||||||
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
||||||
import org.isoron.uhabits.core.ui.screens.habits.show.*
|
import org.isoron.uhabits.core.ui.screens.habits.show.*
|
||||||
import java.io.*
|
import java.io.*
|
||||||
|
|||||||
@@ -21,10 +21,9 @@ package org.isoron.uhabits.activities.common.dialogs;
|
|||||||
|
|
||||||
import android.content.*;
|
import android.content.*;
|
||||||
|
|
||||||
import org.isoron.androidbase.*;
|
|
||||||
import org.isoron.androidbase.utils.*;
|
|
||||||
import org.isoron.uhabits.R;
|
import org.isoron.uhabits.R;
|
||||||
import org.isoron.uhabits.core.models.*;
|
import org.isoron.uhabits.core.models.*;
|
||||||
|
import org.isoron.uhabits.inject.*;
|
||||||
import org.isoron.uhabits.utils.*;
|
import org.isoron.uhabits.utils.*;
|
||||||
|
|
||||||
import javax.inject.*;
|
import javax.inject.*;
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ import androidx.appcompat.app.*;
|
|||||||
|
|
||||||
import com.google.auto.factory.*;
|
import com.google.auto.factory.*;
|
||||||
|
|
||||||
import org.isoron.androidbase.*;
|
|
||||||
import org.isoron.uhabits.core.ui.callbacks.*;
|
|
||||||
import org.isoron.uhabits.R;
|
import org.isoron.uhabits.R;
|
||||||
|
import org.isoron.uhabits.core.ui.callbacks.*;
|
||||||
|
import org.isoron.uhabits.inject.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dialog that asks the user confirmation before executing a delete operation.
|
* Dialog that asks the user confirmation before executing a delete operation.
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ import androidx.appcompat.app.*;
|
|||||||
|
|
||||||
import com.google.auto.factory.*;
|
import com.google.auto.factory.*;
|
||||||
|
|
||||||
import org.isoron.androidbase.*;
|
|
||||||
import org.isoron.uhabits.core.ui.callbacks.*;
|
|
||||||
import org.isoron.uhabits.R;
|
import org.isoron.uhabits.R;
|
||||||
|
import org.isoron.uhabits.core.ui.callbacks.*;
|
||||||
|
import org.isoron.uhabits.inject.*;
|
||||||
|
|
||||||
@AutoFactory(allowSubclasses = true)
|
@AutoFactory(allowSubclasses = true)
|
||||||
public class ConfirmSyncKeyDialog extends AlertDialog
|
public class ConfirmSyncKeyDialog extends AlertDialog
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import org.isoron.uhabits.core.ui.callbacks.*;
|
|||||||
import org.isoron.uhabits.utils.*;
|
import org.isoron.uhabits.utils.*;
|
||||||
import org.jetbrains.annotations.*;
|
import org.jetbrains.annotations.*;
|
||||||
|
|
||||||
import static org.isoron.androidbase.utils.InterfaceUtils.*;
|
import static org.isoron.uhabits.utils.InterfaceUtils.*;
|
||||||
|
|
||||||
public class HistoryEditorDialog extends AppCompatDialogFragment
|
public class HistoryEditorDialog extends AppCompatDialogFragment
|
||||||
implements DialogInterface.OnClickListener, ModelObservable.Listener
|
implements DialogInterface.OnClickListener, ModelObservable.Listener
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ import android.view.*
|
|||||||
import android.view.WindowManager.LayoutParams.*
|
import android.view.WindowManager.LayoutParams.*
|
||||||
import android.view.inputmethod.*
|
import android.view.inputmethod.*
|
||||||
import android.widget.*
|
import android.widget.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.androidbase.utils.*
|
|
||||||
import org.isoron.uhabits.R
|
import org.isoron.uhabits.R
|
||||||
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
|
import org.isoron.uhabits.utils.*
|
||||||
import javax.inject.*
|
import javax.inject.*
|
||||||
|
|
||||||
class NumberPickerFactory
|
class NumberPickerFactory
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ import android.util.*;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import org.isoron.androidbase.utils.*;
|
|
||||||
import org.isoron.uhabits.*;
|
import org.isoron.uhabits.*;
|
||||||
import org.isoron.uhabits.activities.habits.list.views.*;
|
import org.isoron.uhabits.activities.habits.list.views.*;
|
||||||
import org.isoron.uhabits.core.models.*;
|
import org.isoron.uhabits.core.models.*;
|
||||||
@@ -36,7 +35,7 @@ import org.isoron.uhabits.utils.*;
|
|||||||
import java.text.*;
|
import java.text.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static org.isoron.androidbase.utils.InterfaceUtils.*;
|
import static org.isoron.uhabits.utils.InterfaceUtils.*;
|
||||||
|
|
||||||
public class BarChart extends ScrollableChart
|
public class BarChart extends ScrollableChart
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ import android.util.*;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import org.isoron.androidbase.utils.*;
|
|
||||||
import org.isoron.uhabits.*;
|
import org.isoron.uhabits.*;
|
||||||
import org.isoron.uhabits.core.models.*;
|
import org.isoron.uhabits.core.models.*;
|
||||||
import org.isoron.uhabits.core.utils.*;
|
import org.isoron.uhabits.core.utils.*;
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import android.view.*;
|
|||||||
import androidx.annotation.*;
|
import androidx.annotation.*;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import org.isoron.androidbase.utils.*;
|
|
||||||
import org.isoron.uhabits.*;
|
import org.isoron.uhabits.*;
|
||||||
import org.isoron.uhabits.core.models.*;
|
import org.isoron.uhabits.core.models.*;
|
||||||
import org.isoron.uhabits.core.ui.callbacks.*;
|
import org.isoron.uhabits.core.ui.callbacks.*;
|
||||||
@@ -40,7 +39,7 @@ import org.jetbrains.annotations.*;
|
|||||||
import java.text.*;
|
import java.text.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static org.isoron.androidbase.utils.InterfaceUtils.*;
|
import static org.isoron.uhabits.utils.InterfaceUtils.*;
|
||||||
import static org.isoron.uhabits.core.models.Checkmark.*;
|
import static org.isoron.uhabits.core.models.Checkmark.*;
|
||||||
|
|
||||||
public class HistoryChart extends ScrollableChart
|
public class HistoryChart extends ScrollableChart
|
||||||
|
|||||||
@@ -27,12 +27,11 @@ import android.view.*;
|
|||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import org.isoron.androidbase.utils.*;
|
|
||||||
import org.isoron.uhabits.*;
|
import org.isoron.uhabits.*;
|
||||||
import org.isoron.uhabits.utils.*;
|
import org.isoron.uhabits.utils.*;
|
||||||
|
|
||||||
import static org.isoron.uhabits.utils.AttributeSetUtils.*;
|
import static org.isoron.uhabits.utils.AttributeSetUtils.*;
|
||||||
import static org.isoron.androidbase.utils.InterfaceUtils.*;
|
import static org.isoron.uhabits.utils.InterfaceUtils.*;
|
||||||
|
|
||||||
public class RingView extends View
|
public class RingView extends View
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ import android.util.*;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import org.isoron.androidbase.utils.*;
|
|
||||||
import org.isoron.uhabits.*;
|
import org.isoron.uhabits.*;
|
||||||
import org.isoron.uhabits.core.models.*;
|
import org.isoron.uhabits.core.models.*;
|
||||||
import org.isoron.uhabits.core.utils.*;
|
import org.isoron.uhabits.core.utils.*;
|
||||||
@@ -35,7 +34,7 @@ import org.isoron.uhabits.utils.*;
|
|||||||
import java.text.*;
|
import java.text.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static org.isoron.androidbase.utils.InterfaceUtils.*;
|
import static org.isoron.uhabits.utils.InterfaceUtils.*;
|
||||||
|
|
||||||
public class ScoreChart extends ScrollableChart
|
public class ScoreChart extends ScrollableChart
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,16 +25,16 @@ import android.util.*;
|
|||||||
import android.view.*;
|
import android.view.*;
|
||||||
import android.view.ViewGroup.*;
|
import android.view.ViewGroup.*;
|
||||||
|
|
||||||
import org.isoron.androidbase.utils.*;
|
|
||||||
import org.isoron.uhabits.*;
|
import org.isoron.uhabits.*;
|
||||||
import org.isoron.uhabits.core.models.*;
|
import org.isoron.uhabits.core.models.*;
|
||||||
import org.isoron.uhabits.core.utils.*;
|
import org.isoron.uhabits.core.utils.*;
|
||||||
|
import org.isoron.uhabits.utils.*;
|
||||||
|
|
||||||
import java.text.*;
|
import java.text.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static android.view.View.MeasureSpec.*;
|
import static android.view.View.MeasureSpec.*;
|
||||||
import static org.isoron.androidbase.utils.InterfaceUtils.*;
|
import static org.isoron.uhabits.utils.InterfaceUtils.*;
|
||||||
|
|
||||||
public class StreakChart extends View
|
public class StreakChart extends View
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,14 +24,14 @@ import android.graphics.*;
|
|||||||
import android.util.*;
|
import android.util.*;
|
||||||
import android.view.*;
|
import android.view.*;
|
||||||
|
|
||||||
import org.isoron.androidbase.utils.*;
|
|
||||||
import org.isoron.uhabits.*;
|
import org.isoron.uhabits.*;
|
||||||
import org.isoron.uhabits.activities.habits.list.views.*;
|
import org.isoron.uhabits.activities.habits.list.views.*;
|
||||||
|
import org.isoron.uhabits.utils.*;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static android.view.View.MeasureSpec.*;
|
import static android.view.View.MeasureSpec.*;
|
||||||
import static org.isoron.androidbase.utils.InterfaceUtils.*;
|
import static org.isoron.uhabits.utils.InterfaceUtils.*;
|
||||||
|
|
||||||
public class TargetChart extends View
|
public class TargetChart extends View
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import androidx.appcompat.app.*
|
|||||||
import androidx.fragment.app.*
|
import androidx.fragment.app.*
|
||||||
import com.android.datetimepicker.time.*
|
import com.android.datetimepicker.time.*
|
||||||
import kotlinx.android.synthetic.main.activity_edit_habit.*
|
import kotlinx.android.synthetic.main.activity_edit_habit.*
|
||||||
import org.isoron.androidbase.utils.*
|
|
||||||
import org.isoron.uhabits.*
|
import org.isoron.uhabits.*
|
||||||
import org.isoron.uhabits.activities.*
|
import org.isoron.uhabits.activities.*
|
||||||
import org.isoron.uhabits.activities.common.dialogs.*
|
import org.isoron.uhabits.activities.common.dialogs.*
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import android.content.*
|
|||||||
import android.os.*
|
import android.os.*
|
||||||
import android.view.*
|
import android.view.*
|
||||||
import kotlinx.coroutines.*
|
import kotlinx.coroutines.*
|
||||||
import org.isoron.androidbase.*
|
import org.isoron.uhabits.*
|
||||||
import org.isoron.uhabits.activities.*
|
import org.isoron.uhabits.activities.*
|
||||||
import org.isoron.uhabits.activities.habits.list.views.*
|
import org.isoron.uhabits.activities.habits.list.views.*
|
||||||
import org.isoron.uhabits.core.preferences.*
|
import org.isoron.uhabits.core.preferences.*
|
||||||
|
|||||||
@@ -22,11 +22,11 @@ package org.isoron.uhabits.activities.habits.list
|
|||||||
import android.content.*
|
import android.content.*
|
||||||
import android.view.*
|
import android.view.*
|
||||||
import androidx.appcompat.app.*
|
import androidx.appcompat.app.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.R
|
import org.isoron.uhabits.R
|
||||||
import org.isoron.uhabits.core.preferences.*
|
import org.isoron.uhabits.core.preferences.*
|
||||||
import org.isoron.uhabits.core.ui.*
|
import org.isoron.uhabits.core.ui.*
|
||||||
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
import javax.inject.*
|
import javax.inject.*
|
||||||
|
|
||||||
@ActivityScope
|
@ActivityScope
|
||||||
|
|||||||
@@ -21,10 +21,11 @@ package org.isoron.uhabits.activities.habits.list
|
|||||||
|
|
||||||
import android.content.*
|
import android.content.*
|
||||||
import dagger.*
|
import dagger.*
|
||||||
import org.isoron.androidbase.*
|
import org.isoron.uhabits.*
|
||||||
import org.isoron.uhabits.activities.*
|
import org.isoron.uhabits.activities.*
|
||||||
import org.isoron.uhabits.activities.habits.list.views.*
|
import org.isoron.uhabits.activities.habits.list.views.*
|
||||||
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
import javax.inject.*
|
import javax.inject.*
|
||||||
|
|
||||||
class BugReporterProxy
|
class BugReporterProxy
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ package org.isoron.uhabits.activities.habits.list
|
|||||||
import android.content.*
|
import android.content.*
|
||||||
import android.view.ViewGroup.LayoutParams.*
|
import android.view.ViewGroup.LayoutParams.*
|
||||||
import android.widget.*
|
import android.widget.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.R
|
import org.isoron.uhabits.R
|
||||||
import org.isoron.uhabits.activities.common.views.*
|
import org.isoron.uhabits.activities.common.views.*
|
||||||
import org.isoron.uhabits.activities.habits.list.views.*
|
import org.isoron.uhabits.activities.habits.list.views.*
|
||||||
@@ -31,6 +30,7 @@ import org.isoron.uhabits.core.preferences.*
|
|||||||
import org.isoron.uhabits.core.tasks.*
|
import org.isoron.uhabits.core.tasks.*
|
||||||
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
||||||
import org.isoron.uhabits.core.utils.*
|
import org.isoron.uhabits.core.utils.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
import org.isoron.uhabits.utils.*
|
import org.isoron.uhabits.utils.*
|
||||||
import java.lang.Math.*
|
import java.lang.Math.*
|
||||||
import javax.inject.*
|
import javax.inject.*
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ import android.util.*
|
|||||||
import androidx.annotation.*
|
import androidx.annotation.*
|
||||||
import androidx.appcompat.app.*
|
import androidx.appcompat.app.*
|
||||||
import dagger.*
|
import dagger.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.androidbase.utils.*
|
|
||||||
import org.isoron.uhabits.R
|
import org.isoron.uhabits.R
|
||||||
import org.isoron.uhabits.activities.common.dialogs.*
|
import org.isoron.uhabits.activities.common.dialogs.*
|
||||||
import org.isoron.uhabits.activities.habits.edit.*
|
import org.isoron.uhabits.activities.habits.edit.*
|
||||||
@@ -38,6 +36,7 @@ import org.isoron.uhabits.core.ui.*
|
|||||||
import org.isoron.uhabits.core.ui.callbacks.*
|
import org.isoron.uhabits.core.ui.callbacks.*
|
||||||
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
||||||
import org.isoron.uhabits.core.ui.screens.habits.list.ListHabitsBehavior.Message.*
|
import org.isoron.uhabits.core.ui.screens.habits.list.ListHabitsBehavior.Message.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
import org.isoron.uhabits.intents.*
|
import org.isoron.uhabits.intents.*
|
||||||
import org.isoron.uhabits.tasks.*
|
import org.isoron.uhabits.tasks.*
|
||||||
import org.isoron.uhabits.utils.*
|
import org.isoron.uhabits.utils.*
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import android.view.*
|
|||||||
import androidx.appcompat.app.*
|
import androidx.appcompat.app.*
|
||||||
import androidx.appcompat.view.ActionMode
|
import androidx.appcompat.view.ActionMode
|
||||||
import dagger.*
|
import dagger.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.R
|
import org.isoron.uhabits.R
|
||||||
import org.isoron.uhabits.activities.habits.list.views.*
|
import org.isoron.uhabits.activities.habits.list.views.*
|
||||||
import org.isoron.uhabits.core.commands.*
|
import org.isoron.uhabits.core.commands.*
|
||||||
@@ -32,6 +31,7 @@ import org.isoron.uhabits.core.preferences.*
|
|||||||
import org.isoron.uhabits.core.ui.*
|
import org.isoron.uhabits.core.ui.*
|
||||||
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
||||||
import org.isoron.uhabits.core.utils.*
|
import org.isoron.uhabits.core.utils.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
import javax.inject.*
|
import javax.inject.*
|
||||||
|
|
||||||
@ActivityScope
|
@ActivityScope
|
||||||
|
|||||||
@@ -25,11 +25,11 @@ import android.text.*
|
|||||||
import android.view.*
|
import android.view.*
|
||||||
import android.view.View.MeasureSpec.*
|
import android.view.View.MeasureSpec.*
|
||||||
import com.google.auto.factory.*
|
import com.google.auto.factory.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.R
|
import org.isoron.uhabits.R
|
||||||
import org.isoron.uhabits.core.models.*
|
import org.isoron.uhabits.core.models.*
|
||||||
import org.isoron.uhabits.core.models.Checkmark.*
|
import org.isoron.uhabits.core.models.Checkmark.*
|
||||||
import org.isoron.uhabits.core.preferences.*
|
import org.isoron.uhabits.core.preferences.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
import org.isoron.uhabits.utils.*
|
import org.isoron.uhabits.utils.*
|
||||||
|
|
||||||
@AutoFactory
|
@AutoFactory
|
||||||
|
|||||||
@@ -21,11 +21,11 @@ package org.isoron.uhabits.activities.habits.list.views
|
|||||||
|
|
||||||
import android.content.*
|
import android.content.*
|
||||||
import com.google.auto.factory.*
|
import com.google.auto.factory.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.core.models.*
|
import org.isoron.uhabits.core.models.*
|
||||||
import org.isoron.uhabits.core.models.Checkmark.*
|
import org.isoron.uhabits.core.models.Checkmark.*
|
||||||
import org.isoron.uhabits.core.preferences.*
|
import org.isoron.uhabits.core.preferences.*
|
||||||
import org.isoron.uhabits.core.utils.*
|
import org.isoron.uhabits.core.utils.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
|
|
||||||
@AutoFactory
|
@AutoFactory
|
||||||
class CheckmarkPanelView(
|
class CheckmarkPanelView(
|
||||||
|
|||||||
@@ -26,12 +26,12 @@ import android.view.*;
|
|||||||
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import org.isoron.androidbase.*;
|
|
||||||
import org.isoron.uhabits.activities.habits.list.*;
|
import org.isoron.uhabits.activities.habits.list.*;
|
||||||
import org.isoron.uhabits.core.models.*;
|
import org.isoron.uhabits.core.models.*;
|
||||||
import org.isoron.uhabits.core.preferences.*;
|
import org.isoron.uhabits.core.preferences.*;
|
||||||
import org.isoron.uhabits.core.ui.screens.habits.list.*;
|
import org.isoron.uhabits.core.ui.screens.habits.list.*;
|
||||||
import org.isoron.uhabits.core.utils.*;
|
import org.isoron.uhabits.core.utils.*;
|
||||||
|
import org.isoron.uhabits.inject.*;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
|||||||
@@ -20,10 +20,10 @@
|
|||||||
package org.isoron.uhabits.activities.habits.list.views
|
package org.isoron.uhabits.activities.habits.list.views
|
||||||
|
|
||||||
import dagger.*
|
import dagger.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.activities.habits.list.*
|
import org.isoron.uhabits.activities.habits.list.*
|
||||||
import org.isoron.uhabits.core.models.*
|
import org.isoron.uhabits.core.models.*
|
||||||
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
import javax.inject.*
|
import javax.inject.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ import androidx.recyclerview.widget.ItemTouchHelper.*
|
|||||||
import android.view.*
|
import android.view.*
|
||||||
import com.google.auto.factory.*
|
import com.google.auto.factory.*
|
||||||
import dagger.*
|
import dagger.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.R
|
import org.isoron.uhabits.R
|
||||||
import org.isoron.uhabits.activities.common.views.*
|
import org.isoron.uhabits.activities.common.views.*
|
||||||
import org.isoron.uhabits.core.models.*
|
import org.isoron.uhabits.core.models.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
|
|
||||||
@AutoFactory
|
@AutoFactory
|
||||||
class HabitCardListView(
|
class HabitCardListView(
|
||||||
|
|||||||
@@ -28,12 +28,12 @@ import android.view.*
|
|||||||
import android.view.ViewGroup.LayoutParams.*
|
import android.view.ViewGroup.LayoutParams.*
|
||||||
import android.widget.*
|
import android.widget.*
|
||||||
import com.google.auto.factory.*
|
import com.google.auto.factory.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.R
|
import org.isoron.uhabits.R
|
||||||
import org.isoron.uhabits.activities.common.views.*
|
import org.isoron.uhabits.activities.common.views.*
|
||||||
import org.isoron.uhabits.core.models.*
|
import org.isoron.uhabits.core.models.*
|
||||||
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
import org.isoron.uhabits.core.ui.screens.habits.list.*
|
||||||
import org.isoron.uhabits.core.utils.*
|
import org.isoron.uhabits.core.utils.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
import org.isoron.uhabits.utils.*
|
import org.isoron.uhabits.utils.*
|
||||||
|
|
||||||
@AutoFactory
|
@AutoFactory
|
||||||
|
|||||||
@@ -25,11 +25,10 @@ import android.text.*
|
|||||||
import android.view.*
|
import android.view.*
|
||||||
import android.view.View.*
|
import android.view.View.*
|
||||||
import com.google.auto.factory.*
|
import com.google.auto.factory.*
|
||||||
import org.isoron.androidbase.*
|
import org.isoron.uhabits.utils.InterfaceUtils.getDimension
|
||||||
import org.isoron.androidbase.utils.*
|
|
||||||
import org.isoron.androidbase.utils.InterfaceUtils.getDimension
|
|
||||||
import org.isoron.uhabits.R
|
import org.isoron.uhabits.R
|
||||||
import org.isoron.uhabits.core.preferences.*
|
import org.isoron.uhabits.core.preferences.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
import org.isoron.uhabits.utils.*
|
import org.isoron.uhabits.utils.*
|
||||||
import java.text.*
|
import java.text.*
|
||||||
|
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ package org.isoron.uhabits.activities.habits.list.views
|
|||||||
|
|
||||||
import android.content.*
|
import android.content.*
|
||||||
import com.google.auto.factory.*
|
import com.google.auto.factory.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.core.models.*
|
import org.isoron.uhabits.core.models.*
|
||||||
import org.isoron.uhabits.core.preferences.*
|
import org.isoron.uhabits.core.preferences.*
|
||||||
import org.isoron.uhabits.core.utils.*
|
import org.isoron.uhabits.core.utils.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
|
|
||||||
@AutoFactory
|
@AutoFactory
|
||||||
class NumberPanelView(
|
class NumberPanelView(
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import android.os.*
|
|||||||
import android.view.*
|
import android.view.*
|
||||||
import androidx.appcompat.app.*
|
import androidx.appcompat.app.*
|
||||||
import kotlinx.coroutines.*
|
import kotlinx.coroutines.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.*
|
import org.isoron.uhabits.*
|
||||||
import org.isoron.uhabits.activities.*
|
import org.isoron.uhabits.activities.*
|
||||||
import org.isoron.uhabits.activities.common.dialogs.*
|
import org.isoron.uhabits.activities.common.dialogs.*
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import android.util.*
|
|||||||
import android.view.*
|
import android.view.*
|
||||||
import android.widget.*
|
import android.widget.*
|
||||||
import kotlinx.coroutines.*
|
import kotlinx.coroutines.*
|
||||||
import org.isoron.androidbase.utils.*
|
|
||||||
import org.isoron.uhabits.*
|
import org.isoron.uhabits.*
|
||||||
import org.isoron.uhabits.core.models.*
|
import org.isoron.uhabits.core.models.*
|
||||||
import org.isoron.uhabits.core.utils.*
|
import org.isoron.uhabits.core.utils.*
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import android.content.res.*
|
|||||||
import android.util.*
|
import android.util.*
|
||||||
import android.view.*
|
import android.view.*
|
||||||
import android.widget.*
|
import android.widget.*
|
||||||
import org.isoron.androidbase.utils.*
|
|
||||||
import org.isoron.uhabits.*
|
import org.isoron.uhabits.*
|
||||||
import org.isoron.uhabits.activities.habits.list.views.*
|
import org.isoron.uhabits.activities.habits.list.views.*
|
||||||
import org.isoron.uhabits.core.models.*
|
import org.isoron.uhabits.core.models.*
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import androidx.appcompat.app.*
|
|||||||
import com.google.zxing.*
|
import com.google.zxing.*
|
||||||
import com.google.zxing.qrcode.*
|
import com.google.zxing.qrcode.*
|
||||||
import kotlinx.coroutines.*
|
import kotlinx.coroutines.*
|
||||||
import org.isoron.androidbase.utils.InterfaceUtils.getFontAwesome
|
import org.isoron.uhabits.utils.InterfaceUtils.getFontAwesome
|
||||||
import org.isoron.uhabits.*
|
import org.isoron.uhabits.*
|
||||||
import org.isoron.uhabits.activities.*
|
import org.isoron.uhabits.activities.*
|
||||||
import org.isoron.uhabits.core.models.*
|
import org.isoron.uhabits.core.models.*
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import org.isoron.uhabits.*
|
|||||||
import org.isoron.uhabits.core.models.*
|
import org.isoron.uhabits.core.models.*
|
||||||
import org.isoron.uhabits.core.ui.widgets.*
|
import org.isoron.uhabits.core.ui.widgets.*
|
||||||
import org.isoron.uhabits.core.utils.*
|
import org.isoron.uhabits.core.utils.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
import org.isoron.uhabits.receivers.*
|
import org.isoron.uhabits.receivers.*
|
||||||
|
|
||||||
const val ACTION_CHECK = 0
|
const val ACTION_CHECK = 0
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ package org.isoron.uhabits.database
|
|||||||
|
|
||||||
import android.content.*
|
import android.content.*
|
||||||
import android.util.*
|
import android.util.*
|
||||||
import org.isoron.androidbase.*
|
import org.isoron.uhabits.*
|
||||||
import org.isoron.uhabits.core.utils.*
|
import org.isoron.uhabits.core.utils.*
|
||||||
import org.isoron.uhabits.utils.*
|
import org.isoron.uhabits.utils.*
|
||||||
import java.io.*
|
import java.io.*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
|
* Copyright (C) 2016-2020 Álinson Santos Xavier <isoron@gmail.com>
|
||||||
*
|
*
|
||||||
* This file is part of Loop Habit Tracker.
|
* This file is part of Loop Habit Tracker.
|
||||||
*
|
*
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package org.isoron.androidbase
|
package org.isoron.uhabits.inject
|
||||||
|
|
||||||
import javax.inject.*
|
import javax.inject.*
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.isoron.androidbase;
|
package org.isoron.uhabits.inject;
|
||||||
|
|
||||||
import android.content.*;
|
import android.content.*;
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
|
* Copyright (C) 2016-2020 Álinson Santos Xavier <isoron@gmail.com>
|
||||||
*
|
*
|
||||||
* This file is part of Loop Habit Tracker.
|
* This file is part of Loop Habit Tracker.
|
||||||
*
|
*
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package org.isoron.androidbase
|
package org.isoron.uhabits.inject
|
||||||
|
|
||||||
import javax.inject.*
|
import javax.inject.*
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
|
* Copyright (C) 2016-2020 Álinson Santos Xavier <isoron@gmail.com>
|
||||||
*
|
*
|
||||||
* This file is part of Loop Habit Tracker.
|
* This file is part of Loop Habit Tracker.
|
||||||
*
|
*
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package org.isoron.androidbase
|
package org.isoron.uhabits.inject
|
||||||
|
|
||||||
import javax.inject.Qualifier
|
import javax.inject.Qualifier
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
|
* Copyright (C) 2016-2020 Álinson Santos Xavier <isoron@gmail.com>
|
||||||
*
|
*
|
||||||
* This file is part of Loop Habit Tracker.
|
* This file is part of Loop Habit Tracker.
|
||||||
*
|
*
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.isoron.androidbase;
|
package org.isoron.uhabits.inject;
|
||||||
|
|
||||||
import android.content.*;
|
import android.content.*;
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.isoron.uhabits.activities
|
package org.isoron.uhabits.inject
|
||||||
|
|
||||||
import dagger.*
|
import dagger.*
|
||||||
import org.isoron.uhabits.core.models.*
|
import org.isoron.uhabits.core.models.*
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2017 Álinson Santos Xavier <isoron@gmail.com>
|
* Copyright (C) 2016-2020 Álinson Santos Xavier <isoron@gmail.com>
|
||||||
*
|
*
|
||||||
* This file is part of Loop Habit Tracker.
|
* This file is part of Loop Habit Tracker.
|
||||||
*
|
*
|
||||||
@@ -17,11 +17,9 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.isoron.uhabits.activities
|
package org.isoron.uhabits.inject
|
||||||
|
|
||||||
import dagger.*
|
import dagger.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.*
|
|
||||||
import org.isoron.uhabits.activities.common.dialogs.*
|
import org.isoron.uhabits.activities.common.dialogs.*
|
||||||
import org.isoron.uhabits.activities.habits.list.*
|
import org.isoron.uhabits.activities.habits.list.*
|
||||||
import org.isoron.uhabits.activities.habits.list.views.*
|
import org.isoron.uhabits.activities.habits.list.views.*
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2017 Álinson Santos Xavier <isoron@gmail.com>
|
* Copyright (C) 2016-2020 Álinson Santos Xavier <isoron@gmail.com>
|
||||||
*
|
*
|
||||||
* This file is part of Loop Habit Tracker.
|
* This file is part of Loop Habit Tracker.
|
||||||
*
|
*
|
||||||
@@ -17,11 +17,11 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.isoron.uhabits.activities
|
package org.isoron.uhabits.inject
|
||||||
|
|
||||||
import android.content.*
|
import android.content.*
|
||||||
import dagger.*
|
import dagger.*
|
||||||
import org.isoron.androidbase.*
|
import org.isoron.uhabits.activities.*
|
||||||
import org.isoron.uhabits.core.preferences.*
|
import org.isoron.uhabits.core.preferences.*
|
||||||
import org.isoron.uhabits.core.ui.*
|
import org.isoron.uhabits.core.ui.*
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
|
* Copyright (C) 2016-2020 Álinson Santos Xavier <isoron@gmail.com>
|
||||||
*
|
*
|
||||||
* This file is part of Loop Habit Tracker.
|
* This file is part of Loop Habit Tracker.
|
||||||
*
|
*
|
||||||
@@ -17,11 +17,10 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.isoron.uhabits;
|
package org.isoron.uhabits.inject;
|
||||||
|
|
||||||
import android.content.*;
|
import android.content.*;
|
||||||
|
|
||||||
import org.isoron.androidbase.*;
|
|
||||||
import org.isoron.uhabits.core.*;
|
import org.isoron.uhabits.core.*;
|
||||||
import org.isoron.uhabits.core.commands.*;
|
import org.isoron.uhabits.core.commands.*;
|
||||||
import org.isoron.uhabits.core.io.*;
|
import org.isoron.uhabits.core.io.*;
|
||||||
@@ -17,11 +17,10 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.isoron.uhabits
|
package org.isoron.uhabits.inject
|
||||||
|
|
||||||
import android.content.*
|
import android.content.*
|
||||||
import dagger.*
|
import dagger.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.core.*
|
import org.isoron.uhabits.core.*
|
||||||
import org.isoron.uhabits.core.commands.*
|
import org.isoron.uhabits.core.commands.*
|
||||||
import org.isoron.uhabits.core.database.*
|
import org.isoron.uhabits.core.database.*
|
||||||
@@ -34,6 +33,7 @@ import org.isoron.uhabits.core.sync.*
|
|||||||
import org.isoron.uhabits.core.tasks.*
|
import org.isoron.uhabits.core.tasks.*
|
||||||
import org.isoron.uhabits.core.ui.*
|
import org.isoron.uhabits.core.ui.*
|
||||||
import org.isoron.uhabits.database.*
|
import org.isoron.uhabits.database.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
import org.isoron.uhabits.intents.*
|
import org.isoron.uhabits.intents.*
|
||||||
import org.isoron.uhabits.io.*
|
import org.isoron.uhabits.io.*
|
||||||
import org.isoron.uhabits.notifications.*
|
import org.isoron.uhabits.notifications.*
|
||||||
@@ -26,11 +26,11 @@ import android.content.Context.*
|
|||||||
import android.os.Build.VERSION.*
|
import android.os.Build.VERSION.*
|
||||||
import android.os.Build.VERSION_CODES.*
|
import android.os.Build.VERSION_CODES.*
|
||||||
import android.util.*
|
import android.util.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.core.*
|
import org.isoron.uhabits.core.*
|
||||||
import org.isoron.uhabits.core.models.*
|
import org.isoron.uhabits.core.models.*
|
||||||
import org.isoron.uhabits.core.reminders.ReminderScheduler.*
|
import org.isoron.uhabits.core.reminders.ReminderScheduler.*
|
||||||
import org.isoron.uhabits.core.utils.*
|
import org.isoron.uhabits.core.utils.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import javax.inject.*
|
import javax.inject.*
|
||||||
|
|
||||||
|
|||||||
@@ -23,11 +23,10 @@ import android.app.*
|
|||||||
import android.app.PendingIntent.*
|
import android.app.PendingIntent.*
|
||||||
import android.content.*
|
import android.content.*
|
||||||
import android.net.*
|
import android.net.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.core.*
|
import org.isoron.uhabits.core.*
|
||||||
import org.isoron.uhabits.core.models.*
|
import org.isoron.uhabits.core.models.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
import org.isoron.uhabits.receivers.*
|
import org.isoron.uhabits.receivers.*
|
||||||
import org.isoron.uhabits.widgets.*
|
|
||||||
import javax.inject.*
|
import javax.inject.*
|
||||||
|
|
||||||
@AppScope
|
@AppScope
|
||||||
|
|||||||
@@ -28,12 +28,12 @@ import android.os.Build.VERSION.*
|
|||||||
import android.util.*
|
import android.util.*
|
||||||
import androidx.core.app.*
|
import androidx.core.app.*
|
||||||
import androidx.core.app.NotificationCompat.*
|
import androidx.core.app.NotificationCompat.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.R
|
import org.isoron.uhabits.R
|
||||||
import org.isoron.uhabits.core.*
|
import org.isoron.uhabits.core.*
|
||||||
import org.isoron.uhabits.core.models.*
|
import org.isoron.uhabits.core.models.*
|
||||||
import org.isoron.uhabits.core.preferences.*
|
import org.isoron.uhabits.core.preferences.*
|
||||||
import org.isoron.uhabits.core.ui.*
|
import org.isoron.uhabits.core.ui.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
import org.isoron.uhabits.intents.*
|
import org.isoron.uhabits.intents.*
|
||||||
import javax.inject.*
|
import javax.inject.*
|
||||||
|
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ import android.media.RingtoneManager.*
|
|||||||
import android.net.*
|
import android.net.*
|
||||||
import android.preference.*
|
import android.preference.*
|
||||||
import android.provider.*
|
import android.provider.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.R
|
import org.isoron.uhabits.R
|
||||||
import org.isoron.uhabits.core.*
|
import org.isoron.uhabits.core.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
import javax.inject.*
|
import javax.inject.*
|
||||||
|
|
||||||
@AppScope
|
@AppScope
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import android.graphics.*;
|
|||||||
import android.os.*;
|
import android.os.*;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.core.app.*;
|
|
||||||
import android.text.format.*;
|
import android.text.format.*;
|
||||||
import android.view.*;
|
import android.view.*;
|
||||||
import android.widget.*;
|
import android.widget.*;
|
||||||
@@ -17,6 +17,7 @@ import com.android.datetimepicker.time.TimePickerDialog;
|
|||||||
|
|
||||||
import org.isoron.uhabits.*;
|
import org.isoron.uhabits.*;
|
||||||
import org.isoron.uhabits.core.models.*;
|
import org.isoron.uhabits.core.models.*;
|
||||||
|
import org.isoron.uhabits.inject.*;
|
||||||
import org.isoron.uhabits.receivers.*;
|
import org.isoron.uhabits.receivers.*;
|
||||||
import org.isoron.uhabits.utils.*;
|
import org.isoron.uhabits.utils.*;
|
||||||
|
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ package org.isoron.uhabits.preferences
|
|||||||
|
|
||||||
import android.content.*
|
import android.content.*
|
||||||
import android.preference.*
|
import android.preference.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.R
|
import org.isoron.uhabits.R
|
||||||
import org.isoron.uhabits.core.*
|
import org.isoron.uhabits.core.*
|
||||||
import org.isoron.uhabits.core.preferences.*
|
import org.isoron.uhabits.core.preferences.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
import javax.inject.*
|
import javax.inject.*
|
||||||
|
|
||||||
@AppScope
|
@AppScope
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import androidx.annotation.Nullable;
|
|||||||
import org.isoron.uhabits.*;
|
import org.isoron.uhabits.*;
|
||||||
import org.isoron.uhabits.core.models.*;
|
import org.isoron.uhabits.core.models.*;
|
||||||
import org.isoron.uhabits.core.utils.*;
|
import org.isoron.uhabits.core.utils.*;
|
||||||
|
import org.isoron.uhabits.inject.*;
|
||||||
|
|
||||||
import static android.content.ContentUris.*;
|
import static android.content.ContentUris.*;
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import android.util.*;
|
|||||||
import org.isoron.uhabits.*;
|
import org.isoron.uhabits.*;
|
||||||
import org.isoron.uhabits.core.preferences.*;
|
import org.isoron.uhabits.core.preferences.*;
|
||||||
import org.isoron.uhabits.core.ui.widgets.*;
|
import org.isoron.uhabits.core.ui.widgets.*;
|
||||||
|
import org.isoron.uhabits.inject.*;
|
||||||
import org.isoron.uhabits.intents.*;
|
import org.isoron.uhabits.intents.*;
|
||||||
import org.isoron.uhabits.widgets.*;
|
import org.isoron.uhabits.widgets.*;
|
||||||
import org.isoron.uhabits.widgets.activities.*;
|
import org.isoron.uhabits.widgets.activities.*;
|
||||||
|
|||||||
@@ -26,8 +26,9 @@ import androidx.annotation.Nullable;
|
|||||||
|
|
||||||
import com.google.auto.factory.*;
|
import com.google.auto.factory.*;
|
||||||
|
|
||||||
import org.isoron.androidbase.*;
|
import org.isoron.uhabits.*;
|
||||||
import org.isoron.uhabits.core.tasks.*;
|
import org.isoron.uhabits.core.tasks.*;
|
||||||
|
import org.isoron.uhabits.inject.*;
|
||||||
import org.isoron.uhabits.utils.*;
|
import org.isoron.uhabits.utils.*;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
|
* Copyright (C) 2016-2020 Álinson Santos Xavier <isoron@gmail.com>
|
||||||
*
|
*
|
||||||
* This file is part of Loop Habit Tracker.
|
* This file is part of Loop Habit Tracker.
|
||||||
*
|
*
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package org.isoron.androidbase.utils
|
package org.isoron.uhabits.utils
|
||||||
|
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
@@ -26,9 +26,7 @@ import android.util.*;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import org.isoron.androidbase.utils.*;
|
|
||||||
import org.isoron.uhabits.*;
|
import org.isoron.uhabits.*;
|
||||||
import org.isoron.uhabits.core.*;
|
|
||||||
import org.isoron.uhabits.core.Config;
|
import org.isoron.uhabits.core.Config;
|
||||||
import org.isoron.uhabits.core.utils.*;
|
import org.isoron.uhabits.core.utils.*;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2017 Álinson Santos Xavier <isoron@gmail.com>
|
* Copyright (C) 2016-2020 Álinson Santos Xavier <isoron@gmail.com>
|
||||||
*
|
*
|
||||||
* This file is part of Loop Habit Tracker.
|
* This file is part of Loop Habit Tracker.
|
||||||
*
|
*
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package org.isoron.androidbase.utils
|
package org.isoron.uhabits.utils
|
||||||
|
|
||||||
import android.os.Environment
|
import android.os.Environment
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
|
* Copyright (C) 2016-2020 Álinson Santos Xavier <isoron@gmail.com>
|
||||||
*
|
*
|
||||||
* This file is part of Loop Habit Tracker.
|
* This file is part of Loop Habit Tracker.
|
||||||
*
|
*
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package org.isoron.androidbase.utils
|
package org.isoron.uhabits.utils
|
||||||
|
|
||||||
import android.content.*
|
import android.content.*
|
||||||
import android.graphics.*
|
import android.graphics.*
|
||||||
@@ -3,7 +3,6 @@ package org.isoron.uhabits.utils
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import org.isoron.androidbase.utils.StyledResources
|
|
||||||
import org.isoron.uhabits.core.models.*
|
import org.isoron.uhabits.core.models.*
|
||||||
|
|
||||||
object PaletteUtils {
|
object PaletteUtils {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
|
* Copyright (C) 2016-2020 Álinson Santos Xavier <isoron@gmail.com>
|
||||||
*
|
*
|
||||||
* This file is part of Loop Habit Tracker.
|
* This file is part of Loop Habit Tracker.
|
||||||
*
|
*
|
||||||
@@ -16,13 +16,13 @@
|
|||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package org.isoron.androidbase.utils
|
package org.isoron.uhabits.utils
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.res.TypedArray
|
import android.content.res.TypedArray
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
import androidx.annotation.AttrRes
|
import androidx.annotation.AttrRes
|
||||||
import org.isoron.androidbase.R
|
import org.isoron.uhabits.R
|
||||||
|
|
||||||
class StyledResources(private val context: Context) {
|
class StyledResources(private val context: Context) {
|
||||||
|
|
||||||
@@ -33,7 +33,6 @@ import androidx.appcompat.app.*
|
|||||||
import androidx.appcompat.widget.Toolbar
|
import androidx.appcompat.widget.Toolbar
|
||||||
import androidx.core.content.*
|
import androidx.core.content.*
|
||||||
import com.google.android.material.snackbar.*
|
import com.google.android.material.snackbar.*
|
||||||
import org.isoron.androidbase.utils.*
|
|
||||||
import org.isoron.uhabits.*
|
import org.isoron.uhabits.*
|
||||||
import org.isoron.uhabits.core.models.*
|
import org.isoron.uhabits.core.models.*
|
||||||
import java.io.*
|
import java.io.*
|
||||||
@@ -148,7 +147,7 @@ fun View.setupToolbar(
|
|||||||
val res = StyledResources(context)
|
val res = StyledResources(context)
|
||||||
toolbar.title = title
|
toolbar.title = title
|
||||||
val toolbarColor = if (!res.getBoolean(R.attr.useHabitColorAsPrimary)) {
|
val toolbarColor = if (!res.getBoolean(R.attr.useHabitColorAsPrimary)) {
|
||||||
StyledResources(context).getColor(org.isoron.androidbase.R.attr.colorPrimary)
|
StyledResources(context).getColor(R.attr.colorPrimary)
|
||||||
} else {
|
} else {
|
||||||
color.toThemedAndroidColor(context)
|
color.toThemedAndroidColor(context)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import org.isoron.uhabits.core.preferences.*;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static android.appwidget.AppWidgetManager.*;
|
import static android.appwidget.AppWidgetManager.*;
|
||||||
import static org.isoron.androidbase.utils.InterfaceUtils.dpToPixels;
|
import static org.isoron.uhabits.utils.InterfaceUtils.dpToPixels;
|
||||||
|
|
||||||
public abstract class BaseWidgetProvider extends AppWidgetProvider
|
public abstract class BaseWidgetProvider extends AppWidgetProvider
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import org.isoron.uhabits.core.utils.*;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static android.appwidget.AppWidgetManager.*;
|
import static android.appwidget.AppWidgetManager.*;
|
||||||
import static org.isoron.androidbase.utils.InterfaceUtils.dpToPixels;
|
import static org.isoron.uhabits.utils.InterfaceUtils.dpToPixels;
|
||||||
import static org.isoron.uhabits.widgets.StackWidgetService.*;
|
import static org.isoron.uhabits.widgets.StackWidgetService.*;
|
||||||
|
|
||||||
public class StackWidgetService extends RemoteViewsService
|
public class StackWidgetService extends RemoteViewsService
|
||||||
|
|||||||
@@ -21,14 +21,13 @@ package org.isoron.uhabits.widgets
|
|||||||
|
|
||||||
import android.appwidget.*
|
import android.appwidget.*
|
||||||
import android.content.*
|
import android.content.*
|
||||||
import org.isoron.androidbase.*
|
|
||||||
import org.isoron.uhabits.core.commands.*
|
import org.isoron.uhabits.core.commands.*
|
||||||
import org.isoron.uhabits.core.preferences.*
|
import org.isoron.uhabits.core.preferences.*
|
||||||
import org.isoron.uhabits.core.tasks.*
|
import org.isoron.uhabits.core.tasks.*
|
||||||
import org.isoron.uhabits.core.utils.*
|
import org.isoron.uhabits.core.utils.*
|
||||||
|
import org.isoron.uhabits.inject.*
|
||||||
import org.isoron.uhabits.intents.*
|
import org.isoron.uhabits.intents.*
|
||||||
import javax.inject.*
|
import javax.inject.*
|
||||||
import kotlin.math.*
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A WidgetUpdater listens to the commands being executed by the application and
|
* A WidgetUpdater listens to the commands being executed by the application and
|
||||||
|
|||||||
@@ -26,15 +26,15 @@ import android.widget.*;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import org.isoron.androidbase.utils.*;
|
|
||||||
import org.isoron.uhabits.*;
|
import org.isoron.uhabits.*;
|
||||||
import org.isoron.uhabits.activities.habits.list.views.*;
|
import org.isoron.uhabits.activities.habits.list.views.*;
|
||||||
import org.isoron.uhabits.core.models.*;
|
import org.isoron.uhabits.core.models.*;
|
||||||
import org.isoron.uhabits.activities.common.views.*;
|
import org.isoron.uhabits.activities.common.views.*;
|
||||||
import org.isoron.uhabits.core.preferences.*;
|
import org.isoron.uhabits.core.preferences.*;
|
||||||
|
import org.isoron.uhabits.inject.*;
|
||||||
import org.isoron.uhabits.utils.*;
|
import org.isoron.uhabits.utils.*;
|
||||||
|
|
||||||
import static org.isoron.androidbase.utils.InterfaceUtils.getDimension;
|
import static org.isoron.uhabits.utils.InterfaceUtils.getDimension;
|
||||||
|
|
||||||
public class CheckmarkWidgetView extends HabitWidgetView {
|
public class CheckmarkWidgetView extends HabitWidgetView {
|
||||||
protected int activeColor;
|
protected int activeColor;
|
||||||
|
|||||||
@@ -29,12 +29,12 @@ import android.widget.*;
|
|||||||
|
|
||||||
import androidx.annotation.*;
|
import androidx.annotation.*;
|
||||||
|
|
||||||
import org.isoron.androidbase.utils.*;
|
|
||||||
import org.isoron.uhabits.*;
|
import org.isoron.uhabits.*;
|
||||||
|
import org.isoron.uhabits.utils.*;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static org.isoron.androidbase.utils.InterfaceUtils.*;
|
import static org.isoron.uhabits.utils.InterfaceUtils.*;
|
||||||
|
|
||||||
public abstract class HabitWidgetView extends FrameLayout
|
public abstract class HabitWidgetView extends FrameLayout
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -425,9 +425,4 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/toolbarShadow"
|
|
||||||
style="@style/ToolbarShadow"
|
|
||||||
android:layout_below="@id/toolbar"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|||||||
@@ -39,8 +39,4 @@
|
|||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_below="@id/toolbar"/>
|
android:layout_below="@id/toolbar"/>
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/toolbarShadow"
|
|
||||||
style="@style/ToolbarShadow"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|||||||
@@ -89,9 +89,4 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/toolbarShadow"
|
|
||||||
style="@style/ToolbarShadow"
|
|
||||||
android:layout_below="@id/toolbar"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
|
|
||||||
<attr name="widgetShadowAlpha" format="float"/>
|
<attr name="widgetShadowAlpha" format="float"/>
|
||||||
<attr name="widgetBackgroundAlpha" format="float"/>
|
<attr name="widgetBackgroundAlpha" format="float"/>
|
||||||
|
<attr name="palette" format="reference"/>
|
||||||
|
|
||||||
<!-- Pre-Lollipop -->
|
<!-- Pre-Lollipop -->
|
||||||
<attr name="cardBackground" format="reference"/>
|
<attr name="cardBackground" format="reference"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user