add: 实现登录注册
No files matched your search
@@ -0,0 +1 @@
|
||||
/build
|
||||
@@ -0,0 +1,89 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion "29.0.3"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "cn.tsr.personal_drug_management"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 29
|
||||
versionCode 21
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation 'androidx.core:core-ktx:1.3.0'
|
||||
implementation "androidx.appcompat:appcompat:$androidx_base_version"
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
implementation "androidx.recyclerview:recyclerview:$androidx_base_version"
|
||||
|
||||
implementation "org.jetbrains.anko:anko-commons:$anko_version"
|
||||
|
||||
// 所有的模块都依赖于 quick_android_base (必选)
|
||||
implementation "com.github.SunnyQjm.quickandroid:quick_android_base:$quick_android_version"
|
||||
implementation "com.github.SunnyQjm.quickandroid:quick_android_custom_view:$quick_android_version"
|
||||
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"
|
||||
|
||||
// loading button
|
||||
implementation 'br.com.simplepass:loading-button-android:2.2.0'
|
||||
|
||||
// 加载动画
|
||||
implementation 'com.github.ybq:Android-SpinKit:1.4.0'
|
||||
|
||||
// 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"
|
||||
|
||||
// brvah
|
||||
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.49-androidx'
|
||||
|
||||
// EventBus
|
||||
implementation 'org.greenrobot:eventbus:3.1.1'
|
||||
|
||||
// MINSocket相关
|
||||
// https://mvnrepository.com/artifact/com.lmax/disruptor
|
||||
implementation group: 'com.lmax', name: 'disruptor', version: '3.4.2'
|
||||
|
||||
// 协程支持
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.3.5'
|
||||
|
||||
testImplementation 'junit:junit:4.13'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# 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
|
||||
@@ -0,0 +1,24 @@
|
||||
package cn.tsr.personal_drug_management
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ExampleInstrumentedTest {
|
||||
@Test
|
||||
fun useAppContext() {
|
||||
// Context of the app under test.
|
||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
assertEquals("cn.tsr.personal_drug_management", appContext.packageName)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:dist="http://schemas.android.com/apk/distribution"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="cn.tsr.personal_drug_management">
|
||||
|
||||
<dist:module dist:instant="true" />
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<application
|
||||
android:name=".App"
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/logo"
|
||||
android:label="@string/app_name"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:roundIcon="@drawable/logo"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
tools:ignore="GoogleAppIndexingWarning">
|
||||
<activity android:name=".activity.setting.SettingActivity" />
|
||||
<activity android:name=".activity.register.RegisterActivity" />
|
||||
<activity android:name=".activity.welcome.WelcomeActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.login.LoginActivity"
|
||||
android:launchMode="singleTask" />
|
||||
<activity
|
||||
android:name=".activity.main.MainActivity"
|
||||
android:launchMode="singleTask" />
|
||||
</application>
|
||||
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,12 @@
|
||||
package cn.tsr.personal_drug_management
|
||||
|
||||
import android.app.Application
|
||||
import cn.tsr.personal_drug_management.model.MINVpnAPI
|
||||
|
||||
class App : Application() {
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
|
||||
MINVpnAPI.init(this)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package cn.tsr.personal_drug_management.activity.base
|
||||
|
||||
import cn.tsr.personal_drug_management.activity.base.mvp.MINVpnBaseView
|
||||
import cn.qjm253.quick_android_base.extensions.toast
|
||||
import cn.qjm253.quick_android_mvp.base.activity.BaseQuickAndroidMVPActivity
|
||||
import cn.qjm253.quick_android_mvp.base.mvp.BasePresenter
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
|
||||
abstract class MINVpnBaseActivity <P: BasePresenter<*, *>>: BaseQuickAndroidMVPActivity<P>(),
|
||||
MINVpnBaseView {
|
||||
|
||||
|
||||
override fun showWarning(msg: String) {
|
||||
toast(msg)
|
||||
}
|
||||
|
||||
override fun showSuccess(msg: String) {
|
||||
toast(msg)
|
||||
}
|
||||
|
||||
override fun showError(msg: String) {
|
||||
toast(msg)
|
||||
}
|
||||
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
EventBus.getDefault().register(this)
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
super.onStop()
|
||||
EventBus.getDefault().unregister(this)
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onReceiveTest(test: String) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package cn.tsr.personal_drug_management.activity.base.mvp
|
||||
|
||||
import cn.qjm253.quick_android_mvp.base.mvp.BaseView
|
||||
|
||||
interface MINVpnBaseView : BaseView {
|
||||
fun showWarning(msg: String)
|
||||
|
||||
fun showSuccess(msg: String)
|
||||
|
||||
fun showError(msg: String)
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package cn.tsr.personal_drug_management.activity.login
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import cn.tsr.personal_drug_management.activity.base.MINVpnBaseActivity
|
||||
import cn.tsr.personal_drug_management.activity.register.RegisterActivity
|
||||
import cn.tsr.personal_drug_management.activity.setting.SettingActivity
|
||||
import cn.tsr.personal_drug_management.extensions.listenKeyboardVisible
|
||||
import cn.qjm253.quick_android_base.GlideApp
|
||||
import cn.qjm253.quick_android_base.extensions.*
|
||||
import cn.qjm253.quick_android_base.util.DisplayUtils
|
||||
import cn.qjm253.quick_android_easy_bar.EasyBar
|
||||
import cn.qjm253.quick_android_easy_bar.init
|
||||
import cn.tsr.personal_drug_management.R
|
||||
import cn.tsr.personal_drug_management.activity.main.MainActivity
|
||||
import kotlinx.android.synthetic.main.activity_login.*
|
||||
import kotlinx.android.synthetic.main.bar_item.*
|
||||
|
||||
class LoginActivity : MINVpnBaseActivity<LoginActivityPresenter>(), LoginActivityContract.View {
|
||||
|
||||
override fun onNewIntent(intent: Intent?) {
|
||||
super.onNewIntent(intent)
|
||||
intent?.let {
|
||||
val username = it.getStringExtra("username")
|
||||
etUsername.setText(username)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_login)
|
||||
|
||||
initView()
|
||||
}
|
||||
|
||||
|
||||
private fun initView() {
|
||||
easyBar.init(mode = EasyBar.Mode.ICON, title = getString(R.string.login), leftCallback = {
|
||||
onBackPressed()
|
||||
}, rightRes = R.drawable.setting, rightCallback = {
|
||||
jumpTo(SettingActivity::class.java)
|
||||
}, tinColor = R.color.white)
|
||||
|
||||
GlideApp.with(this)
|
||||
.load(R.drawable.logo)
|
||||
// .circleCrop()
|
||||
.into(imgLogo)
|
||||
|
||||
|
||||
tvRegisterNow.setOnClickListener {
|
||||
jumpTo(RegisterActivity::class.java)
|
||||
}
|
||||
|
||||
btnLogin.setBackgroundResource(R.drawable.button_shape_default)
|
||||
btnLogin.setOnClickListener {
|
||||
hideSoftKeyboard(btnLogin)
|
||||
btnLogin.startAnimation()
|
||||
|
||||
// TODO 这边执行登录逻辑
|
||||
|
||||
btnLogin.postDelayed({
|
||||
btnLogin.revertAnimation()
|
||||
|
||||
// 模拟登录完成
|
||||
jumpTo(MainActivity::class.java)
|
||||
}, 2000)
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 监听键盘是否弹起
|
||||
*/
|
||||
listenKeyboardVisible {
|
||||
if (it) {
|
||||
imgLogo.animer(
|
||||
imgLogo.scaleXAnimation(1f, 0.5f),
|
||||
imgLogo.scaleYAnimation(1f, 0.5f),
|
||||
imgLogo.transYAnimation(0f, -DisplayUtils.dp2px(this, 40).toFloat()),
|
||||
etUsername.transYAnimation(0f, -DisplayUtils.dp2px(this, 90).toFloat()),
|
||||
etPassword.transYAnimation(0f, -DisplayUtils.dp2px(this, 90).toFloat()),
|
||||
btnLogin.transYAnimation(0f, -DisplayUtils.dp2px(this, 90).toFloat()),
|
||||
duration = 200
|
||||
)
|
||||
} else {
|
||||
imgLogo.animer(
|
||||
imgLogo.scaleXAnimation(0.5f, 1f),
|
||||
imgLogo.scaleYAnimation(0.5f, 1f),
|
||||
imgLogo.transYAnimation(-DisplayUtils.dp2px(this, 40).toFloat(), 0f),
|
||||
etUsername.transYAnimation(-DisplayUtils.dp2px(this, 90).toFloat(), 0f),
|
||||
etPassword.transYAnimation(-DisplayUtils.dp2px(this, 90).toFloat(), 0f),
|
||||
btnLogin.transYAnimation(-DisplayUtils.dp2px(this, 90).toFloat(), 0f),
|
||||
duration = 200
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreatePresenter(): LoginActivityPresenter = LoginActivityPresenter(this)
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package cn.tsr.personal_drug_management.activity.login
|
||||
|
||||
import cn.tsr.personal_drug_management.activity.base.mvp.MINVpnBaseView
|
||||
import cn.qjm253.quick_android_mvp.base.mvp.BaseModel
|
||||
import cn.qjm253.quick_android_mvp.base.mvp.BasePresenter
|
||||
|
||||
interface LoginActivityContract {
|
||||
interface View : MINVpnBaseView {
|
||||
|
||||
}
|
||||
|
||||
interface Model : BaseModel {
|
||||
|
||||
}
|
||||
|
||||
abstract class Presenter : BasePresenter<View, Model>() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package cn.tsr.personal_drug_management.activity.login
|
||||
|
||||
class LoginActivityModel(private val mPresenter: LoginActivityPresenter) : LoginActivityContract.Model
|
||||
@@ -0,0 +1,12 @@
|
||||
package cn.tsr.personal_drug_management.activity.login
|
||||
|
||||
import cn.tsr.personal_drug_management.activity.login.LoginActivity
|
||||
import cn.tsr.personal_drug_management.activity.login.LoginActivityContract
|
||||
import cn.tsr.personal_drug_management.activity.login.LoginActivityModel
|
||||
|
||||
class LoginActivityPresenter(loginActivity: LoginActivity) : LoginActivityContract.Presenter() {
|
||||
init {
|
||||
mView = loginActivity
|
||||
mModel = LoginActivityModel(this)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package cn.tsr.personal_drug_management.activity.main
|
||||
|
||||
import android.os.Bundle
|
||||
import cn.tsr.personal_drug_management.activity.base.MINVpnBaseActivity
|
||||
import cn.tsr.personal_drug_management.activity.setting.SettingActivity
|
||||
import cn.qjm253.quick_android_base.extensions.alphaAnimation
|
||||
import cn.qjm253.quick_android_base.extensions.animer
|
||||
import cn.qjm253.quick_android_base.extensions.jumpTo
|
||||
import cn.qjm253.quick_android_easy_bar.EasyBar
|
||||
import cn.qjm253.quick_android_easy_bar.init
|
||||
import cn.tsr.personal_drug_management.R
|
||||
import com.github.ybq.android.spinkit.style.DoubleBounce
|
||||
import kotlinx.android.synthetic.main.activity_main.*
|
||||
import kotlinx.android.synthetic.main.bar_item.*
|
||||
|
||||
class MainActivity : MINVpnBaseActivity<MainActivityPresenter>(), MainActivityContract.View {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
|
||||
initView()
|
||||
}
|
||||
|
||||
private var isConnected = false
|
||||
|
||||
private fun initView() {
|
||||
easyBar.init(
|
||||
EasyBar.Mode.ICON,
|
||||
"主页",
|
||||
rightRes = R.drawable.setting,
|
||||
tinColor = R.color.white,
|
||||
leftRes = R.drawable.menu,
|
||||
rightCallback = {
|
||||
jumpTo(SettingActivity::class.java)
|
||||
}
|
||||
)
|
||||
|
||||
spinKit.setIndeterminateDrawable(DoubleBounce())
|
||||
btnConnect.setOnClickListener {
|
||||
btnConnect.isClickable = false
|
||||
btnConnect.animer(btnConnect.alphaAnimation(1.0f, 0.3f), duration = 0)
|
||||
|
||||
|
||||
// 模拟异步事件
|
||||
btnConnect.postDelayed({
|
||||
btnConnect.isClickable = true
|
||||
if (!isConnected) {
|
||||
btnConnect.setImageResource(R.drawable.security)
|
||||
} else {
|
||||
btnConnect.setImageResource(R.drawable.launch)
|
||||
}
|
||||
isConnected = !isConnected
|
||||
btnConnect.animer(btnConnect.alphaAnimation(0.3f, 1.0f), duration = 1000)
|
||||
}, 2000)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreatePresenter(): MainActivityPresenter =
|
||||
MainActivityPresenter(this)
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package cn.tsr.personal_drug_management.activity.main
|
||||
|
||||
import cn.tsr.personal_drug_management.activity.base.mvp.MINVpnBaseView
|
||||
import cn.qjm253.quick_android_mvp.base.mvp.BaseModel
|
||||
import cn.qjm253.quick_android_mvp.base.mvp.BasePresenter
|
||||
|
||||
interface MainActivityContract {
|
||||
interface View : MINVpnBaseView {
|
||||
|
||||
}
|
||||
|
||||
interface Model : BaseModel {
|
||||
|
||||
}
|
||||
|
||||
abstract class Presenter : BasePresenter<View, Model>() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package cn.tsr.personal_drug_management.activity.main
|
||||
|
||||
class MainActivityModel(val mPresenter: MainActivityPresenter) : MainActivityContract.Model
|
||||
@@ -0,0 +1,12 @@
|
||||
package cn.tsr.personal_drug_management.activity.main
|
||||
|
||||
import cn.tsr.personal_drug_management.activity.main.MainActivity
|
||||
import cn.tsr.personal_drug_management.activity.main.MainActivityContract
|
||||
import cn.tsr.personal_drug_management.activity.main.MainActivityModel
|
||||
|
||||
class MainActivityPresenter(mainActivity: MainActivity) : MainActivityContract.Presenter() {
|
||||
init {
|
||||
mView = mainActivity
|
||||
mModel = MainActivityModel(this)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
package cn.tsr.personal_drug_management.activity.register
|
||||
|
||||
import android.os.Bundle
|
||||
import cn.tsr.personal_drug_management.activity.base.MINVpnBaseActivity
|
||||
import cn.tsr.personal_drug_management.extensions.listenKeyboardVisible
|
||||
import cn.tsr.personal_drug_management.utils.CountDownUtil
|
||||
import cn.qjm253.quick_android_base.GlideApp
|
||||
import cn.qjm253.quick_android_base.extensions.*
|
||||
import cn.qjm253.quick_android_base.params.IntentParam
|
||||
import cn.qjm253.quick_android_base.util.AccountValidatorUtil
|
||||
import cn.qjm253.quick_android_base.util.DisplayUtils
|
||||
import cn.qjm253.quick_android_easy_bar.EasyBar
|
||||
import cn.qjm253.quick_android_easy_bar.init
|
||||
import cn.tsr.personal_drug_management.R
|
||||
import cn.tsr.personal_drug_management.activity.login.LoginActivity
|
||||
import kotlinx.android.synthetic.main.activity_register.*
|
||||
import kotlinx.android.synthetic.main.bar_item.*
|
||||
|
||||
class RegisterActivity : MINVpnBaseActivity<RegisterActivityPresenter>(),
|
||||
RegisterActivityContract.View {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_register)
|
||||
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
easyBar.init(mode = EasyBar.Mode.ICON_, titleRes = R.string.register, leftCallback = {
|
||||
onBackPressed()
|
||||
})
|
||||
|
||||
GlideApp.with(this)
|
||||
.load(R.drawable.logo)
|
||||
// .circleCrop()
|
||||
.into(imgLogo)
|
||||
|
||||
btnRegister.setBackgroundResource(R.drawable.button_shape_default)
|
||||
btnRegister.setOnClickListener {
|
||||
hideSoftKeyboard(btnRegister)
|
||||
btnRegister.startMorphAnimation()
|
||||
|
||||
// TODO 注册操作
|
||||
|
||||
btnRegister.postDelayed({
|
||||
btnRegister.revertAnimation()
|
||||
|
||||
// 模拟注册成功操作
|
||||
toast("注册成功")
|
||||
// 注册成功跳转到登录界面登录
|
||||
val username = etUsername.text.toString()
|
||||
jumpTo(
|
||||
LoginActivity::class.java, IntentParam()
|
||||
.add("username", username)
|
||||
)
|
||||
}, 2000)
|
||||
// QuickAndroid.createRxPermissioqjmn(this)
|
||||
// .request(
|
||||
// arrayOf(
|
||||
// Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||
// Manifest.permission.READ_EXTERNAL_STORAGE
|
||||
// )
|
||||
// )
|
||||
// .subscribe {
|
||||
// if (it.granted) {
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
tvSendVerifyCode.setOnClickListener {
|
||||
val phone = etPhoneNumber.text.toString()
|
||||
if (phone.isEmpty()) {
|
||||
showWarning("手机号不能为空")
|
||||
btnRegister.stopAnimation()
|
||||
return@setOnClickListener
|
||||
}
|
||||
if (!AccountValidatorUtil.isMobile(phone)) {
|
||||
showWarning("请输入有效的手机号")
|
||||
btnRegister.stopAnimation()
|
||||
return@setOnClickListener
|
||||
}
|
||||
CountDownUtil.startCountDown(60)
|
||||
.doOnSubscribe {
|
||||
// TODO 发送验证码操作
|
||||
|
||||
tvSendVerifyCode.isClickable = false
|
||||
}
|
||||
.subscribe({
|
||||
tvSendVerifyCode.text = "${it}s后可再次发送"
|
||||
}, {
|
||||
it.printStackTrace()
|
||||
}, {
|
||||
tvSendVerifyCode.isClickable = true
|
||||
tvSendVerifyCode.setText(R.string.send_verify_code)
|
||||
})
|
||||
}
|
||||
listenKeyboardVisible {
|
||||
if (it) {
|
||||
imgLogo.animer(
|
||||
imgLogo.scaleXAnimation(1f, 0.5f),
|
||||
imgLogo.scaleYAnimation(1f, 0.5f),
|
||||
imgLogo.transYAnimation(0f, -DisplayUtils.dp2px(this, 40).toFloat()),
|
||||
etUsername.transYAnimation(0f, -DisplayUtils.dp2px(this, 90).toFloat()),
|
||||
etPassword.transYAnimation(0f, -DisplayUtils.dp2px(this, 90).toFloat()),
|
||||
etRePassword.transYAnimation(0f, -DisplayUtils.dp2px(this, 90).toFloat()),
|
||||
etPhoneNumber.transYAnimation(0f, -DisplayUtils.dp2px(this, 90).toFloat()),
|
||||
etVerifyCode.transYAnimation(0f, -DisplayUtils.dp2px(this, 90).toFloat()),
|
||||
tvSendVerifyCode.transYAnimation(0f, -DisplayUtils.dp2px(this, 90).toFloat()),
|
||||
btnRegister.transYAnimation(0f, -DisplayUtils.dp2px(this, 90).toFloat()),
|
||||
duration = 200
|
||||
)
|
||||
} else {
|
||||
imgLogo.animer(
|
||||
imgLogo.scaleXAnimation(0.5f, 1f),
|
||||
imgLogo.scaleYAnimation(0.5f, 1f),
|
||||
imgLogo.transYAnimation(-DisplayUtils.dp2px(this, 40).toFloat(), 0f),
|
||||
etUsername.transYAnimation(-DisplayUtils.dp2px(this, 90).toFloat(), 0f),
|
||||
etPassword.transYAnimation(-DisplayUtils.dp2px(this, 90).toFloat(), 0f),
|
||||
etRePassword.transYAnimation(-DisplayUtils.dp2px(this, 90).toFloat(), 0f),
|
||||
etPhoneNumber.transYAnimation(-DisplayUtils.dp2px(this, 90).toFloat(), 0f),
|
||||
etVerifyCode.transYAnimation(-DisplayUtils.dp2px(this, 90).toFloat(), 0f),
|
||||
tvSendVerifyCode.transYAnimation(-DisplayUtils.dp2px(this, 90).toFloat(), 0f),
|
||||
btnRegister.transYAnimation(-DisplayUtils.dp2px(this, 90).toFloat(), 0f),
|
||||
duration = 200
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onCreatePresenter(): RegisterActivityPresenter = RegisterActivityPresenter(this)
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package cn.tsr.personal_drug_management.activity.register
|
||||
|
||||
import cn.tsr.personal_drug_management.activity.base.mvp.MINVpnBaseView
|
||||
import cn.qjm253.quick_android_mvp.base.mvp.BaseModel
|
||||
import cn.qjm253.quick_android_mvp.base.mvp.BasePresenter
|
||||
|
||||
interface RegisterActivityContract {
|
||||
interface View : MINVpnBaseView {
|
||||
|
||||
}
|
||||
|
||||
interface Model : BaseModel {
|
||||
|
||||
}
|
||||
|
||||
abstract class Presenter : BasePresenter<View, Model>() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package cn.tsr.personal_drug_management.activity.register
|
||||
|
||||
class RegisterActivityModel(private val mPresenter: RegisterActivityPresenter) : RegisterActivityContract.Model
|
||||
@@ -0,0 +1,13 @@
|
||||
package cn.tsr.personal_drug_management.activity.register
|
||||
|
||||
import cn.tsr.personal_drug_management.activity.register.RegisterActivity
|
||||
import cn.tsr.personal_drug_management.activity.register.RegisterActivityContract
|
||||
import cn.tsr.personal_drug_management.activity.register.RegisterActivityModel
|
||||
|
||||
class RegisterActivityPresenter(registerActivity: RegisterActivity)
|
||||
: RegisterActivityContract.Presenter() {
|
||||
init {
|
||||
mView = registerActivity
|
||||
mModel = RegisterActivityModel(this)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package cn.tsr.personal_drug_management.activity.setting
|
||||
|
||||
import android.os.Bundle
|
||||
import cn.tsr.personal_drug_management.activity.base.MINVpnBaseActivity
|
||||
import cn.tsr.personal_drug_management.model.MINVpnAPI
|
||||
import cn.qjm253.quick_android_easy_bar.EasyBar
|
||||
import cn.qjm253.quick_android_easy_bar.init
|
||||
import cn.tsr.personal_drug_management.R
|
||||
import kotlinx.android.synthetic.main.activity_setting.*
|
||||
import kotlinx.android.synthetic.main.bar_item.*
|
||||
import org.jetbrains.anko.toast
|
||||
|
||||
class SettingActivity : MINVpnBaseActivity<SettingActivityPresenter>(),
|
||||
SettingActivityContract.View {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_setting)
|
||||
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
easyBar.init(mode = EasyBar.Mode.ICON_, titleRes = R.string.setting, leftCallback = {
|
||||
onBackPressed()
|
||||
})
|
||||
|
||||
btnSaveSetting.setBackgroundResource(R.drawable.button_shape_default)
|
||||
|
||||
// 获取本地的设置填充
|
||||
etIpAddress.setText(MINVpnAPI.getMirIpAddress())
|
||||
etPort.setText("${MINVpnAPI.getMirPort()}")
|
||||
etServicePrefix.setText(MINVpnAPI.getServicePrefix())
|
||||
etBlockChainIp.setText(MINVpnAPI.getBlockChainIpAddress())
|
||||
etBlockChainPort.setText("${MINVpnAPI.getBlockChainPort()}")
|
||||
|
||||
btnSaveSetting.setOnClickListener {
|
||||
btnSaveSetting.startAnimation()
|
||||
val mirIpAddress = etIpAddress.text.toString()
|
||||
val mirPort = etPort.text.toString().toInt()
|
||||
val blockChainIpAddress = etBlockChainIp.text.toString()
|
||||
val blockChainPort = etBlockChainPort.text.toString().toInt()
|
||||
val servicePrefix = etServicePrefix.text.toString()
|
||||
|
||||
MINVpnAPI.updateBlockChainIpAddress(blockChainIpAddress)
|
||||
MINVpnAPI.updateBlockChainPort(blockChainPort)
|
||||
MINVpnAPI.updateMirIpAddress(mirIpAddress)
|
||||
MINVpnAPI.updateMirPort(mirPort)
|
||||
MINVpnAPI.updateServicePrefix(servicePrefix)
|
||||
btnSaveSetting.postDelayed({
|
||||
btnSaveSetting.revertAnimation()
|
||||
toast("保存成功")
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onCreatePresenter(): SettingActivityPresenter =
|
||||
SettingActivityPresenter(this)
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package cn.tsr.personal_drug_management.activity.setting
|
||||
|
||||
import cn.tsr.personal_drug_management.activity.base.mvp.MINVpnBaseView
|
||||
import cn.qjm253.quick_android_mvp.base.mvp.BaseModel
|
||||
import cn.qjm253.quick_android_mvp.base.mvp.BasePresenter
|
||||
|
||||
interface SettingActivityContract {
|
||||
interface View : MINVpnBaseView {
|
||||
|
||||
}
|
||||
|
||||
interface Model : BaseModel {
|
||||
|
||||
}
|
||||
|
||||
abstract class Presenter : BasePresenter<View, Model>() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package cn.tsr.personal_drug_management.activity.setting
|
||||
|
||||
class SettingActivityModel(val mPresenter: SettingActivityPresenter) :
|
||||
SettingActivityContract.Model {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package cn.tsr.personal_drug_management.activity.setting
|
||||
|
||||
import cn.tsr.personal_drug_management.activity.setting.SettingActivity
|
||||
import cn.tsr.personal_drug_management.activity.setting.SettingActivityContract
|
||||
import cn.tsr.personal_drug_management.activity.setting.SettingActivityModel
|
||||
|
||||
class SettingActivityPresenter(settingActivity: SettingActivity) : SettingActivityContract.Presenter() {
|
||||
init {
|
||||
mView = settingActivity
|
||||
mModel = SettingActivityModel(this)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package cn.tsr.personal_drug_management.activity.welcome
|
||||
|
||||
import android.os.Bundle
|
||||
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 kotlinx.android.synthetic.main.activity_welcome.*
|
||||
|
||||
class WelcomeActivity : MINVpnBaseActivity<WelcomeActivityPresenter>(),
|
||||
WelcomeActivityContract.View {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_welcome)
|
||||
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
GlideApp.with(this)
|
||||
.load(R.drawable.logo)
|
||||
// .circleCrop()
|
||||
.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(false) {
|
||||
jumpTo(MainActivity::class.java)
|
||||
} else {
|
||||
jumpTo(LoginActivity::class.java)
|
||||
}
|
||||
finish()
|
||||
} else {
|
||||
finish()
|
||||
}
|
||||
}
|
||||
}, 600)
|
||||
}
|
||||
|
||||
override fun onCreatePresenter(): WelcomeActivityPresenter = WelcomeActivityPresenter(this)
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package cn.tsr.personal_drug_management.activity.welcome
|
||||
|
||||
import cn.tsr.personal_drug_management.activity.base.mvp.MINVpnBaseView
|
||||
import cn.qjm253.quick_android_mvp.base.mvp.BaseModel
|
||||
import cn.qjm253.quick_android_mvp.base.mvp.BasePresenter
|
||||
|
||||
interface WelcomeActivityContract {
|
||||
interface View : MINVpnBaseView {
|
||||
|
||||
}
|
||||
|
||||
interface Model : BaseModel {
|
||||
|
||||
}
|
||||
|
||||
abstract class Presenter : BasePresenter<View, Model>() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package cn.tsr.personal_drug_management.activity.welcome
|
||||
|
||||
class WelcomeActivityModel(private val mPresenter: WelcomeActivityPresenter) : WelcomeActivityContract.Model
|
||||
@@ -0,0 +1,13 @@
|
||||
package cn.tsr.personal_drug_management.activity.welcome
|
||||
|
||||
import cn.tsr.personal_drug_management.activity.welcome.WelcomeActivity
|
||||
import cn.tsr.personal_drug_management.activity.welcome.WelcomeActivityContract
|
||||
import cn.tsr.personal_drug_management.activity.welcome.WelcomeActivityModel
|
||||
|
||||
class WelcomeActivityPresenter(welcomeActivity: WelcomeActivity) :
|
||||
WelcomeActivityContract.Presenter() {
|
||||
init {
|
||||
mView = welcomeActivity
|
||||
mModel = WelcomeActivityModel(this)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package cn.tsr.personal_drug_management.extensions
|
||||
|
||||
import android.app.Activity
|
||||
import android.graphics.Rect
|
||||
import android.view.View
|
||||
import cn.qjm253.quick_android_base.util.DisplayUtils
|
||||
|
||||
fun Activity.listenKeyboardVisible(onChange: (isOpen: Boolean) -> Unit) {
|
||||
val contentView = findViewById<View>(android.R.id.content)
|
||||
val activityRoot = window.decorView
|
||||
|
||||
val rectR = Rect()
|
||||
var lastOpenState = false
|
||||
val visibleThreshold = DisplayUtils.dp2px(this, 100)
|
||||
contentView.viewTreeObserver.addOnGlobalLayoutListener {
|
||||
activityRoot.getWindowVisibleDisplayFrame(rectR)
|
||||
val heightDiff = activityRoot.rootView.height - rectR.height()
|
||||
|
||||
// 键盘是否弹出
|
||||
val isOpen = heightDiff > visibleThreshold
|
||||
if (lastOpenState != isOpen) {
|
||||
onChange(isOpen)
|
||||
lastOpenState = isOpen
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package cn.tsr.personal_drug_management.extensions
|
||||
|
||||
import android.content.Context
|
||||
import androidx.annotation.ColorRes
|
||||
import androidx.core.content.ContextCompat
|
||||
|
||||
|
||||
fun Context.easyGetColor(@ColorRes id: Int): Int {
|
||||
return ContextCompat.getColor(this, id)
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package cn.tsr.personal_drug_management.extensions
|
||||
|
||||
import android.net.Uri
|
||||
import android.widget.ImageView
|
||||
import androidx.annotation.DrawableRes
|
||||
import cn.qjm253.quick_android_base.GlideApp
|
||||
import java.io.File
|
||||
|
||||
|
||||
fun ImageView.loadFile(
|
||||
file: File,
|
||||
circleCrop: Boolean = false,
|
||||
centerCrop: Boolean = false,
|
||||
centerInside: Boolean = false
|
||||
) {
|
||||
val gr = GlideApp.with(context)
|
||||
.load(file)
|
||||
if (circleCrop)
|
||||
gr.circleCrop()
|
||||
if (centerCrop)
|
||||
gr.centerCrop()
|
||||
if (centerInside)
|
||||
gr.centerInside()
|
||||
gr.into(this)
|
||||
}
|
||||
|
||||
///**
|
||||
// * NDN的方式加载网络图片,并渲染到ImageView上
|
||||
// */
|
||||
//@SuppressLint("CheckResult")
|
||||
//fun ImageView.loadNDNFile(
|
||||
// fileName: String, forceRefresh: Boolean = false,
|
||||
// circleCrop: Boolean = false,
|
||||
// centerCrop: Boolean = false,
|
||||
// centerInside: Boolean = false
|
||||
//) {
|
||||
// val image = FileUtils.generatePictureFile(fileName.encodeToMD5())
|
||||
// if (image.exists() && !forceRefresh) {
|
||||
// loadFile(image, circleCrop, centerCrop, centerInside)
|
||||
// } else {
|
||||
// API.downloadFile(fileName)
|
||||
// .compose(RxSchedulersHelper.io_main())
|
||||
// .subscribe({
|
||||
// it.toJson().i()
|
||||
// loadFile(it.file, circleCrop, centerCrop, centerInside)
|
||||
// }, {
|
||||
// image.deleteOnExit()
|
||||
// it.printStackTrace()
|
||||
// })
|
||||
// }
|
||||
//}
|
||||
|
||||
fun ImageView.load(@DrawableRes res: Int) {
|
||||
GlideApp.with(this)
|
||||
.load(res)
|
||||
.into(this)
|
||||
}
|
||||
|
||||
fun ImageView.load(uri: Uri) {
|
||||
GlideApp.with(this)
|
||||
.load(uri)
|
||||
.into(this)
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package cn.tsr.personal_drug_management.model
|
||||
|
||||
import android.app.Application
|
||||
import android.content.Context
|
||||
import cn.qjm253.quick_android_base.util.SpUtils
|
||||
|
||||
object MINVpnAPI {
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//////// 设置相关
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
private const val SP_LOCAL_SETTING_MIR_IP_ADDRESS = "SP_LOCAL_SETTING_MIR_IP_ADDRESS"
|
||||
private const val SP_LOCAL_SETTING_MIR_PORT = "SP_LOCAL_SETTING_MIR_PORT"
|
||||
private const val SP_LOCAL_SETTING_SERVICE_PREFIX = "SP_LOCAL_SETTING_SERVICE_PREFIX"
|
||||
private const val SP_LOCAL_SETTING_BLOCK_CHAIN_IP_ADDRESS =
|
||||
"SP_LOCAL_SETTING_BLOCK_CHAIN_IP_ADDRESS"
|
||||
private const val SP_LOCAL_SETTING_BLOCK_CHAIN_PORT = "SP_LOCAL_SETTING_BLOCK_CHAIN_PORT"
|
||||
|
||||
private var mirIpAddress: String = "127.0.0.1"
|
||||
private var mirPort: Int = 6363
|
||||
private var servicePrefix: String = "/min/vpn"
|
||||
private var blockChainIpAddress: String = "127.0.0.1"
|
||||
private var blockChainPort: Int = 9748
|
||||
|
||||
private lateinit var context: Context
|
||||
|
||||
|
||||
fun init(applicationContext: Application) {
|
||||
context = applicationContext
|
||||
SpUtils.getAll(applicationContext)?.forEach {
|
||||
when (it.key) {
|
||||
SP_LOCAL_SETTING_MIR_IP_ADDRESS -> mirIpAddress = it.value as String
|
||||
SP_LOCAL_SETTING_MIR_PORT -> mirPort = it.value as Int
|
||||
SP_LOCAL_SETTING_SERVICE_PREFIX -> servicePrefix = it.value as String
|
||||
SP_LOCAL_SETTING_BLOCK_CHAIN_IP_ADDRESS -> blockChainIpAddress = it.value as String
|
||||
SP_LOCAL_SETTING_BLOCK_CHAIN_PORT -> blockChainPort = it.value as Int
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
////// 设置相关获取和更新
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
fun getMirIpAddress() = mirIpAddress
|
||||
|
||||
fun getMirPort() = mirPort
|
||||
|
||||
fun getServicePrefix() = servicePrefix
|
||||
|
||||
fun getBlockChainIpAddress() = blockChainIpAddress
|
||||
|
||||
fun getBlockChainPort() = blockChainPort
|
||||
|
||||
fun updateMirIpAddress(mirIpAddress: String) {
|
||||
MINVpnAPI.mirIpAddress = mirIpAddress
|
||||
SpUtils.put(context, SP_LOCAL_SETTING_MIR_IP_ADDRESS, mirIpAddress)
|
||||
}
|
||||
|
||||
fun updateMirPort(mirPort: Int) {
|
||||
MINVpnAPI.mirPort = mirPort
|
||||
SpUtils.put(context, SP_LOCAL_SETTING_MIR_PORT, mirPort)
|
||||
}
|
||||
|
||||
fun updateServicePrefix(servicePrefix: String) {
|
||||
MINVpnAPI.servicePrefix = servicePrefix
|
||||
SpUtils.put(context, SP_LOCAL_SETTING_SERVICE_PREFIX, servicePrefix)
|
||||
}
|
||||
|
||||
fun updateBlockChainIpAddress(blockChainIpAddress: String) {
|
||||
MINVpnAPI.blockChainIpAddress = blockChainIpAddress
|
||||
SpUtils.put(context, SP_LOCAL_SETTING_BLOCK_CHAIN_IP_ADDRESS, blockChainIpAddress)
|
||||
}
|
||||
|
||||
fun updateBlockChainPort(blockChainPort: Int) {
|
||||
MINVpnAPI.blockChainPort = blockChainPort
|
||||
SpUtils.put(context, SP_LOCAL_SETTING_BLOCK_CHAIN_PORT, blockChainPort)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package cn.tsr.personal_drug_management.utils
|
||||
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
object CountDownUtil {
|
||||
fun startCountDown(countTime: Int): Observable<Long> {
|
||||
var totalTime = 0
|
||||
if (countTime > 0)
|
||||
totalTime = countTime
|
||||
|
||||
return Observable.interval(0, 1, TimeUnit.SECONDS)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.map {
|
||||
return@map totalTime - it
|
||||
}
|
||||
.take(countTime + 1L)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<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>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
@@ -0,0 +1,13 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="40dp"/>
|
||||
<solid android:color="@color/colorPrimary"/>
|
||||
</shape>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 808 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
@@ -0,0 +1,74 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,34 @@
|
||||
<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>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
@@ -0,0 +1,8 @@
|
||||
<?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>
|
||||
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/login_edit_text_bg_selected" android:state_focused="true" />
|
||||
<item android:drawable="@drawable/login_edit_text_bg_unselected" />
|
||||
</selector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="5dp" />
|
||||
<stroke
|
||||
android:width="0.5dp"
|
||||
android:color="@color/colorPrimary" />
|
||||
</shape>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="5dp" />
|
||||
<stroke
|
||||
android:width="0.5dp"
|
||||
android:color="@color/light_grey" />
|
||||
</shape>
|
||||
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 977 B |
|
After Width: | Height: | Size: 705 B |
|
After Width: | Height: | Size: 825 B |
@@ -0,0 +1,9 @@
|
||||
<?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>
|
||||
|
After Width: | Height: | Size: 3.7 KiB |
@@ -0,0 +1,10 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/ripple_mask">
|
||||
<item >
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="5dp" />
|
||||
<solid android:color="@color/white" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
|
After Width: | Height: | Size: 779 B |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 998 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="rectangle"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
</shape>
|
||||
|
After Width: | Height: | Size: 3.4 KiB |
@@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="cn.tsr.personal_drug_management.activity.login.LoginActivity">
|
||||
<include
|
||||
android:id="@+id/include"
|
||||
layout="@layout/bar_item" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgLogo"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="30dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/include"
|
||||
app:srcCompat="@drawable/logo" />
|
||||
|
||||
<cn.qjm253.quick_android_custom_view.other.ClearAbleEditText
|
||||
android:id="@+id/etUsername"
|
||||
style="@style/login_et_style"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:hint="@string/username"
|
||||
app:drawable_height="20dp"
|
||||
app:drawable_width="20dp"
|
||||
app:focusedTinColor="@color/colorPrimary"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imgLogo"
|
||||
app:left_drawable="@drawable/mine"
|
||||
app:right_drawable="@drawable/delete"
|
||||
app:tinColor="@color/light_grey" />
|
||||
|
||||
<cn.qjm253.quick_android_custom_view.other.ClearAbleEditText
|
||||
android:id="@+id/etPassword"
|
||||
style="@style/login_et_style"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:hint="@string/password"
|
||||
android:inputType="textPassword"
|
||||
app:drawable_height="20dp"
|
||||
app:drawable_width="20dp"
|
||||
app:focusedTinColor="@color/colorPrimary"
|
||||
app:layout_constraintEnd_toEndOf="@+id/etUsername"
|
||||
app:layout_constraintStart_toStartOf="@+id/etUsername"
|
||||
app:layout_constraintTop_toBottomOf="@+id/etUsername"
|
||||
app:left_drawable="@drawable/password"
|
||||
app:right_drawable="@drawable/delete"
|
||||
app:tinColor="@color/light_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRegisterNow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:padding="5dp"
|
||||
android:text="@string/register_now"
|
||||
android:textColor="@color/colorPrimary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tvForgetPassword"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginEnd="35dp"-->
|
||||
<!-- android:layout_marginBottom="15dp"-->
|
||||
<!-- android:padding="5dp"-->
|
||||
<!-- android:text="@string/forget_password"-->
|
||||
<!-- android:textColor="@color/colorPrimary"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent" />-->
|
||||
|
||||
|
||||
<br.com.simplepass.loadingbutton.customViews.CircularProgressButton
|
||||
android:id="@+id/btnLogin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:background="@drawable/button_shape_default"
|
||||
android:text="@string/login"
|
||||
android:textColor="@color/white"
|
||||
app:finalCornerAngle="40dp"
|
||||
app:initialCornerAngle="0dp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/etPassword"
|
||||
app:layout_constraintRight_toRightOf="@id/etPassword"
|
||||
app:layout_constraintTop_toBottomOf="@id/etPassword"
|
||||
app:spinning_bar_color="#FFFFFF"
|
||||
app:spinning_bar_padding="4dp"
|
||||
app:spinning_bar_width="3dp" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activity.main.MainActivity">
|
||||
|
||||
<include
|
||||
android:id="@+id/include2"
|
||||
layout="@layout/bar_item"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.github.ybq.android.spinkit.SpinKitView
|
||||
android:id="@+id/spinKit"
|
||||
style="@style/SpinKitView.Large.Circle"
|
||||
android:minWidth="120dp"
|
||||
android:minHeight="120dp"
|
||||
android:maxWidth="120dp"
|
||||
android:maxHeight="120dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
app:SpinKit_Color="@color/colorPrimary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/include2" />
|
||||
|
||||
<cn.qjm253.quick_android_custom_view.tin_view.TinImageView
|
||||
android:id="@+id/btnConnect"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:background="@drawable/ripple_bg_circle_color_primary"
|
||||
android:padding="15dp"
|
||||
android:src="@drawable/launch"
|
||||
android:text="@string/login"
|
||||
android:tint="@color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/include2" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,144 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activity.register.RegisterActivity">
|
||||
|
||||
<include
|
||||
android:id="@+id/include"
|
||||
layout="@layout/bar_item" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgLogo"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="30dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/include"
|
||||
app:srcCompat="@drawable/logo" />
|
||||
|
||||
|
||||
<cn.qjm253.quick_android_custom_view.other.ClearAbleEditText
|
||||
android:id="@+id/etUsername"
|
||||
style="@style/login_et_style"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:hint="@string/username"
|
||||
app:drawable_height="20dp"
|
||||
app:drawable_width="20dp"
|
||||
app:focusedTinColor="@color/colorPrimary"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imgLogo"
|
||||
app:left_drawable="@drawable/mine"
|
||||
app:right_drawable="@drawable/delete"
|
||||
app:tinColor="@color/light_grey" />
|
||||
|
||||
<cn.qjm253.quick_android_custom_view.other.ClearAbleEditText
|
||||
android:id="@+id/etPassword"
|
||||
style="@style/login_et_style"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:hint="@string/password"
|
||||
android:inputType="textPassword"
|
||||
app:drawable_height="20dp"
|
||||
app:drawable_width="20dp"
|
||||
app:focusedTinColor="@color/colorPrimary"
|
||||
app:layout_constraintEnd_toEndOf="@+id/etUsername"
|
||||
app:layout_constraintStart_toStartOf="@+id/etUsername"
|
||||
app:layout_constraintTop_toBottomOf="@+id/etUsername"
|
||||
app:left_drawable="@drawable/password"
|
||||
app:right_drawable="@drawable/delete"
|
||||
app:tinColor="@color/light_grey" />
|
||||
|
||||
<cn.qjm253.quick_android_custom_view.other.ClearAbleEditText
|
||||
android:id="@+id/etRePassword"
|
||||
style="@style/login_et_style"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:hint="@string/confirm_password"
|
||||
android:inputType="textPassword"
|
||||
app:drawable_height="20dp"
|
||||
app:drawable_width="20dp"
|
||||
app:focusedTinColor="@color/colorPrimary"
|
||||
app:layout_constraintEnd_toEndOf="@+id/etPassword"
|
||||
app:layout_constraintStart_toStartOf="@+id/etPassword"
|
||||
app:layout_constraintTop_toBottomOf="@+id/etPassword"
|
||||
app:left_drawable="@drawable/password"
|
||||
app:right_drawable="@drawable/delete"
|
||||
app:tinColor="@color/light_grey" />
|
||||
|
||||
|
||||
<cn.qjm253.quick_android_custom_view.other.ClearAbleEditText
|
||||
android:id="@+id/etPhoneNumber"
|
||||
style="@style/login_et_style"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:hint="@string/phone_number"
|
||||
android:inputType="number"
|
||||
app:drawable_height="20dp"
|
||||
app:drawable_width="20dp"
|
||||
app:focusedTinColor="@color/colorPrimary"
|
||||
app:layout_constraintEnd_toEndOf="@+id/etRePassword"
|
||||
app:layout_constraintStart_toStartOf="@+id/etRePassword"
|
||||
app:layout_constraintTop_toBottomOf="@+id/etRePassword"
|
||||
app:left_drawable="@drawable/phone"
|
||||
app:tinColor="@color/light_grey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSendVerifyCode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:text="@string/send_verify_code"
|
||||
android:textColor="@color/colorPrimary"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/etPhoneNumber"
|
||||
app:layout_constraintEnd_toEndOf="@+id/etPhoneNumber"
|
||||
app:layout_constraintTop_toTopOf="@+id/etPhoneNumber" />
|
||||
|
||||
<cn.qjm253.quick_android_custom_view.other.ClearAbleEditText
|
||||
android:id="@+id/etVerifyCode"
|
||||
style="@style/login_et_style"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:hint="@string/verify_code"
|
||||
app:drawable_height="20dp"
|
||||
app:drawable_width="20dp"
|
||||
app:focusedTinColor="@color/colorPrimary"
|
||||
app:layout_constraintEnd_toEndOf="@+id/etPhoneNumber"
|
||||
app:layout_constraintStart_toStartOf="@+id/etPhoneNumber"
|
||||
app:layout_constraintTop_toBottomOf="@+id/etPhoneNumber"
|
||||
app:left_drawable="@drawable/code"
|
||||
app:right_drawable="@drawable/delete"
|
||||
app:tinColor="@color/light_grey" />
|
||||
|
||||
|
||||
<br.com.simplepass.loadingbutton.customViews.CircularProgressButton
|
||||
android:id="@+id/btnRegister"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
app:finalCornerAngle="40dp"
|
||||
app:initialCornerAngle="0dp"
|
||||
android:background="@drawable/button_shape_default"
|
||||
app:spinning_bar_color="#FFFFFF"
|
||||
app:spinning_bar_padding="4dp"
|
||||
app:spinning_bar_width="3dp"
|
||||
android:text="@string/register"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintLeft_toLeftOf="@id/etVerifyCode"
|
||||
app:layout_constraintRight_toRightOf="@id/etVerifyCode"
|
||||
app:layout_constraintTop_toBottomOf="@id/etVerifyCode" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.setting.SettingActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<include
|
||||
android:id="@+id/include"
|
||||
layout="@layout/bar_item" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDecoration1"
|
||||
style="@style/setting_title_decoration"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/include" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/settingTvTitle1"
|
||||
style="@style/setting_title"
|
||||
android:text="@string/setting_title_access_ip_address"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tvDecoration1"
|
||||
app:layout_constraintStart_toEndOf="@+id/tvDecoration1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvDecoration1" />
|
||||
|
||||
<cn.qjm253.quick_android_custom_view.other.ClearAbleEditText
|
||||
android:id="@+id/etIpAddress"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/setting_ip_address_example"
|
||||
app:layout_constraintLeft_toLeftOf="@id/settingTvTitle1"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDecoration1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDecoration2"
|
||||
style="@style/setting_title_decoration"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/etIpAddress" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/settingTvTitle2"
|
||||
style="@style/setting_title"
|
||||
android:text="@string/setting_title_access_port"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tvDecoration2"
|
||||
app:layout_constraintStart_toEndOf="@+id/tvDecoration2"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvDecoration2" />
|
||||
|
||||
<cn.qjm253.quick_android_custom_view.other.ClearAbleEditText
|
||||
android:id="@+id/etPort"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/setting_port_example"
|
||||
android:inputType="number"
|
||||
app:layout_constraintLeft_toLeftOf="@id/settingTvTitle2"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDecoration2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDecoration3"
|
||||
style="@style/setting_title_decoration"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/etPort" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/settingTvTitle3"
|
||||
style="@style/setting_title"
|
||||
android:text="@string/setting_title_service_port"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tvDecoration3"
|
||||
app:layout_constraintStart_toEndOf="@+id/tvDecoration3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvDecoration3" />
|
||||
|
||||
<cn.qjm253.quick_android_custom_view.other.ClearAbleEditText
|
||||
android:id="@+id/etServicePrefix"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/setting_service_prefix_example"
|
||||
app:layout_constraintLeft_toLeftOf="@id/settingTvTitle3"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDecoration3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDecoration4"
|
||||
style="@style/setting_title_decoration"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/etServicePrefix" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/settingTvTitle4"
|
||||
style="@style/setting_title"
|
||||
android:text="@string/setting_title_block_chain_ip_address"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tvDecoration4"
|
||||
app:layout_constraintStart_toEndOf="@+id/tvDecoration4"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvDecoration4" />
|
||||
|
||||
<cn.qjm253.quick_android_custom_view.other.ClearAbleEditText
|
||||
android:id="@+id/etBlockChainIp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/setting_block_chain_ip_address_example"
|
||||
app:layout_constraintLeft_toLeftOf="@id/settingTvTitle4"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDecoration4" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDecoration5"
|
||||
style="@style/setting_title_decoration"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/etBlockChainIp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/settingTvTitle5"
|
||||
style="@style/setting_title"
|
||||
android:text="@string/setting_title_block_chain_port"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tvDecoration5"
|
||||
app:layout_constraintStart_toEndOf="@+id/tvDecoration5"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvDecoration5" />
|
||||
|
||||
<cn.qjm253.quick_android_custom_view.other.ClearAbleEditText
|
||||
android:id="@+id/etBlockChainPort"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/setting_block_chain_port_example"
|
||||
android:inputType="number"
|
||||
app:layout_constraintLeft_toLeftOf="@id/settingTvTitle5"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDecoration5" />
|
||||
|
||||
<br.com.simplepass.loadingbutton.customViews.CircularProgressButton
|
||||
android:id="@+id/btnSaveSetting"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:background="@drawable/button_shape_default"
|
||||
android:text="@string/save_config"
|
||||
android:textColor="@color/white"
|
||||
app:finalCornerAngle="40dp"
|
||||
app:initialCornerAngle="0dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/etBlockChainPort"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:spinning_bar_color="#FFFFFF"
|
||||
app:spinning_bar_padding="4dp"
|
||||
app:spinning_bar_width="3dp" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activity.welcome.WelcomeActivity">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgLogo"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/logo" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<cn.qjm253.quick_android_easy_bar.EasyBar xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/easyBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/bar_item_height"
|
||||
android:background="@color/colorPrimary"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
app:icon_margin="3dp"
|
||||
app:icon_size="@dimen/bar_item_height"
|
||||
app:left_icon="@drawable/back"
|
||||
app:right_icon="@drawable/setting"
|
||||
app:left_text="@string/back"
|
||||
app:right_text="@string/sure"
|
||||
app:title="优云"
|
||||
app:title_color="@color/white"
|
||||
app:title_size="17sp" />
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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>
|
||||
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 16 KiB |
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#3B543E</color>
|
||||
<color name="colorPrimaryDark">#36543E</color>
|
||||
<color name="colorAccent">#D81B60</color>
|
||||
|
||||
<!-- 分割线颜色-->
|
||||
<color name="divide_line_color">#ccc</color>
|
||||
|
||||
<color name="light_grey">#999</color>
|
||||
<color name="ripple_mask">#ccc</color>
|
||||
<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>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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>
|
||||
@@ -0,0 +1,58 @@
|
||||
<resources>
|
||||
<string name="app_name">个人药物管理</string>
|
||||
<string name="home">主页</string>
|
||||
<string name="mine">我的</string>
|
||||
<string name="message">消息</string>
|
||||
<string name="back">返回</string>
|
||||
<string name="sure">确认</string>
|
||||
<string name="collection">收藏</string>
|
||||
<string name="notification">通知</string>
|
||||
<string name="mine_file">我的文件</string>
|
||||
<string name="setting">设置</string>
|
||||
<string name="exit">退出</string>
|
||||
<string name="login">登录</string>
|
||||
<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>
|
||||
<string name="confirm_password">确认密码</string>
|
||||
<string name="verify_code">验证码</string>
|
||||
<string name="mail_list">通讯录</string>
|
||||
<string name="approval">审批</string>
|
||||
<string name="click_me_login">点此登录</string>
|
||||
<string name="add_message">添加消息</string>
|
||||
<string name="send">发送</string>
|
||||
<string name="notification_detail">通知详情</string>
|
||||
<string name="reimbursement">报销</string>
|
||||
<string name="occurrence_date">发生日期</string>
|
||||
<string name="please_select">请选择</string>
|
||||
<string name="submit">提交</string>
|
||||
<string name="approval_er">审核人</string>
|
||||
<string name="approval_record">审批记录</string>
|
||||
<string name="i_proposed">我发起的</string>
|
||||
<string name="i_approval">我审批的</string>
|
||||
<string name="check">审核</string>
|
||||
<string name="send_notification">发送通知</string>
|
||||
<string name="email_list">邮件列表</string>
|
||||
<string name="email_recive">收件箱</string>
|
||||
<string name="email_send">发件箱</string>
|
||||
<string name="send_email">发送邮件</string>
|
||||
<string name="please_complete_content">请将内容填写完整</string>
|
||||
<string name="email_detail">邮件详情</string>
|
||||
<string name="open">打开</string>
|
||||
<string name="download">下载</string>
|
||||
<string name="setting_title_access_ip_address">接入IP地址</string>
|
||||
<string name="setting_title_access_port">接入端口号</string>
|
||||
<string name="setting_ip_address_example">例如: 192.168.1.25</string>
|
||||
<string name="setting_port_example">例如:9748</string>
|
||||
<string name="setting_title_service_port">服务前缀</string>
|
||||
<string name="setting_service_prefix_example">例如:/min/edu/pkusz/OA</string>
|
||||
<string name="setting_title_block_chain_ip_address">区块链IP地址</string>
|
||||
<string name="setting_block_chain_ip_address_example">例如:192.168.1.24</string>
|
||||
<string name="setting_title_block_chain_port">区块链端口</string>
|
||||
<string name="setting_block_chain_port_example">例如:9749</string>
|
||||
<string name="save_config">保存配置</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,45 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorPrimary</item>
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowContentTransitions">true</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="login_et_style">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_marginEnd">40dp</item>
|
||||
<item name="android:layout_marginLeft">40dp</item>
|
||||
<item name="android:layout_marginRight">40dp</item>
|
||||
<item name="android:layout_marginStart">40dp</item>
|
||||
<item name="android:textColor">@color/text_color</item>
|
||||
<item name="android:background">@drawable/login_edit_text_bg</item>
|
||||
<item name="android:drawablePadding">10dp</item>
|
||||
<item name="android:padding">8dp</item>
|
||||
</style>
|
||||
|
||||
|
||||
<!-- Setting Page -->
|
||||
<style name="setting_title_decoration">
|
||||
<item name="android:layout_width">5dp</item>
|
||||
<item name="android:layout_height">30dp</item>
|
||||
<item name="android:layout_marginStart">10dp</item>
|
||||
<item name="android:layout_marginTop">20dp</item>
|
||||
<item name="android:background">@color/colorPrimary</item>
|
||||
</style>
|
||||
<style name="setting_title">
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_marginStart">10dp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,17 @@
|
||||
package cn.tsr.personal_drug_management
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
class ExampleUnitTest {
|
||||
@Test
|
||||
fun addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2)
|
||||
}
|
||||
}
|
||||