fix: 修复一些回退逻辑

This commit is contained in:
SunnyQjm committed 2020-06-12 14:20:33 +08:00
1 parent 62f3aee5ba
commit 69ec4e1c33
53 files changed
+26 -256

No files matched your search

+17 -17
View File
@@ -46,27 +46,27 @@ dependencies {
implementation "com.github.SunnyQjm.quickandroid:quick_android_easy_bar:$quick_android_version"
// 引入quick_android_mvp模块,来使用网络请求和MVP架构(可选)
implementation "com.github.SunnyQjm.quickandroid:quick_android_mvp:$quick_android_version"
// 引入quick_android_rx_permission模块,来接入链式调用动态请求权限的功能(可选)
implementation "com.github.SunnyQjm.quickandroid:quick_android_rx_permission:$quick_android_version"
// 引入quick_android_qrcode模块,来接入扫码功能(可选)
implementation "com.github.SunnyQjm.quickandroid:quick_android_qrcode:$quick_android_version"
// 引入quick_android_image_picker模块,来接入图片选择,图片裁剪等功能(可选)
implementation "com.github.SunnyQjm.quickandroid:quick_android_image_picker:$quick_android_version"
// 引入文件选择功能(调用系统的文件管理器)
implementation "com.github.SunnyQjm.quickandroid:quick_android_file_picker:$quick_android_version"
// // 引入quick_android_rx_permission模块,来接入链式调用动态请求权限的功能(可选)
// implementation "com.github.SunnyQjm.quickandroid:quick_android_rx_permission:$quick_android_version"
// // 引入quick_android_qrcode模块,来接入扫码功能(可选)
// implementation "com.github.SunnyQjm.quickandroid:quick_android_qrcode:$quick_android_version"
// // 引入quick_android_image_picker模块,来接入图片选择,图片裁剪等功能(可选)
// implementation "com.github.SunnyQjm.quickandroid:quick_android_image_picker:$quick_android_version"
// // 引入文件选择功能(调用系统的文件管理器)
// implementation "com.github.SunnyQjm.quickandroid:quick_android_file_picker:$quick_android_version"
// loading button
implementation 'br.com.simplepass:loading-button-android:2.2.0'
// 加载动画
implementation 'com.github.ybq:Android-SpinKit:1.4.0'
// // 加载动画
// implementation 'com.github.ybq:Android-SpinKit:1.4.0'
// android-banner
implementation 'com.github.zhpanvip:BannerViewPager:2.6.1'
// // android-banner
// implementation 'com.github.zhpanvip:BannerViewPager:2.6.1'
// SmartRefreshLayout
implementation "com.scwang.smartrefresh:SmartRefreshLayout:$smart_refresh_layout_version"
implementation "com.scwang.smartrefresh:SmartRefreshHeader:$smart_refresh_layout_version"
// implementation "com.scwang.smartrefresh:SmartRefreshHeader:$smart_refresh_layout_version"
// brvah
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.49-androidx'
@@ -74,11 +74,11 @@ dependencies {
// EventBus
implementation 'org.greenrobot:eventbus:3.1.1'
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version" // For Kotlin use kapt instead of annotationProcessor
// implementation "androidx.room:room-runtime:$room_version"
// annotationProcessor "androidx.room:room-compiler:$room_version" // For Kotlin use kapt instead of annotationProcessor
// optional - Kotlin Extensions and Coroutines support for Room
implementation "androidx.room:room-ktx:$room_version"
// // optional - Kotlin Extensions and Coroutines support for Room
// implementation "androidx.room:room-ktx:$room_version"
implementation 'com.qmuiteam:qmui:2.0.0-alpha10'
@@ -72,6 +72,7 @@ class LoginActivity : MINVpnBaseActivity<LoginActivityPresenter>(), LoginActivit
MINVpnAPI.updateUsername(username);
// 模拟登录完成
jumpTo(MainActivity::class.java)
finish()
}, 2000)
}
@@ -35,7 +35,7 @@ class MedicalRecordsFragment : MINVpnBaseFragment<MedicalRecordsFragmentPresente
private lateinit var adapter: MedicalRecordAdapter
override fun initView() {
easyBar.init(
mode = EasyBar.Mode.NONE,
mode = EasyBar.Mode._ICON,
titleRes = R.string.medical_records,
rightRes = R.drawable.input,
tinColor = R.color.white,
@@ -38,7 +38,7 @@ open class SportFragment : MINVpnBaseFragment<SportFragmentPresenter>(),
override fun initView() {
easyBar.init(
EasyBar.Mode._ICON,
EasyBar.Mode.NONE,
titleRes = R.string.sport,
rightRes = R.drawable.input,
rightCallback = {
@@ -5,13 +5,10 @@ import cn.tsr.personal_drug_management.activity.main.MainActivity
import cn.tsr.personal_drug_management.activity.base.MINVpnBaseActivity
import cn.tsr.personal_drug_management.activity.login.LoginActivity
import cn.qjm253.quick_android_base.GlideApp
import cn.qjm253.quick_android_base.QuickAndroid
import cn.qjm253.quick_android_base.extensions.jumpTo
import cn.qjm253.quick_android_base.extensions.scaleXY
import cn.qjm253.quick_android_rx_permission.createRxPermission
import cn.tsr.personal_drug_management.R
import cn.tsr.personal_drug_management.model.MINVpnAPI
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.activity_welcome.*
class WelcomeActivity : MINVpnBaseActivity<WelcomeActivityPresenter>(),
@@ -33,21 +30,12 @@ class WelcomeActivity : MINVpnBaseActivity<WelcomeActivityPresenter>(),
.into(imgLogo)
imgLogo.scaleXY(0.5f, 1.1f)
imgLogo.postDelayed({
QuickAndroid
.createRxPermission(this)
.request(arrayOf(android.Manifest.permission.WRITE_EXTERNAL_STORAGE))
.subscribe {
if (it.granted) {
if (MINVpnAPI.getUsername().isNotEmpty()) {
jumpTo(MainActivity::class.java)
} else {
jumpTo(LoginActivity::class.java)
}
finish()
} else {
finish()
}
}
if (MINVpnAPI.getUsername().isNotEmpty()) {
jumpTo(MainActivity::class.java)
} else {
jumpTo(LoginActivity::class.java)
}
finish()
}, 600)
}
@@ -1,10 +0,0 @@
package cn.tsr.personal_drug_management.model
import androidx.room.Database
import androidx.room.RoomDatabase
import cn.tsr.personal_drug_management.model.entity.MedicalRecord
@Database(entities = [MedicalRecord::class], version = 1)
abstract class AppDataBase : RoomDatabase() {
}
@@ -1,11 +1,5 @@
package cn.tsr.personal_drug_management.model.entity
import androidx.room.DatabaseConfiguration
import androidx.room.InvalidationTracker
import androidx.room.RoomDatabase
import androidx.sqlite.db.SupportSQLiteOpenHelper
data class MedicalRecord(
var medicalName: String,
var medicalEatMethod: String,
@@ -1,30 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

-13
View File
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/light_grey">
<item>
<shape android:shape="rectangle">
<corners android:radius="5dp" />
<solid android:color="@color/colorPrimary" />
<!--<stroke-->
<!--android:width="0.5dp"-->
<!--android:color="@color/imgBtn_stroke" />-->
</shape>
</item>
</ripple>
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<corners android:radius="80dp"/>
<solid android:color="@color/colorPrimary"/>
</shape>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

@@ -1,74 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#008577"
android:pathData="M0,0h108v108h-108z"/>
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>
@@ -1,34 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeWidth="1"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="rectangle"
xmlns:android="http://schemas.android.com/apk/res/android">
<!-- <corners-->
<!-- android:radius="10dp"/>-->
<solid
android:color="#eee"/>
</shape>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 825 B

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="rectangle"
xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="0.5dp"
android:color="@color/line_gray"/>
<corners
android:radius="5dp"/>
</shape>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/light_grey">
<item >
<shape android:shape="oval">
<corners android:radius="5dp" />
<solid android:color="@color/colorPrimary" />
</shape>
</item>
</ripple>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 998 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="rectangle"
xmlns:android="http://schemas.android.com/apk/res/android">
</shape>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

-3
View File
@@ -12,7 +12,4 @@
<color name="global_bg">#efefef</color>
<color name="text_color">#333</color>
<color name="approval_reject_color">#E42011</color>
<color name="approval_accepted_color">#20B354</color>
<color name="blue">#00f</color>
</resources>
-1
View File
@@ -2,6 +2,5 @@
<resources>
<dimen name="bottom_icon_height">28dp</dimen>
<dimen name="bar_item_height">48dp</dimen>
<dimen name="bar_icon_size">28dp</dimen>
<dimen name="bottom_icon_width">50dp</dimen>
</resources>
-1
View File
@@ -8,7 +8,6 @@
<string name="username">用户名</string>
<string name="password">密码</string>
<string name="register_now">现在注册</string>
<string name="forget_password">忘记密码</string>
<string name="register">注册</string>
<string name="phone_number">手机号</string>
<string name="send_verify_code">发送验证码</string>