<?xml version="1.0" encoding="UTF-8"?> | |||||
<project version="4"> | |||||
<component name="VcsDirectoryMappings"> | |||||
<mapping directory="$PROJECT_DIR$" vcs="Git" /> | |||||
</component> | |||||
</project> |
package com.xkl.cdl.module.center_learn | |||||
import android.os.Bundle | |||||
import androidx.fragment.app.Fragment | |||||
import android.view.LayoutInflater | |||||
import android.view.View | |||||
import android.view.ViewGroup | |||||
import com.xkl.cdl.R | |||||
// TODO: Rename parameter arguments, choose names that match | |||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER | |||||
private const val ARG_PARAM1 = "param1" | |||||
private const val ARG_PARAM2 = "param2" | |||||
/** | |||||
* A simple [Fragment] subclass. | |||||
* Use the [LearnCenterFragment.newInstance] factory method to | |||||
* create an instance of this fragment. | |||||
*/ | |||||
class LearnCenterFragment : Fragment() { | |||||
// TODO: Rename and change types of parameters | |||||
private var param1: String? = null | |||||
private var param2: String? = null | |||||
override fun onCreate(savedInstanceState: Bundle?) { | |||||
super.onCreate(savedInstanceState) | |||||
arguments?.let { | |||||
param1 = it.getString(ARG_PARAM1) | |||||
param2 = it.getString(ARG_PARAM2) | |||||
} | |||||
} | |||||
override fun onCreateView( | |||||
inflater: LayoutInflater, container: ViewGroup?, | |||||
savedInstanceState: Bundle? | |||||
): View? { | |||||
// Inflate the layout for this fragment | |||||
return inflater.inflate(R.layout.fragment_learn_center, container, false) | |||||
} | |||||
companion object { | |||||
/** | |||||
* Use this factory method to create a new instance of | |||||
* this fragment using the provided parameters. | |||||
* | |||||
* @param param1 Parameter 1. | |||||
* @param param2 Parameter 2. | |||||
* @return A new instance of fragment LearnCenterFragment. | |||||
*/ | |||||
// TODO: Rename and change types and number of parameters | |||||
@JvmStatic | |||||
fun newInstance(param1: String, param2: String) = | |||||
LearnCenterFragment().apply { | |||||
arguments = Bundle().apply { | |||||
putString(ARG_PARAM1, param1) | |||||
putString(ARG_PARAM2, param2) | |||||
} | |||||
} | |||||
} | |||||
} |
package com.xkl.cdl.module.main | |||||
import androidx.appcompat.app.AppCompatActivity | |||||
import android.os.Bundle | |||||
import com.xkl.cdl.R | |||||
class MainActivity : AppCompatActivity() { | |||||
override fun onCreate(savedInstanceState: Bundle?) { | |||||
super.onCreate(savedInstanceState) | |||||
setContentView(R.layout.activity_main) | |||||
} | |||||
} |
package com.xkl.cdl.module.memo | |||||
import android.os.Bundle | |||||
import androidx.fragment.app.Fragment | |||||
import android.view.LayoutInflater | |||||
import android.view.View | |||||
import android.view.ViewGroup | |||||
import com.xkl.cdl.R | |||||
// TODO: Rename parameter arguments, choose names that match | |||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER | |||||
private const val ARG_PARAM1 = "param1" | |||||
private const val ARG_PARAM2 = "param2" | |||||
/** | |||||
* A simple [Fragment] subclass. | |||||
* Use the [MemoFragment.newInstance] factory method to | |||||
* create an instance of this fragment. | |||||
*/ | |||||
class MemoFragment : Fragment() { | |||||
// TODO: Rename and change types of parameters | |||||
private var param1: String? = null | |||||
private var param2: String? = null | |||||
override fun onCreate(savedInstanceState: Bundle?) { | |||||
super.onCreate(savedInstanceState) | |||||
arguments?.let { | |||||
param1 = it.getString(ARG_PARAM1) | |||||
param2 = it.getString(ARG_PARAM2) | |||||
} | |||||
} | |||||
override fun onCreateView( | |||||
inflater: LayoutInflater, container: ViewGroup?, | |||||
savedInstanceState: Bundle? | |||||
): View? { | |||||
// Inflate the layout for this fragment | |||||
return inflater.inflate(R.layout.fragment_memo, container, false) | |||||
} | |||||
companion object { | |||||
/** | |||||
* Use this factory method to create a new instance of | |||||
* this fragment using the provided parameters. | |||||
* | |||||
* @param param1 Parameter 1. | |||||
* @param param2 Parameter 2. | |||||
* @return A new instance of fragment MemoFragment. | |||||
*/ | |||||
// TODO: Rename and change types and number of parameters | |||||
@JvmStatic | |||||
fun newInstance(param1: String, param2: String) = | |||||
MemoFragment().apply { | |||||
arguments = Bundle().apply { | |||||
putString(ARG_PARAM1, param1) | |||||
putString(ARG_PARAM2, param2) | |||||
} | |||||
} | |||||
} | |||||
} |
package com.xkl.cdl.module.my | |||||
import android.os.Bundle | |||||
import androidx.fragment.app.Fragment | |||||
import android.view.LayoutInflater | |||||
import android.view.View | |||||
import android.view.ViewGroup | |||||
import com.xkl.cdl.R | |||||
// TODO: Rename parameter arguments, choose names that match | |||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER | |||||
private const val ARG_PARAM1 = "param1" | |||||
private const val ARG_PARAM2 = "param2" | |||||
/** | |||||
* A simple [Fragment] subclass. | |||||
* Use the [MyFragment.newInstance] factory method to | |||||
* create an instance of this fragment. | |||||
*/ | |||||
class MyFragment : Fragment() { | |||||
// TODO: Rename and change types of parameters | |||||
private var param1: String? = null | |||||
private var param2: String? = null | |||||
override fun onCreate(savedInstanceState: Bundle?) { | |||||
super.onCreate(savedInstanceState) | |||||
arguments?.let { | |||||
param1 = it.getString(ARG_PARAM1) | |||||
param2 = it.getString(ARG_PARAM2) | |||||
} | |||||
} | |||||
override fun onCreateView( | |||||
inflater: LayoutInflater, container: ViewGroup?, | |||||
savedInstanceState: Bundle? | |||||
): View? { | |||||
// Inflate the layout for this fragment | |||||
return inflater.inflate(R.layout.fragment_my, container, false) | |||||
} | |||||
companion object { | |||||
/** | |||||
* Use this factory method to create a new instance of | |||||
* this fragment using the provided parameters. | |||||
* | |||||
* @param param1 Parameter 1. | |||||
* @param param2 Parameter 2. | |||||
* @return A new instance of fragment MyFragment. | |||||
*/ | |||||
// TODO: Rename and change types and number of parameters | |||||
@JvmStatic | |||||
fun newInstance(param1: String, param2: String) = | |||||
MyFragment().apply { | |||||
arguments = Bundle().apply { | |||||
putString(ARG_PARAM1, param1) | |||||
putString(ARG_PARAM2, param2) | |||||
} | |||||
} | |||||
} | |||||
} |
package com.xkl.cdl.module.statics | |||||
import android.os.Bundle | |||||
import androidx.fragment.app.Fragment | |||||
import android.view.LayoutInflater | |||||
import android.view.View | |||||
import android.view.ViewGroup | |||||
import com.xkl.cdl.R | |||||
// TODO: Rename parameter arguments, choose names that match | |||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER | |||||
private const val ARG_PARAM1 = "param1" | |||||
private const val ARG_PARAM2 = "param2" | |||||
/** | |||||
* A simple [Fragment] subclass. | |||||
* Use the [StaticsFragment.newInstance] factory method to | |||||
* create an instance of this fragment. | |||||
*/ | |||||
class StaticsFragment : Fragment() { | |||||
// TODO: Rename and change types of parameters | |||||
private var param1: String? = null | |||||
private var param2: String? = null | |||||
override fun onCreate(savedInstanceState: Bundle?) { | |||||
super.onCreate(savedInstanceState) | |||||
arguments?.let { | |||||
param1 = it.getString(ARG_PARAM1) | |||||
param2 = it.getString(ARG_PARAM2) | |||||
} | |||||
} | |||||
override fun onCreateView( | |||||
inflater: LayoutInflater, container: ViewGroup?, | |||||
savedInstanceState: Bundle? | |||||
): View? { | |||||
// Inflate the layout for this fragment | |||||
return inflater.inflate(R.layout.fragment_statics, container, false) | |||||
} | |||||
companion object { | |||||
/** | |||||
* Use this factory method to create a new instance of | |||||
* this fragment using the provided parameters. | |||||
* | |||||
* @param param1 Parameter 1. | |||||
* @param param2 Parameter 2. | |||||
* @return A new instance of fragment StaticsFragment. | |||||
*/ | |||||
// TODO: Rename and change types and number of parameters | |||||
@JvmStatic | |||||
fun newInstance(param1: String, param2: String) = | |||||
StaticsFragment().apply { | |||||
arguments = Bundle().apply { | |||||
putString(ARG_PARAM1, param1) | |||||
putString(ARG_PARAM2, param2) | |||||
} | |||||
} | |||||
} | |||||
} |
<?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=".module.main.MainActivity"> | |||||
</androidx.constraintlayout.widget.ConstraintLayout> |
<?xml version="1.0" encoding="utf-8"?> | |||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
xmlns:tools="http://schemas.android.com/tools" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
tools:context=".module.center_learn.LearnCenterFragment"> | |||||
<!-- TODO: Update blank fragment layout --> | |||||
<TextView | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:text="@string/hello_blank_fragment" /> | |||||
</FrameLayout> |
<?xml version="1.0" encoding="utf-8"?> | |||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
xmlns:tools="http://schemas.android.com/tools" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
tools:context=".module.memo.MemoFragment"> | |||||
<!-- TODO: Update blank fragment layout --> | |||||
<TextView | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:text="@string/hello_blank_fragment" /> | |||||
</FrameLayout> |
<?xml version="1.0" encoding="utf-8"?> | |||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
xmlns:tools="http://schemas.android.com/tools" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
tools:context=".module.my.MyFragment"> | |||||
<!-- TODO: Update blank fragment layout --> | |||||
<TextView | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:text="@string/hello_blank_fragment" /> | |||||
</FrameLayout> |
<?xml version="1.0" encoding="utf-8"?> | |||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
xmlns:tools="http://schemas.android.com/tools" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
tools:context=".module.statics.StaticsFragment"> | |||||
<!-- TODO: Update blank fragment layout --> | |||||
<TextView | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:text="@string/hello_blank_fragment" /> | |||||
</FrameLayout> |
/build |
plugins { | |||||
id 'com.android.library' | |||||
id 'kotlin-android' | |||||
id 'kotlin-kapt' | |||||
} | |||||
android { | |||||
compileSdk rootProject.ext.android.compile_sdk_version | |||||
buildToolsVersion rootProject.ext.android.build_tools_version | |||||
defaultConfig { | |||||
minSdk rootProject.ext.android.min_sdk_version | |||||
targetSdk rootProject.ext.android.target_sdk_version | |||||
versionCode 1 | |||||
versionName "1.0" | |||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | |||||
consumerProguardFiles "consumer-rules.pro" | |||||
} | |||||
buildTypes { | |||||
release { | |||||
minifyEnabled false | |||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | |||||
} | |||||
} | |||||
compileOptions { | |||||
sourceCompatibility JavaVersion.VERSION_1_8 | |||||
targetCompatibility JavaVersion.VERSION_1_8 | |||||
} | |||||
kotlinOptions { | |||||
jvmTarget = '1.8' | |||||
} | |||||
viewBinding{ | |||||
enabled true | |||||
} | |||||
dataBinding{ | |||||
enabled true | |||||
} | |||||
} | |||||
dependencies { | |||||
rootProject.ext.dependencies_required.each{ k,v -> implementation v} | |||||
testImplementation rootProject.ext.dependencies_testImplementation.junit | |||||
rootProject.ext.dependencies_androidTestImplementation.each{ k,v -> androidTestImplementation v} | |||||
} |
# 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 |
package com.suliang.common | |||||
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("com.suliang.common.test", appContext.packageName) | |||||
} | |||||
} |
<?xml version="1.0" encoding="utf-8"?> | |||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |||||
package="com.suliang.common"> | |||||
</manifest> |
package com.suliang.common.base.activity | |||||
import android.os.Bundle | |||||
import androidx.appcompat.app.AppCompatActivity | |||||
import androidx.databinding.DataBindingUtil | |||||
import androidx.databinding.ViewDataBinding | |||||
import androidx.databinding.ViewDataBindingKtx | |||||
import java.lang.reflect.Method | |||||
import java.lang.reflect.ParameterizedType | |||||
/** | |||||
* 基类Activity | |||||
*/ | |||||
abstract class BaseActivity<VB : ViewDataBinding> : AppCompatActivity() { | |||||
lateinit var databinding: VB | |||||
override fun onCreate(savedInstanceState: Bundle?) { | |||||
super.onCreate(savedInstanceState) | |||||
setLayoutBefore() | |||||
initBinding() | |||||
setLayoutAfter() | |||||
} | |||||
/** 布局前操作 : 空实现 */ | |||||
public fun setLayoutBefore() { | |||||
} | |||||
/** | |||||
* 实例化 binding和 设置布局 | |||||
*/ | |||||
private fun initBinding() { | |||||
// https://www.jianshu.com/p/e3d2421a0277 | |||||
// val genericSuperClass = this::class.java.genericSuperclass as ParameterizedType //超类 | |||||
// val type = genericSuperClass.actualTypeArguments[0].javaClass | |||||
// val infate: Method = type.getDeclaredMethod("inflate") | |||||
} | |||||
/** | |||||
* 布局后操作:空实现 | |||||
*/ | |||||
public fun setLayoutAfter() { | |||||
} | |||||
public abstract fun layoutRes(): Int | |||||
} |
package com.suliang.common.base.fragment | |||||
class BaseFragment { | |||||
} |
package com.suliang.common.util | |||||
import android.app.Application | |||||
import java.lang.Exception | |||||
/** | |||||
* 用于获取全局Applicaiton | |||||
*/ | |||||
object AppGlobals { | |||||
val application by lazy { | |||||
try { | |||||
val currentApplication = Class.forName("android.app.ActivityThread").getDeclaredMethod("currentApplication") | |||||
currentApplication.invoke(null, null) as Application | |||||
}catch (e:Exception){ | |||||
throw RuntimeException("AppGlobals获取Application异常") | |||||
} | |||||
} | |||||
} |
package com.suliang.common.util | |||||
import java.io.File | |||||
/** | |||||
* author suliang | |||||
* create 2020/12/11 9:43 | |||||
* Describe: 常量类 | |||||
*/ | |||||
object Constants { | |||||
const val PLATFORM = "android" //平台 | |||||
const val YOUTH_VERSION = 1 //青少版 | |||||
const val CHILDREN_VERSION = 2 //幼儿版 | |||||
// public static final String ENVIRONMENT_PRODUCTION = "production" ; //正式环境 | |||||
// public static final String ENVIRONMENT_DEVELOPMENT = "development"; //开发环境 | |||||
// public static final String ENVIRONMENT_TEST = "test"; //测试环境 | |||||
const val ACCOUNT = "account" | |||||
const val USER_INFO = "userinfo" | |||||
const val TOKEN = "token" | |||||
/** 默认发音 */ | |||||
const val DEFAULT_SOUND = "default_sound" | |||||
/** 更换fragment中的颜色 */ | |||||
const val ACTION_NOTIFY_FRAGMENT_SKIN = "notify_skin" | |||||
//项目subjectId | |||||
const val SUBJECT_ENGLISH: Long = 3 //英语 | |||||
const val SUBJECT_CHINESE: Long = 1 //语文 | |||||
//课程类型的coursepack --> categoryId | |||||
const val CATEGORY_ENGLISH_WORD: Long = 1 //英语: 单词速记 | |||||
const val CATEGORY_ENGLISH_SOUNDMARK: Long = 4 //英语: 音标 | |||||
const val CATEGORY_ENGLISH_SPOKEN: Long = 13 //英语: 口语 | |||||
const val CATEGORY_CHINESE_COMPOSITION: Long = 2 //语文: 作文 | |||||
const val CATEGORY_CHINESE_LITERACY: Long = 3 //语文: 识字 | |||||
const val CATEGORY_CHINESE_PINYIN: Long = 5 //语文: 拼音 | |||||
//项目的课程类型: course --> typeId | |||||
const val COURSE_TYPE_DISCERN = 1 //认读、口语 | |||||
const val COURSE_TYPE_VOICE = 2 //辨音 | |||||
const val COURSE_TYPE_SPELL = 3 //拼写 | |||||
const val COURSE_TYPE_POINTS = 4 //作文知识点 | |||||
const val COURSE_TYPE_LITERACY = 5 //识字 | |||||
const val COURSE_TYPE_SOUNDMARK = 6 //音标 | |||||
const val COURSE_TYPE_PINYIN = 7 //拼音 | |||||
const val COURSE_TYPE_SPOKEN = 8 //口语 | |||||
//作文课时类型 | |||||
const val COMPOSITION_TYPE_VIDEO = 1 //视频 | |||||
const val COMPOSITION_TYPE_KNOWLEDGE = 2 //知识点学习 | |||||
const val COMPOSITION_TYPE_EXAM = 3 //知识点测试 | |||||
const val COMPOSITION_TYPE_READING = 4 //课堂练习 | |||||
const val COMPOSITION_TYPE_TASK = 5 //课外练习 | |||||
//口语课时类型 | |||||
const val SPOKEN_LESSON_TYPE_WORD = 1 //口语词汇 | |||||
const val SPOKEN_LESSON_TYPE_SENTENCE = 2 //口语句型 | |||||
const val SPOKEN_LESSON_TYPE_DIALOGUE = 3 //口语对话 | |||||
//课程包过期信息状态值 | |||||
const val EXPIRY_NOMAL = 1 //正常态 | |||||
const val EXPIRY_WILL_OVER = 2 //快过期 小于39天 | |||||
const val EXPIRY_OVER = 3 //已过期 | |||||
//课程包内容是否下载状态值 | |||||
const val CONTENT_NOT_DOWN = 0 //未下载 | |||||
const val CONTENT_DOWNING = 1 //下载中 | |||||
const val CONTENT_NOMAL = 2 //正常态(已下载) | |||||
val FILE_ENGLISH = "english" + File.separator + "pack" //英语项目包 | |||||
val FILE_CHINESE = "chinese" + File.separator + "pack" //作文项目包 | |||||
//课程数据包解压后保存的名称 | |||||
const val DBFILENAME = "course_data.db" | |||||
const val FILE_VOICE = "voice" //音频地址 | |||||
const val VOICE_COMMON_KONGGE = "kongge.mp3" | |||||
const val VOICE_COMMON_MISTAKE = "mistake.mp3" | |||||
const val VOICE_COMMON_DI = "di.mp3" //叮咚 | |||||
const val FILE_UPLOAD_FAIL = "error" //上传失败地址 | |||||
const val FILE_IMG = "glide" //图片缓存地址 | |||||
/********发音默认type */ | |||||
const val SOUND_TYPE_US = 1 //美 | |||||
const val SOUND_TYPE_UK = 2 //英 | |||||
const val SOUND_TYPE_CN = 3 //中文 | |||||
const val TEST_QUEST_TYPE_FIELD = 1 //测试题选项类型 :字段名 | |||||
const val TEST_QUEST_TYPE_ID = 2 //测试题选项类型: 选项id | |||||
// 分组(1:普通测试(词汇测试,不做redis统计关联) 2:章节学前测试 3:章节学后测试 4:学前总测试 5:学后总测试 6:备忘录测试(不做redis统计关联);7:作文知识点测试,8:服务中心的课程测试) | |||||
const val TEST_TYPE_NORMAL = 1 //普通测试(词汇测试,不做redis统计关联) | |||||
const val TEST_TYPE_BEFORE = 2 //学前测试 | |||||
const val TEST_TYPE_AFTER = 3 //学后测试 | |||||
const val TEST_TYPE_BEFORE_TOTAL = 4 //学前总测试 | |||||
const val TEST_TYPE_AFTER_TOTAL = 5 //学后总测试 | |||||
const val TEST_TYPE_MEMO = 6 //备忘录测试 | |||||
const val TEST_TYPE_COMPOSITION = 7 //作文知识点测试 | |||||
const val TEST_TYPE_SERVICE_CENTER = 8 //服务中心的课程测试 | |||||
const val TEST_DB_DATA_WORD = 1 // data_word | |||||
const val TEST_DB_DATA_EXAM = 2 // data_exam | |||||
const val TEST_CORRECT = 1 //答题正确 | |||||
const val TEST_ERROR = -1 //答题错误 | |||||
const val TEST_UNANSWER = 0 //答题未答 | |||||
const val TEST_TO_NEXT_TIME_CORRECT = 500 //认读辨音 正确 0.5秒跳下一题 | |||||
const val TEST_TO_NEXT_TIME_ERROR = 2000 //认读辨音 答错 2秒 | |||||
const val TEST_TO_NEXT_TIME_UNANSWER = 2000 //认读辨音 未答 2秒 | |||||
const val TEST_TO_NEXT_TIME_SPELL = 1500 //辨音错误到下一题需要1.5秒 | |||||
const val TEST_WORD_COUNT_DOWN_TIME_DISCERN = 6000 //认读单个单词倒计时时间 6秒 | |||||
const val TEST_WORD_COUNT_DOWN_TIME_SPELL_SINGLE = 1600 //拼写单个单词字母的倒计时时间 | |||||
const val TEST_WORD_COUNT_DOWN_TOME_COMPOSITION = 15000 //作文测试倒计时时间 | |||||
const val SCORE_1 = 80 //小于score_1 悲伤 | |||||
const val SCORE_2 = 90 //大于等于score1 小于 score_2 加油 | |||||
const val SCORE_SPOKEN_DIALOGUE_1 = 60 //口语对话练习课时后测试通过标准 80以上优秀,中间良好 | |||||
const val TEST_COUNT_TOTAL = 25 //总测试 50题 | |||||
const val TEST_COUNT_NORAM = 20 //章节测试 25题 | |||||
const val TEST_COUNT_VOCABULARY = 100 //词汇量测试 | |||||
//测试的题目类型 | |||||
const val TEST_QUEST_TYPE_CHOICE = 1 //选择题 | |||||
const val TEST_QUEST_TYPE_GAP_FILLING = 2 //填空题 | |||||
const val TEST_QUEST_TYPE_JUDGE = 3 //判断题 | |||||
const val TEST_QUEST_TYPE_SPOKEN_DIALOGUE = 4 //口语对话测试 | |||||
//课时状态 | |||||
const val LESSON_STATE_NORMAL = 0 //普通状态 | |||||
// public static final int LESSON_STATE_SELECT = 1 ; //选中状态 | |||||
const val LESSON_STATE_LOCKED = 1 //锁定状态 | |||||
//答题左侧按钮状态 | |||||
const val ANSWER = 0 //答案 | |||||
const val CORRECT = 1 //正确 | |||||
const val NEXT = 2 //下一条 | |||||
//有效时间 : 18秒 | |||||
const val VALID_TIME: Long = 18000 | |||||
//最后一课时 虚拟下一课时标记(主要用于判断最后一课时学后测试是否有通过) | |||||
const val LAST_LESSON_NEXT_FLAG = "-1_-1" | |||||
//学习 | |||||
const val LEARN_FLAG = 1 | |||||
//复习 | |||||
const val REVIEW_FLAG = 2 | |||||
//拼写中 | |||||
const val STATE_SPELLING = 1 | |||||
//纠错中 | |||||
const val STATE_MODIFYING = 2 | |||||
//不可操作状态 | |||||
const val STATE_UNENABLE = 3 | |||||
//拼写结果: 全对 | |||||
const val RESULT_ALL_RIGHT = 1 | |||||
//拼写结果:错误;可容错 | |||||
const val RESULT_ERROR_CAN_MODIFY = 2 | |||||
//拼写结果: 错误,无容错 | |||||
const val RESULT_ERROR = 3 | |||||
//拼写修改完成 | |||||
const val RESULT_MODIFY_OVER = 4 | |||||
// 0: 自己按顺序加载状态页 1复习页 2学前总测页 3 目录页 4学后总测未测 5、学后总测未通过 6、学后总测已通过 | |||||
const val PAGE_LOADING_NORAML = 0 | |||||
const val PAGE_LOADING_REVIEW = 1 | |||||
const val PAGE_LOADING_BEFORE = 2 | |||||
const val PAGE_LOADING_CATALOG = 3 | |||||
const val PAGE_LOADING_AFTER_NOT = 4 | |||||
const val PAGE_LOADING_AFTER_NO_PASS = 5 | |||||
const val PAGE_LOADING_AFTER_PASS = 6 | |||||
//收藏类型 | |||||
const val COMPOSITON_COLLECT_VIDEO_BLACK_BOOK = 1 //收藏类型:视频版本 | |||||
const val COMPOSITON_COLLECT_READING = 2 //阅读材料 | |||||
//模块联通通知类型 | |||||
const val NOTIFY_ENGLISH_REVIEW = 1 //英语有复习 | |||||
const val NOTIFY_ENGLISH_ERROR = 2 //英语学习有错误 | |||||
const val NOTIFY_COMPOSITION_REVIEW = 3 //作文有复习 | |||||
const val NOTIFY_COMPOSITION_ERROR = 4 //作文学习有错误 | |||||
const val NOTIFY_LEARN_RECORD_CHANGE = 5 //学习记录有变化 | |||||
//游戏 | |||||
const val GAME_GAPFILLING = 1 //填空 | |||||
const val GAME_CHOOSE = 2 //消消乐 | |||||
const val GAME_TRANSLATE = 3 //翻译排序 | |||||
//口语自动播放模式 | |||||
const val SPOKEN_AUTO_PLAY_MODEL = 1 //自动播放模式 | |||||
const val SPOKEN_AUTO_FLOWER_MODEL = 2 //跟读模式 | |||||
//收藏本: 句子type 2 | |||||
const val COLLECT_TYPE_SENTENCE: Long = 2 | |||||
} |
package com.suliang.common | |||||
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) | |||||
} | |||||
} |