人升-如何使用坚果云配置WebDAV备份

本文会讲解如何用坚果云做WebDAV备份。


WebDAV备份

备份功能现在新增了对 WebDAV 协议的支持。

只要填写好了 WebDAV 地址、账号和密码之后,就能使用云备份和恢复功能了。

因为一些原因,暂时还是只支持手动备份。

并且由于恢复功能比较危险,也有用户因此损失过数据,该版本还新增了「撤销上次恢复」的功能。

使用方法

获取 WebDAV 地址、账号、密码

理论上任意支持WebDAV协议的服务都可以使用。

国内可以使用坚果云:

  1. 首先打开坚果云官网,注册并且登录账号。

  2. 点击右上角用户名账号信息

  3. 切换至安全选项。

  4. 在右边第三方应用管理处,点击新增应用,输入名称(如:LifeUp)

  5. 然后点击生成密码,保存此处的服务器地址账号密码等信息,然后进入应用内进行配置。

应用配置

侧边栏设置数据备份/恢复/清除WebDAV 配置,填写地址、账号密码等信息,并且测试通过。

随之就能在备份恢复操作上选择 WebDAV 了。

Android DialogFragment 相关代码段

设置软键盘弹出,自动上移

1
2
3
4
5
6
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
...
// 设置有软键盘时,窗口自动上移
dialog?.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
...
}

设置全屏显示

1
2
3
4
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setStyle(STYLE_NORMAL, R.style.Dialog_FullScreen)
}
1
2
3
4
5
<style name="Dialog.FullScreen" parent="Theme.AppCompat.Dialog">
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@color/transparent</item>
<item name="android:windowIsFloating">false</item>
</style>

子Fragment

1
2
3
4
5
private fun replace(fragment: androidx.fragment.app.Fragment) {
val transaction = childFragmentManager.beginTransaction()
transaction.replace(R.id.fragment, fragment)
transaction.commit()
}
阅读更多

Android动画相关代码段

ValueAnimator 实现TextView打字机效果

1
2
3
4
5
6
7
8
9
10
11
fun TextView.startTypeAnimation(duration: Long = 300) {
val originText = this.text
val valueAnimator = ValueAnimator.ofInt(0, originText.length)
valueAnimator.duration = duration
valueAnimator.interpolator = LinearInterpolator()
valueAnimator.addUpdateListener { animation ->
val length = animation.animatedValue as Int
this.text = originText.subSequence(0, length)
}
valueAnimator.start()
}

SpringInterpolator 简易的弹性插值器

1
2
3
4
5
6
7
8
/**
* 弹性插值器
*/
class SpringInterpolator(private val factor: Float) : Interpolator {
override fun getInterpolation(input: Float): Float {
return (2.0.pow((-10 * input).toDouble()) * sin((input - factor / 4) * (2 * Math.PI) / factor) + 1).toFloat()
}
}
阅读更多

LifeUp Release Log

Future Plan

  1. Custom Achievements
  2. Link Complete Reward of task to the inventory.
  3. Custom Exp of task
  4. Better settings of creating a task.
  5. Pomodoro
  6. Custom achievement complete condition
  7. Shop Item usage effect


Support Us

Support are always appreciated and help support the project. ❤️

With your support, we can get more time to developing and request more design resources to make it better. And there are also lots of ideas we want to achieve.

Share the application to your friends will also be a great help.


Release Log

1.75.2(Released at 2020/10/05)

  1. Default coin number setting of subtask
  2. Add over 100+ icons that can be selected as shop item/achievements icons
  3. add “Enable sound effect” settings
  4. Filter feelings by task content and better ui of filters
  5. Create pomodoro shortcuts
  6. Custom tomatoes selling prices
  7. Pomodoro page will keep screen on when counting down now
  8. Fixed some problems

1.75.1(Released at 2020/09/20)

  1. Fix lots bugs of 1.75.0

1.75.0(Released at 2020/09/16)

  1. Gamify pomodoro timer
  2. Custom task/list tag color
  3. WebDAV auto backup
  4. Hide modules settings
  5. Lots of improvements and fixes

1.74.2(Released at 2020/08/23)

  1. Portuguese Language

1.74.0(Released at 2020/08/13)

  1. ATM: Deposit & Withdrawal coins
  2. Now support that selecting shop items as task reward
  3. Shop item stock quantity setting
  4. Improve animation and fixed some bugs
  5. Add hint for Repeat Frequency setting
  6. More.. (update description later)

1.73.0(Released at 2020/07/26)

Features:

  • User achievements
  • Exp decrease animation
  • Edit the completed time of history record
  • Team subtask coin setting

Improvement:

  • Add coin sound effect

Fix:

  • The problem of losing subtask coin setting after repeating a task

1.72.1(Released at 2020/06/14)

Features:

  • Clear achievements data

Improvement:

  • Better display of shop item description

Fix:

  • The problem of editing pictures of shop items
  • The problem of editing the text of feelings

1.72.0(Released at 2020/06/11)

Features:

  • Subtask Remind
  • Subtask Coin
  • App Widget
    1. Opacity Setting
    2. Display Coin Number
    3. Display Count Task Input Dialog
  • Statistics Page Time Select
  • Inventory: Return Item
  • Add subtask support for team

