Skip to content

Commit

Permalink
wearos adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipthelen committed Jul 7, 2023
1 parent fc97342 commit cb07544
Show file tree
Hide file tree
Showing 18 changed files with 641 additions and 36 deletions.
14 changes: 12 additions & 2 deletions fastlane/metadata/android/en-US/full_description.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Habitica is a free habit-building and productivity app that uses retro RPG elements to gamify your tasks and goals.
Use Habitica to help with ADHD, self care, New Year’s resolutions, household chores, work tasks, creative projects, fitness goals, back-to-school routines, and more!

How it works:
Create an avatar then add tasks, chores, or goals you’d like to work on. When you do something in real life, check it off in the app and receive gold, experience, and items that can be used in-game!

Features:
• Automatically repeating tasks scheduled for your daily, weekly, or monthly routines
• Flexible habit tracker for tasks you want to do multiple times a day or only once in awhile
Expand All @@ -17,8 +19,16 @@ Features:
• Reminders and widgets to help keep you on track
• Customizable color themes with dark and light mode
• Syncing across devices
• Brand new WearOS watch app available in version 4.0!

Want even more flexibility to take your tasks on the go? We have a Wear OS app on the watch!
Wear OS features:
• View, create, and complete Habites, Dailies, and To do’s
• Receive rewards for your efforts with experience, food, eggs, and potions
• Track your stats with dynamic progress bars
• Show off your stunning pixel avatar on the watch face


Habitica is an open-source app run by a small team that’s made better by the work of volunteers who contribute pixel art, translations, bug fixes, and more. If you’d like to contribute, reach out!
Community, privacy, and transparency are important to us. Your tasks are private and we don’t sell your personal data to third parties.
If you have any questions, feel free to send feedback to admin@habitica.com! And if you enjoy our app, we would really appreciate it if you would leave us a review.
If you have any questions, feel free to send feedback to admin@habitica.com! And if you enjoy our app, we would really appreciate it if you would leave us a review.
2 changes: 1 addition & 1 deletion version.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
NAME=4.2.3
CODE=6181
CODE=6201
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class LoginActivity : BaseActivity<ActivityLoginBinding, LoginViewModel>() {
binding.loginButton.isVisible = true
}
}
binding.root.smoothScrollTo(0, 0)
binding.scrollView.smoothScrollTo(0, 0)
}

override fun onCreate(savedInstanceState: Bundle?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() {
override fun onCreate(savedInstanceState: Bundle?) {
binding = ActivityMainBinding.inflate(layoutInflater)
super.onCreate(savedInstanceState)
binding.root.apply {
binding.recyclerView.apply {
layoutManager =
WearableLinearLayoutManager(this@MainActivity, HabiticaScrollingLayoutCallback())
adapter = this@MainActivity.adapter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SettingsActivity : BaseActivity<ActivitySettingsBinding, SettingsViewModel
override fun onCreate(savedInstanceState: Bundle?) {
binding = ActivitySettingsBinding.inflate(layoutInflater)
super.onCreate(savedInstanceState)
binding.root.apply {
binding.recyclerView.apply {
layoutManager =
WearableLinearLayoutManager(this@SettingsActivity, HabiticaScrollingLayoutCallback())
adapter = this@SettingsActivity.adapter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import android.content.Intent
import android.os.Bundle
import android.os.PersistableBundle
import androidx.activity.viewModels
import androidx.core.view.isVisible
import androidx.lifecycle.lifecycleScope
import com.habitrpg.android.habitica.databinding.ActivitySplashBinding
import com.habitrpg.wearos.habitica.ui.viewmodels.SplashViewModel
Expand Down Expand Up @@ -81,7 +80,6 @@ class SplashActivity : BaseActivity<ActivitySplashBinding, SplashViewModel>() {
} else {
stopAnimatingProgress()
}
binding.textView.isVisible = show
delay(90.toDuration(DurationUnit.SECONDS))
if (isActive) {
// the sync attempt has timed out
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.example.android.wearable.timetext

import android.view.View
import android.widget.TextView
import androidx.wear.widget.CurvedTextView

/**
* A wrapper around a [TextView] like object, that may not actually extend [TextView] (like a [CurvedTextView]).
*/
interface TextViewWrapper {
val view: View
var text: CharSequence?
var textColor: Int
}

/**
* A [TextViewWrapper] wrapping a [CurvedTextView].
*/
class CurvedTextViewWrapper(
override val view: CurvedTextView
) : TextViewWrapper {
override var text: CharSequence?
get() = view.text
set(value) {
view.text = value?.toString().orEmpty()
}

override var textColor: Int
get() = view.textColor
set(value) {
view.textColor = value
}
}

/**
* A [TextViewWrapper] wrapping a [TextView].
*/
class NormalTextViewWrapper(
override val view: TextView
) : TextViewWrapper {
override var text: CharSequence?
get() = view.text
set(value) {
view.text = value
}

override var textColor: Int
get() = view.currentTextColor
set(value) {
view.setTextColor(value)
}
}
Loading

0 comments on commit cb07544

Please sign in to comment.