mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Increase target SDK to 29; update support library
This commit is contained in:
@@ -2,12 +2,12 @@ VERSION_CODE = 35
|
|||||||
VERSION_NAME = 1.7.8
|
VERSION_NAME = 1.7.8
|
||||||
|
|
||||||
MIN_SDK_VERSION = 19
|
MIN_SDK_VERSION = 19
|
||||||
TARGET_SDK_VERSION = 27
|
TARGET_SDK_VERSION = 29
|
||||||
COMPILE_SDK_VERSION = 27
|
COMPILE_SDK_VERSION = 29
|
||||||
|
|
||||||
DAGGER_VERSION = 2.25.2
|
DAGGER_VERSION = 2.25.2
|
||||||
KOTLIN_VERSION = 1.3.50
|
KOTLIN_VERSION = 1.3.50
|
||||||
SUPPORT_LIBRARY_VERSION = 27.1.1
|
SUPPORT_LIBRARY_VERSION = 28.0.0
|
||||||
AUTO_FACTORY_VERSION = 1.0-beta6
|
AUTO_FACTORY_VERSION = 1.0-beta6
|
||||||
BUILD_TOOLS_VERSION = 3.5.2
|
BUILD_TOOLS_VERSION = 3.5.2
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class NumberPickerFactory
|
|||||||
}
|
}
|
||||||
.create()
|
.create()
|
||||||
|
|
||||||
dialog.window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
|
dialog.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
|
||||||
|
|
||||||
InterfaceUtils.setupEditorAction(picker) { _, actionId, _ ->
|
InterfaceUtils.setupEditorAction(picker) { _, actionId, _ ->
|
||||||
if (actionId == EditorInfo.IME_ACTION_DONE)
|
if (actionId == EditorInfo.IME_ACTION_DONE)
|
||||||
|
|||||||
@@ -433,7 +433,7 @@ public class BarChart extends ScrollableChart
|
|||||||
primaryColor = Color.BLACK;
|
primaryColor = Color.BLACK;
|
||||||
textColor = res.getColor(R.attr.mediumContrastTextColor);
|
textColor = res.getColor(R.attr.mediumContrastTextColor);
|
||||||
gridColor = res.getColor(R.attr.lowContrastTextColor);
|
gridColor = res.getColor(R.attr.lowContrastTextColor);
|
||||||
backgroundColor = res.getColor(R.attr.cardBackgroundColor);
|
backgroundColor = res.getColor(R.attr.cardBgColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initDateFormats()
|
private void initDateFormats()
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ public class RingView extends View
|
|||||||
StyledResources res = new StyledResources(getContext());
|
StyledResources res = new StyledResources(getContext());
|
||||||
|
|
||||||
if (backgroundColor == null)
|
if (backgroundColor == null)
|
||||||
backgroundColor = res.getColor(R.attr.cardBackgroundColor);
|
backgroundColor = res.getColor(R.attr.cardBgColor);
|
||||||
|
|
||||||
if (inactiveColor == null)
|
if (inactiveColor == null)
|
||||||
inactiveColor = res.getColor(R.attr.highContrastTextColor);
|
inactiveColor = res.getColor(R.attr.highContrastTextColor);
|
||||||
|
|||||||
@@ -405,7 +405,7 @@ public class ScoreChart extends ScrollableChart
|
|||||||
primaryColor = Color.BLACK;
|
primaryColor = Color.BLACK;
|
||||||
textColor = res.getColor(R.attr.mediumContrastTextColor);
|
textColor = res.getColor(R.attr.mediumContrastTextColor);
|
||||||
gridColor = res.getColor(R.attr.lowContrastTextColor);
|
gridColor = res.getColor(R.attr.lowContrastTextColor);
|
||||||
backgroundColor = res.getColor(R.attr.cardBackgroundColor);
|
backgroundColor = res.getColor(R.attr.cardBgColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initDateFormats()
|
private void initDateFormats()
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ class ListHabitsScreen
|
|||||||
if (data == null) return
|
if (data == null) return
|
||||||
if (resultCode != Activity.RESULT_OK) return
|
if (resultCode != Activity.RESULT_OK) return
|
||||||
try {
|
try {
|
||||||
val inStream = activity.contentResolver.openInputStream(data.data)
|
val inStream = activity.contentResolver.openInputStream(data.data!!)
|
||||||
val cacheDir = activity.externalCacheDir
|
val cacheDir = activity.externalCacheDir
|
||||||
val tempFile = File.createTempFile("import", "", cacheDir)
|
val tempFile = File.createTempFile("import", "", cacheDir)
|
||||||
FileUtils.copy(inStream, tempFile)
|
FileUtils.copy(inStream, tempFile)
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class RingtoneManager
|
|||||||
var ringtoneUri: Uri? = null
|
var ringtoneUri: Uri? = null
|
||||||
val defaultRingtoneUri = Settings.System.DEFAULT_NOTIFICATION_URI
|
val defaultRingtoneUri = Settings.System.DEFAULT_NOTIFICATION_URI
|
||||||
val prefRingtoneUri = prefs.getString("pref_ringtone_uri",
|
val prefRingtoneUri = prefs.getString("pref_ringtone_uri",
|
||||||
defaultRingtoneUri.toString())
|
defaultRingtoneUri.toString())!!
|
||||||
if (prefRingtoneUri.isNotEmpty())
|
if (prefRingtoneUri.isNotEmpty())
|
||||||
ringtoneUri = Uri.parse(prefRingtoneUri)
|
ringtoneUri = Uri.parse(prefRingtoneUri)
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class SharedPreferencesStorage
|
|||||||
sharedPrefs.getLong(key, defValue)
|
sharedPrefs.getLong(key, defValue)
|
||||||
|
|
||||||
override fun getString(key: String, defValue: String): String =
|
override fun getString(key: String, defValue: String): String =
|
||||||
sharedPrefs.getString(key, defValue)
|
sharedPrefs.getString(key, defValue)!!
|
||||||
|
|
||||||
override fun onAttached(preferences: Preferences) {
|
override fun onAttached(preferences: Preferences) {
|
||||||
this.preferences = preferences
|
this.preferences = preferences
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ public class CheckmarkWidgetView extends HabitWidgetView
|
|||||||
|
|
||||||
case Checkmark.CHECKED_IMPLICITLY:
|
case Checkmark.CHECKED_IMPLICITLY:
|
||||||
text = getResources().getString(R.string.fa_check);
|
text = getResources().getString(R.string.fa_check);
|
||||||
bgColor = res.getColor(R.attr.cardBackgroundColor);
|
bgColor = res.getColor(R.attr.cardBgColor);
|
||||||
fgColor = res.getColor(R.attr.mediumContrastTextColor);
|
fgColor = res.getColor(R.attr.mediumContrastTextColor);
|
||||||
|
|
||||||
setShadowAlpha(0x00);
|
setShadowAlpha(0x00);
|
||||||
@@ -96,7 +96,7 @@ public class CheckmarkWidgetView extends HabitWidgetView
|
|||||||
case Checkmark.UNCHECKED:
|
case Checkmark.UNCHECKED:
|
||||||
default:
|
default:
|
||||||
text = getResources().getString(R.string.fa_times);
|
text = getResources().getString(R.string.fa_times);
|
||||||
bgColor = res.getColor(R.attr.cardBackgroundColor);
|
bgColor = res.getColor(R.attr.cardBgColor);
|
||||||
fgColor = res.getColor(R.attr.mediumContrastTextColor);
|
fgColor = res.getColor(R.attr.mediumContrastTextColor);
|
||||||
|
|
||||||
setShadowAlpha(0x00);
|
setShadowAlpha(0x00);
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public abstract class HabitWidgetView extends FrameLayout
|
|||||||
backgroundPaint = innerDrawable.getPaint();
|
backgroundPaint = innerDrawable.getPaint();
|
||||||
backgroundPaint.setShadowLayer(shadowRadius, shadowOffset, shadowOffset,
|
backgroundPaint.setShadowLayer(shadowRadius, shadowOffset, shadowOffset,
|
||||||
shadowColor);
|
shadowColor);
|
||||||
backgroundPaint.setColor(res.getColor(R.attr.cardBackgroundColor));
|
backgroundPaint.setColor(res.getColor(R.attr.cardBgColor));
|
||||||
backgroundPaint.setAlpha(backgroundAlpha);
|
backgroundPaint.setAlpha(backgroundAlpha);
|
||||||
|
|
||||||
frame = (ViewGroup) findViewById(R.id.frame);
|
frame = (ViewGroup) findViewById(R.id.frame);
|
||||||
|
|||||||
@@ -20,5 +20,5 @@
|
|||||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:color="?android:colorControlHighlight">
|
android:color="?android:colorControlHighlight">
|
||||||
|
|
||||||
<item android:drawable="?attr/cardBackgroundColor" />
|
<item android:drawable="?attr/cardBgColor" />
|
||||||
</ripple>
|
</ripple>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<style name="Card" parent="CardCommon">
|
<style name="Card" parent="CardCommon">
|
||||||
<item name="android:elevation">1dp</item>
|
<item name="android:elevation">1dp</item>
|
||||||
<item name="android:background">?attr/cardBackgroundColor</item>
|
<item name="android:background">?attr/cardBgColor</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="About.Item.Clickable" parent="About.Item">
|
<style name="About.Item.Clickable" parent="About.Item">
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
<attr name="windowBackgroundColor" format="reference"/>
|
<attr name="windowBackgroundColor" format="reference"/>
|
||||||
<attr name="cardBackgroundColor" format="reference"/>
|
<attr name="cardBgColor" format="reference"/>
|
||||||
<attr name="headerBackgroundColor" format="reference"/>
|
<attr name="headerBackgroundColor" format="reference"/>
|
||||||
<attr name="highlightedBackgroundColor" format="reference"/>
|
<attr name="highlightedBackgroundColor" format="reference"/>
|
||||||
<attr name="useHabitColorAsPrimary" format="boolean"/>
|
<attr name="useHabitColorAsPrimary" format="boolean"/>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<item name="colorPrimary">@color/blue_grey_800</item>
|
<item name="colorPrimary">@color/blue_grey_800</item>
|
||||||
<item name="colorPrimaryDark">@color/blue_grey_900</item>
|
<item name="colorPrimaryDark">@color/blue_grey_900</item>
|
||||||
<item name="colorAccent">?aboutScreenColor</item>
|
<item name="colorAccent">?aboutScreenColor</item>
|
||||||
<item name="cardBackgroundColor">@color/grey_50</item>
|
<item name="cardBgColor">@color/grey_50</item>
|
||||||
<item name="windowBackgroundColor">@color/grey_200</item>
|
<item name="windowBackgroundColor">@color/grey_200</item>
|
||||||
<item name="headerBackgroundColor">@color/grey_200</item>
|
<item name="headerBackgroundColor">@color/grey_200</item>
|
||||||
<item name="highlightedBackgroundColor">@color/grey_100</item>
|
<item name="highlightedBackgroundColor">@color/grey_100</item>
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
<item name="colorPrimary">@color/grey_950</item>
|
<item name="colorPrimary">@color/grey_950</item>
|
||||||
<item name="colorPrimaryDark">@color/black</item>
|
<item name="colorPrimaryDark">@color/black</item>
|
||||||
<item name="colorAccent">?aboutScreenColor</item>
|
<item name="colorAccent">?aboutScreenColor</item>
|
||||||
<item name="cardBackgroundColor">@color/grey_850</item>
|
<item name="cardBgColor">@color/grey_850</item>
|
||||||
<item name="windowBackgroundColor">@color/grey_900</item>
|
<item name="windowBackgroundColor">@color/grey_900</item>
|
||||||
<item name="headerBackgroundColor">@color/grey_900</item>
|
<item name="headerBackgroundColor">@color/grey_900</item>
|
||||||
<item name="highlightedBackgroundColor">@color/grey_800</item>
|
<item name="highlightedBackgroundColor">@color/grey_800</item>
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
|
|
||||||
<item name="colorPrimary">@color/black</item>
|
<item name="colorPrimary">@color/black</item>
|
||||||
<item name="colorPrimaryDark">@color/black</item>
|
<item name="colorPrimaryDark">@color/black</item>
|
||||||
<item name="cardBackgroundColor">@color/black</item>
|
<item name="cardBgColor">@color/black</item>
|
||||||
<item name="windowBackgroundColor">@color/black</item>
|
<item name="windowBackgroundColor">@color/black</item>
|
||||||
<item name="headerBackgroundColor">@color/black</item>
|
<item name="headerBackgroundColor">@color/black</item>
|
||||||
<item name="highlightedBackgroundColor">@color/black</item>
|
<item name="highlightedBackgroundColor">@color/black</item>
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="TransparentWidgetTheme" parent="AppBaseThemeDark">
|
<style name="TransparentWidgetTheme" parent="AppBaseThemeDark">
|
||||||
<item name="cardBackgroundColor">@color/grey_850</item>
|
<item name="cardBgColor">@color/grey_850</item>
|
||||||
|
|
||||||
<item name="highContrastTextColor">@color/white</item>
|
<item name="highContrastTextColor">@color/white</item>
|
||||||
<item name="mediumContrastTextColor">@color/white_aa</item>
|
<item name="mediumContrastTextColor">@color/white_aa</item>
|
||||||
|
|||||||
Reference in New Issue
Block a user