Improvement:

  • Swipe a count task now will add 1 completed time instead of marking it as completed
  • Add Help Translate Button
  • Add Enabled Multi Exp Reward Setting for count task

Fix:

  • Fixed that transparent part of png picture showing black after cropping.
  • Fixed that App Widget not working well on some devices.
  • Fixed that Coin Number showing in the Detail Page when it’s set to 0.
  • Fixed that Swipe to Finish (no dialog mode) will make the page displayed incorrectly
  • Fixed that subtask cannot be created when click the ENTER button on some devices

1.71.3/1.71.4(Released at 2020/04/16)

Minor Fixes about icon and crash report

1.71.2(Released at 2020/04/14)

Features:

  • Turkish Language (thanks İbrahim DOĞAN for helping translation)

  • Customize task card background and opacity

  • Customize the action button text of inventory item
  • Feelings Favorites
  • Feelings Search

Improvement:

  • New Icon

  • Report type support multiple languages

  • Improve UI of the Settings Page
  • Improve the method of switching theme color and language. No need to restart the app to make it work.
  • Improve the crop picture page
  • Improve UI of the select list
  • Add shop item description showing on the shop item list page

Fixed:

  • Fixed bug that achievement unlock date incorrectly showing
  • Fixed bug that shop item picture showing empty when the file deleted.
  • Not clear the status of sub-tasks after single task become overdue.
  • Fixed bug that not enough space for Difficulty Degree to show in the Task Detail Page.
  • Fixed bug that after setting overdue task to finished, completed times of the next task not plus one.
  • Fixed bug that the max coin number not showing correctly in the task default settings.
  • Make the data backup/restore page scrollable.
  • Fixed that swipe to complete task not working well when fast swiping multiple tasks.
  • Now app widgets will show the Frozen status
  • Fixed bug that the progress bar on task page showing incorrect progress sometimes

Server Fixed(2020/4/13)

  • Fixed that report function not working

v1.71.1 (Released at 2020/03/17)

Improvement:

  • Better progress bar animation in task page

Fixed:

  • Fixed a bug that may cause crash when launching application on some devices
  • Fixed a bug about selecting photos
阅读更多

Android 5.0共享元素崩溃

简介

后台监测到了数个仅限于Android5的崩溃问题,日志大概如下:

1
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewParent android.view.View.getParent()' on a null object reference at android.view.ViewOverlay$OverlayViewGroup.add(ViewOverlay.java:164) at android.view.ViewGroupOverlay.add(ViewGroupOverlay.java:63) at android.app.EnterTransitionCoordinator.startRejectedAnimations(EnterTransitionCoordinator.java:598) at android.app.EnterTransitionCoordinator.startSharedElementTransition(EnterTransitionCoordinator.java:325) at android.app.EnterTransitionCoordinator.access$200(EnterTransitionCoordinator.java:42) at android.app.EnterTransitionCoordinator$5$1.run(EnterTransitionCoordinator.java:389) at android.app.ActivityTransitionCoordinator.startTransition(ActivityTransitionCoordinator.java:698) at android.app.EnterTransitionCoordinator$5.onPreDraw(EnterTransitionCoordinator.java:386) at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:847) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1985) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1077) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5845) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) at android.view.Choreographer.doCallbacks(Choreographer.java:580) at android.view.Choreographer.doFrame(Choreographer.java:550) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5272) at java.lang.reflect.Method.invoke(Method.java) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704)

查了下资料,发现这是 Android 5.0 系统的内置Bug。

在执行切换动画的时候,有一定条件下会导致崩溃问题。

并且,在 API level 22(即 Android 5.1)之后,这个 bug 已经被修复了。

最简单也是最有效的解决方法:

只有在API level 22的情况下,再执行切换动画。

其他

也有一些想要在 Android 5.0 继续使用切换动画,避免崩溃的解决方案。

这个 Android 系统 bug 与分享元素的选取排除(’rejected’)的处理有关。如果一个分享元素在执行动画的时候没有 attached to the window 就有可能被拒绝,也就是当 View 可见性为 GONE 的时候。

所以,解决方法就是在执行切换动画的时候,检查每一个共享元素View,并且将可见性改为 VISIBLE

Glenn Schmidt

参考

https://stackoverflow.com/questions/34658911/entertransitioncoordinator-causes-npe-in-android-5-0

人升更新介绍#1.70.1 | 02/22 简洁模式

大家好~欢迎查阅本次更新日志。

v1.70.1的版本已经于2月14号发布了,修复了v1.70.0的数个问题。遇到一些奇怪的问题的用户可以升级下版本。

今年以来,「人升」陆续地登上了更多的应用市场:应用宝、华为应用市场、豌豆荚、360应用市场、UC等。

现在可以在上述的一些平台进行应用更新了。

(之前仅登录了酷安、小米、魅族、Google Play市场。华为应用市场的之前被侵权了,这次也靠着大家的举报和申诉成功拿回来了管理权)

本文会简单介绍各个新功能,以及其使用方法。

比如讲解了如何用坚果云做WebDAV备份。

总览

  1. 简洁模式

  2. 图片附件

  3. WebDAV备份

  4. 自定义属性

  5. 更多改进

    5.1 “撤销”功能优化

    5.2 动态显示效果优化

  6. 详细更新日志

阅读更多