Pārlūkot izejas kodu

适配科中

master
leiyun pirms 1 gada
vecāks
revīzija
50270ee7e2
16 mainītis faili ar 453 papildinājumiem un 113 dzēšanām
  1. +6
    -2
      app/build.gradle
  2. +79
    -49
      app/src/main/java/com/yzx/ebrand/MainActivity.kt
  3. +3
    -0
      app/src/main/java/com/yzx/ebrand/config/YzxInterface.kt
  4. +142
    -8
      app/src/main/java/com/yzx/ebrand/fragment/ClassBrandFragment.kt
  5. +20
    -1
      app/src/main/java/com/yzx/ebrand/model/CBClassInfo.kt
  6. +55
    -1
      app/src/main/java/com/yzx/ebrand/presenter/ClassBrandPresenter.kt
  7. +55
    -16
      app/src/main/res/layout/fragment_class_brand.xml
  8. +0
    -1
      app/src/main/res/layout/layout_brand_active_info.xml
  9. +1
    -1
      app/src/main/res/layout/layout_brand_class_info.xml
  10. +19
    -19
      app/src/main/res/layout/layout_brand_image_info.xml
  11. +15
    -14
      app/src/main/res/layout/layout_brand_timetable_info.xml
  12. +1
    -0
      app/src/main/res/layout/layout_class_empty.xml
  13. +14
    -0
      app/src/main/res/layout/timetable_cell1.xml
  14. +29
    -0
      app/src/main/res/layout/timetable_cell2.xml
  15. +14
    -0
      app/src/main/res/layout/timetable_row.xml
  16. +0
    -1
      app/src/main/res/values/strings.xml

+ 6
- 2
app/build.gradle Parādīt failu

@@ -19,8 +19,8 @@ android {
// minSdkVersion 26
minSdkVersion 21
targetSdkVersion 25
versionCode 30005
versionName "3.0.5"
versionCode 30102
versionName "3.1.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

// ndk {
@@ -79,6 +79,7 @@ android {
buildConfigField "String", "MP_ID",'"4"'
buildConfigField "String", "ENV_NAME",'"qbj"'
buildConfigField "String", "APP_ID",'"701"'
resValue "string","app_name","电子班牌"
}

cszxy {
@@ -94,6 +95,7 @@ android {
buildConfigField "String", "MP_ID",'"2"'
buildConfigField "String", "ENV_NAME",'"cszxy"'
buildConfigField "String", "APP_ID",'"701"'
resValue "string","app_name","电子班牌"
}

kz {
@@ -109,6 +111,7 @@ android {
buildConfigField "String", "MP_ID",'"101"'
buildConfigField "String", "ENV_NAME",'"kz"'
buildConfigField "String", "APP_ID",'"7011"'
resValue "string","app_name","电子班牌"
}

debug {
@@ -133,6 +136,7 @@ android {
buildConfigField "String", "MP_ID",'"2"'
buildConfigField "String", "ENV_NAME",'"qbj"'
buildConfigField "String", "APP_ID",'"602"'
resValue "string","app_name","电子班牌(live)"
}

yzx_test {


+ 79
- 49
app/src/main/java/com/yzx/ebrand/MainActivity.kt Parādīt failu

@@ -4,6 +4,7 @@ import android.annotation.SuppressLint
import android.app.Dialog
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.os.Handler
import android.os.Looper
import android.util.Log
@@ -473,7 +474,7 @@ class MainActivity : BaseActivity<MainPresenter>(), NetworkUtils.OnNetworkStatus
}
checkVersion()
checkAuto()
initWs()
// initWs()
}

private fun checkVersion(userCheck: Boolean = false): Unit {
@@ -501,9 +502,11 @@ class MainActivity : BaseActivity<MainPresenter>(), NetworkUtils.OnNetworkStatus
res.data.type == 1 -> { //强制升级
updateApp(res.data)
}

curr - lastTipTime > 24 * 60 * 60 * 1000 -> { //非强制一天以内提示一次
updateApp(res.data)
}

userCheck -> { //
updateApp(res.data)
}
@@ -522,59 +525,83 @@ class MainActivity : BaseActivity<MainPresenter>(), NetworkUtils.OnNetworkStatus

}

private fun updateAppKz(version: Version) {
val tipDialog = QMUIDialog.MessageDialogBuilder(this)
.setTitle("检测到新版本?")
.setMessage(version.explain)
.setCanceledOnTouchOutside(false)
.setCancelable(false)
if (version.type == 0) {
tipDialog.addAction("暂不升级") { dialog, index ->
dialog.dismiss()
}
}
tipDialog.addAction("立即升级") { dialog, index ->
val intent = Intent(Intent.ACTION_VIEW,Uri.parse(version.app_src))
startActivity(intent)
}
tipDialog.create()
val dia = tipDialog.show()
dia.hideNavigationBar()
}

private fun updateApp(version: Version) {
AllenVersionChecker
.getInstance()
.downloadOnly(
UIData.create()
.setTitle("检测到新版本")
.setContent(version.explain)
.setDownloadUrl(version.app_src)
)
.setCustomVersionDialogListener { context, versionBundle ->
val dialog = BaseDialog(context, R.style.BaseDialog, R.layout.version_dialog)
val title = dialog.find<TextView>(R.id.tv_title)
title.text = "检测到新版本"
val content = dialog.find<TextView>(R.id.tv_msg)
content.text = version.explain
val cancelBtn = dialog.find<View>(R.id.cancel_btn)
if (version.type == 1) {
cancelBtn.visibility = View.GONE
if (Config.ENV_NAME == "kz") {
this.updateAppKz(version)
} else {
AllenVersionChecker
.getInstance()
.downloadOnly(
UIData.create()
.setTitle("检测到新版本")
.setContent(version.explain)
.setDownloadUrl(version.app_src)
)
.setCustomVersionDialogListener { context, versionBundle ->
val dialog = BaseDialog(context, R.style.BaseDialog, R.layout.version_dialog)
val title = dialog.find<TextView>(R.id.tv_title)
title.text = "检测到新版本"
val content = dialog.find<TextView>(R.id.tv_msg)
content.text = version.explain
val cancelBtn = dialog.find<View>(R.id.cancel_btn)
if (version.type == 1) {
cancelBtn.visibility = View.GONE
}
dialog.hideNavigationBar()
return@setCustomVersionDialogListener dialog
}
dialog.hideNavigationBar()
return@setCustomVersionDialogListener dialog
}
.setOnCancelListener {
SPUtils.getInstance().put("last_tip_time${version.version_code}", Date().time)
}
.setCustomDownloadingDialogListener(object : CustomDownloadingDialogListener {
@SuppressLint("SetTextI18n")
override fun updateUI(dialog: Dialog?, progress: Int, versionBundle: UIData?) {
val tvProgress: TextView = dialog!!.findViewById(R.id.tv_progress)
val progressBar: ContentLoadingProgressBar = dialog.findViewById(R.id.pb)
progressBar.progress = progress
tvProgress.text = "$progress%"

Log.d("checkVersion", "onSuccess: ${progress}")
.setOnCancelListener {
SPUtils.getInstance().put("last_tip_time${version.version_code}", Date().time)
}
.setCustomDownloadingDialogListener(object : CustomDownloadingDialogListener {
@SuppressLint("SetTextI18n")
override fun updateUI(dialog: Dialog?, progress: Int, versionBundle: UIData?) {
val tvProgress: TextView = dialog!!.findViewById(R.id.tv_progress)
val progressBar: ContentLoadingProgressBar = dialog.findViewById(R.id.pb)
progressBar.progress = progress
tvProgress.text = "$progress%"

Log.d("checkVersion", "onSuccess: ${progress}")
}

override fun getCustomDownloadingDialog(
context: Context?,
progress: Int,
versionBundle: UIData?
): Dialog {
val downDialog = BaseDialog(
context!!,
R.style.BaseDialog,
R.layout.download_dialog
)
downDialog.hideNavigationBar()
return downDialog
}
override fun getCustomDownloadingDialog(
context: Context?,
progress: Int,
versionBundle: UIData?
): Dialog {
val downDialog = BaseDialog(
context!!,
R.style.BaseDialog,
R.layout.download_dialog
)
downDialog.hideNavigationBar()
return downDialog
}

})
.executeMission(this)
}

})
.executeMission(this)
}

override fun onLeaveIDsSuccess(list: MutableList<LeaveID>) {
@@ -608,7 +635,7 @@ class MainActivity : BaseActivity<MainPresenter>(), NetworkUtils.OnNetworkStatus
}

override fun onStop() {
mHandler.removeCallbacks(runnable)
// mHandler.removeCallbacks(runnable)
super.onStop()
EventBus.getDefault().unregister(this)
}
@@ -622,12 +649,15 @@ class HomePagerAdapter(act: AppCompatActivity) : FragmentStateAdapter(act) {
0 -> {
return ClassBrandFragment.getNewInstance()
}

1 -> {
return ChangeFragment.getNewInstance()
}

2 -> {
return VisitorFragment.getNewInstance()
}

3 -> {
return MyFragment.getNewInstance()
}


+ 3
- 0
app/src/main/java/com/yzx/ebrand/config/YzxInterface.kt Parādīt failu

@@ -49,4 +49,7 @@ object YzxInterface {
const val INTERFACE_CLASS_BRAND_ACTIVE_INFO = "/edu/electronicClassBoard/getClassDynamics" //班级动态
const val INTERFACE_CLASS_BRAND_TIME_TABLE_INFO = "/edu/electronicClassBoard/getTodayClassSchedule" //今日课表
const val INTERFACE_GET_VOTE_TEA_CLASS= "/edu/vote/getMyClassList" //班主任获取自己的班级
const val INTERFACE_CEE_GET_SET_GRADE_CLASS= "/cee/collegeEntranceExamination/courseSchedule/getGradeClassListByCourseScheduleId" //课表
const val INTERFACE_SCHEDULE_GET_COURSE_TIMETABLE= "/edu/electronicClassBoard/getCourseTimetable"//获取课表
const val INTERFACE_SCHEDULE_GET_COURSE_TIMETABLE_TEA= "/edu/electronicClassBoard/getCourseTimetableTeacherInfo"//获取课表任课老师
}

+ 142
- 8
app/src/main/java/com/yzx/ebrand/fragment/ClassBrandFragment.kt Parādīt failu

@@ -1,11 +1,13 @@
package com.yzx.ebrand.fragment

import android.annotation.SuppressLint
import android.app.ActionBar.LayoutParams
import android.graphics.Color
import android.os.Handler
import android.os.Looper
import android.view.LayoutInflater
import android.view.View
import android.widget.LinearLayout
import com.blankj.utilcode.util.ActivityUtils
import com.blankj.utilcode.util.LogUtils
import com.blankj.utilcode.util.SPUtils
@@ -32,8 +34,13 @@ import kotlinx.android.synthetic.main.layout_brand_image_info.*
import kotlinx.android.synthetic.main.layout_brand_tea_info.*
import kotlinx.android.synthetic.main.layout_brand_timetable_info.*
import kotlinx.android.synthetic.main.layout_class_active_item.view.*
import kotlinx.android.synthetic.main.layout_class_empty.view.emptyMsg
import kotlinx.android.synthetic.main.layout_class_tea_item.view.*
import kotlinx.android.synthetic.main.layout_time_table_item.view.*
import kotlinx.android.synthetic.main.timetable_cell1.view.cell1
import kotlinx.android.synthetic.main.timetable_cell2.view.ttSubjectName
import kotlinx.android.synthetic.main.timetable_cell2.view.ttTeaName
import kotlinx.android.synthetic.main.timetable_row.view.row
import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode
@@ -185,17 +192,19 @@ class ClassBrandFragment : BaseFragment<ClassBrandPresenter>(), ClassBrandView {

}

private fun getClassInfo(){
private fun getClassInfo() {
mPresenter?.getClassInfo(currClass.class_id.toString())
LogUtils.d("请求时间",TimeUtils.getNowString())
LogUtils.d("请求时间", TimeUtils.getNowString())
}

private fun getOtherData() {
mPresenter?.getImageInfo(currClass.class_id.toString())
unitName.postDelayed({
mPresenter?.getTeaList(currClass.class_id.toString())
mPresenter?.getTimeTable(currClass.class_id.toString())
// mPresenter?.getTeaList(currClass.class_id.toString())
mPresenter?.getTeaListV2(currClass.class_id.toString())
mPresenter?.getActiveInfo(currClass.class_id.toString())
// mPresenter?.getTimeTable(currClass.class_id.toString())
mPresenter?.getTimeTableV2(currClass.class_id.toString(), currClass.grade_id.toString())
}, 300)
}

@@ -215,7 +224,7 @@ class ClassBrandFragment : BaseFragment<ClassBrandPresenter>(), ClassBrandView {
getOtherData()
mClassInfoHandler.removeCallbacks(mClassInfoRunnable)
getClassInfo()
mClassInfoHandler.postDelayed(mClassInfoRunnable,mClassInfoLoopTime)
mClassInfoHandler.postDelayed(mClassInfoRunnable, mClassInfoLoopTime)
classNameTv.text = "${currClass.grade_name}${currClass.class_name}"
classStar.setStar(currClass.star_num)
classSwIcon.visibility = if (list.size > 1) {
@@ -270,7 +279,28 @@ class ClassBrandFragment : BaseFragment<ClassBrandPresenter>(), ClassBrandView {
leaveCountTv.text = "请假:${info.leave_num}人"

mClassInfoHandler.removeCallbacks(mClassInfoRunnable)
mClassInfoHandler.postDelayed(mClassInfoRunnable,mClassInfoLoopTime)
mClassInfoHandler.postDelayed(mClassInfoRunnable, mClassInfoLoopTime)
}
}

override fun onTeaListSuccessV2(list: MutableList<ClassTeaInfo>) {
classTeaListLL.removeAllViews()
list.forEachIndexed { index, it ->
val itemView =
LayoutInflater.from(activity).inflate(R.layout.layout_class_tea_item, null, false)
if (index % 2 == 0) {
itemView.setBackgroundColor(Color.parseColor("#5682ff"))
} else {
itemView.setBackgroundColor(Color.parseColor("#005682ff"))
}
itemView.teaSubjectNameTv.text = it.subject_name
itemView.teaUserNameTv.text = it.user_name
classTeaListLL.addView(itemView)
}
if (list.size == 0) {
val emptyView =
LayoutInflater.from(activity).inflate(R.layout.layout_class_empty, null, false)
classTeaListLL.addView(emptyView)
}
}

@@ -321,6 +351,110 @@ class ClassBrandFragment : BaseFragment<ClassBrandPresenter>(), ClassBrandView {
}
}

override fun onTimeTableSuccessV2(list: MutableList<TimeTableV2>) {

timeTableLL.removeAllViews()
if (list.size == 0) {
val emptyView =
LayoutInflater.from(activity).inflate(R.layout.layout_class_empty, null, false)
val layoutParams = LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, 500)
emptyView.layoutParams = layoutParams
emptyView.emptyMsg.text = "暂无课表信息"
timeTableLL.addView(emptyView)
return
}
val weekList = mutableListOf<String>()
val periodList = mutableListOf<String>()
list.forEach {
if (weekList.indexOf(it.week_name) == -1) {
weekList.add(it.week_name)
}
if (periodList.indexOf(it.period_name) == -1) {
periodList.add(it.period_name)
}
}
val timetableList = mutableListOf<LessonObj>()
periodList.forEach { period ->
val tempList = list.filter {
return@filter it.period_name == period
}
val tempObj = LessonObj()
tempObj.period_name = period
weekList.forEach { week ->
val subjectList = tempList.filter {
return@filter it.week_name == week && it.subject_name?.isNotEmpty() == true
}
val lessonSubject = LessonSubject()
lessonSubject.week_name = week
lessonSubject.list.addAll(subjectList)
tempObj.list.add(lessonSubject)
}
timetableList.add(tempObj)
}


val weekItemView =
LayoutInflater.from(activity).inflate(R.layout.timetable_row, null, false)
// weekItemView.setBackgroundColor(Color.parseColor("#33ffffff"))
weekList.forEach { week ->
val itemCell1View =
LayoutInflater.from(activity).inflate(R.layout.timetable_cell1, null, false)
itemCell1View.cell1.removeAllViews()
val itemCell2View =
LayoutInflater.from(activity).inflate(R.layout.timetable_cell2, null, false)
itemCell2View.ttSubjectName.text = week
itemCell2View.ttTeaName.visibility = View.GONE
itemCell1View.cell1.addView(itemCell2View)
val layoutParams = LinearLayout.LayoutParams(0, LayoutParams.WRAP_CONTENT)
layoutParams.weight = 1F
itemCell1View.layoutParams = layoutParams
weekItemView.row.addView(itemCell1View)
}
timeTableLL.addView(weekItemView)

timetableList.forEachIndexed { index, it ->
val itemRow =
LayoutInflater.from(activity).inflate(R.layout.timetable_row, null, false)
if (index % 2 == 0) {
itemRow.setBackgroundColor(Color.parseColor("#33ffffff"))
} else {
itemRow.setBackgroundColor(Color.parseColor("#00ffffff"))
}
itemRow.ttSubjectName.text = it.period_name
itemRow.ttTeaName.visibility = View.GONE
val obj = it.list.find { return@find it.list.size > 0 }
if (obj != null) {
it.list.forEach { lessonSubject ->
val itemCell1View =
LayoutInflater.from(activity).inflate(R.layout.timetable_cell1, null, false)
itemCell1View.cell1.removeAllViews()
lessonSubject.list.forEach { timeTableV2 ->
if (timeTableV2.subject_name?.isNotEmpty() == true) {
val itemCell2View =
LayoutInflater.from(activity)
.inflate(R.layout.timetable_cell2, null, false)
itemCell2View.ttSubjectName.text = timeTableV2.subject_name
if (timeTableV2.teacher_name?.isNotEmpty() == true) {
itemCell2View.ttTeaName.text = "(${timeTableV2.teacher_name})"
} else {
itemCell2View.ttTeaName.visibility = View.GONE
}
itemCell1View.cell1.addView(itemCell2View)
}

}
val layoutParams = LinearLayout.LayoutParams(0, LayoutParams.WRAP_CONTENT)
layoutParams.weight = 1F
itemCell1View.layoutParams = layoutParams
itemRow.row.addView(itemCell1View)
}
}


timeTableLL.addView(itemRow)
}
}

private fun previewActiveImg(item: ClassActiveInfo, view: View) {
val list = item.getImgUrls()
if (list.size <= 0) {
@@ -390,6 +524,7 @@ class ClassBrandFragment : BaseFragment<ClassBrandPresenter>(), ClassBrandView {
when {
list.size == 0 -> {
imgEmpty.visibility = View.VISIBLE
imgEmpty.emptyMsg.text = "暂无班级风采信息"
styleImgBox.visibility = View.GONE
}

@@ -441,7 +576,7 @@ class ClassBrandFragment : BaseFragment<ClassBrandPresenter>(), ClassBrandView {
// styleImgBox.removeCallbacks(null)
// this.loopImg(list)
mTimeHandler.removeCallbacks(timeRunnable)
mTimeHandler.postDelayed(timeRunnable,6000)
mTimeHandler.postDelayed(timeRunnable, 6000)
}
}

@@ -458,7 +593,6 @@ class ClassBrandFragment : BaseFragment<ClassBrandPresenter>(), ClassBrandView {
}



private fun loopImg(list: MutableList<ClassStylePic>) {
if (this.imgIndex + 3 > list.size - 1) {
this.imgIndex = list.size - 1 - 3


+ 20
- 1
app/src/main/java/com/yzx/ebrand/model/CBClassInfo.kt Parādīt failu

@@ -36,7 +36,21 @@ data class TimeTable(
val subject_id: String = "",
val subject_name: String = "",
)
data class TimeTableV2(
val period_name: String = "",
val subject_name: String ?= "",
val week_name: String = "",
val teacher_name: String ?= "",
)

data class LessonSubject(
var week_name: String = "",
val list: MutableList<TimeTableV2> = mutableListOf()
)
data class LessonObj(
var period_name: String = "",
val list: MutableList<LessonSubject> = mutableListOf()
)
data class ClassActiveInfo(
val add_time: Int = 0,
val user_name: String = "",
@@ -73,4 +87,9 @@ data class HeadClassInfo(
val grade_id: Int = 0,
val grade_name: String = "",
val star_num: Int = 0,
)
)

data class TimetableTea(
val subject_name: String = "",
val user_name: String = "",
)

+ 55
- 1
app/src/main/java/com/yzx/ebrand/presenter/ClassBrandPresenter.kt Parādīt failu

@@ -11,6 +11,7 @@ import com.yzx.ebrand.model.ClassStylePic
import com.yzx.ebrand.model.ClassTeaInfo
import com.yzx.ebrand.model.HeadClassInfo
import com.yzx.ebrand.model.TimeTable
import com.yzx.ebrand.model.TimeTableV2
import com.yzx.ebrand.model.User
import com.yzx.ebrand.presenter.base.BasePresenter
import com.yzx.ebrand.presenter.base.IView
@@ -92,6 +93,31 @@ class ClassBrandPresenter(view: ClassBrandView) : BasePresenter<ClassBrandView>(
})
}

fun getTeaListV2(class_id: String){
if(User.getUser().token.isEmpty()){
return
}
val url = "${Config.BASE_URL}${YzxInterface.INTERFACE_SCHEDULE_GET_COURSE_TIMETABLE_TEA}"
OkGo.post<YzxResponse<ClassTeaInfo>>(url)
.tag(this)
.params("class_id", class_id)
.execute(object : JsonCallBack<YzxResponse<ClassTeaInfo>>() {

override fun onSuccess(response: Response<YzxResponse<ClassTeaInfo>>?) {
LogUtils.d(response)
if (response?.isSuccessful == true) {
mView?.onTeaListSuccessV2(response.body().list)
}
}

override fun onError(response: Response<YzxResponse<ClassTeaInfo>>?) {
super.onError(response)
LogUtils.d(response)
// mView?.onListError(response?.body()?.msg ?: "")
}
})
}

fun getTimeTable(class_id: String){
if(User.getUser().token.isEmpty()){
return
@@ -116,6 +142,31 @@ class ClassBrandPresenter(view: ClassBrandView) : BasePresenter<ClassBrandView>(
})
}

fun getTimeTableV2(class_id: String,grade_id:String){
if(User.getUser().token.isEmpty()){
return
}
val url = "${Config.BASE_URL}${YzxInterface.INTERFACE_SCHEDULE_GET_COURSE_TIMETABLE}"
OkGo.post<YzxResponse<TimeTableV2>>(url)
.tag(this)
.params("class_id", class_id)
.params("grade_id", grade_id)
.execute(object : JsonCallBack<YzxResponse<TimeTableV2>>() {

override fun onSuccess(response: Response<YzxResponse<TimeTableV2>>?) {
LogUtils.d(response)
if (response?.isSuccessful == true) {
mView?.onTimeTableSuccessV2(response.body().list)
}
}

override fun onError(response: Response<YzxResponse<TimeTableV2>>?) {
super.onError(response)
LogUtils.d(response)
}
})
}

fun getActiveInfo(class_id:String){
if(User.getUser().token.isEmpty()){
return
@@ -169,8 +220,11 @@ interface ClassBrandView : IView {
fun onHeadClassSuccess(list:MutableList<HeadClassInfo>)
fun onAvatarSuccess(identity:String,head_portrait:String)
fun onClassInfoSuccess(info: CBClassInfo)
fun onTeaListSuccess(list:MutableList<ClassTeaInfo>)
fun onTimeTableSuccess(list:MutableList<TimeTable>)
fun onTeaListSuccess(list:MutableList<ClassTeaInfo>)
fun onTeaListSuccessV2(list:MutableList<ClassTeaInfo>)

fun onTimeTableSuccessV2(list:MutableList<TimeTableV2>)
fun onActiveInfoSuccess(list:MutableList<ClassActiveInfo>)
fun onImageInfoSuccess(list: MutableList<ClassStylePic>)
}

+ 55
- 16
app/src/main/res/layout/fragment_class_brand.xml Parādīt failu

@@ -71,7 +71,7 @@
<com.yzx.ebrand.widget.ClassStar
android:id="@+id/classStar"
android:layout_width="wrap_content"
android:layout_height="32dp"/>
android:layout_height="32dp" />

</androidx.appcompat.widget.LinearLayoutCompat>

@@ -111,13 +111,17 @@

<AbsoluteLayout
android:layout_width="match_parent"
android:layout_height="108dp">
android:layout_height="90dp"
android:clipChildren="false"
android:clipToPadding="false">

<ImageView
android:layout_width="112dp"
android:layout_height="108dp"
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_x="1280dp"
android:layout_y="0dp"
android:clipChildren="false"
android:clipToPadding="false"
android:src="@mipmap/ic_ya" />
</AbsoluteLayout>
</RelativeLayout>
@@ -143,22 +147,57 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:paddingHorizontal="@dimen/d_20"
android:paddingBottom="@dimen/d_20">
android:orientation="vertical">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal">

<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:paddingStart="@dimen/d_20"
android:paddingEnd="@dimen/d_20">

<include layout="@layout/layout_brand_timetable_info" />
</LinearLayout>

<LinearLayout
android:layout_width="420dp"
android:layout_height="match_parent"
android:orientation="vertical">

<include layout="@layout/layout_brand_active_info" />
</LinearLayout>
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="300dp"
android:orientation="vertical"
android:layout_marginTop="@dimen/d_20"
android:paddingStart="@dimen/d_20"
android:paddingBottom="@dimen/d_20">

<include layout="@layout/layout_brand_image_info" />
</LinearLayout>

<include layout="@layout/layout_brand_image_info" />
</LinearLayout>

<LinearLayout
android:layout_width="420dp"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/d_20">

<include layout="@layout/layout_brand_timetable_info" />
<!-- <LinearLayout-->
<!-- android:layout_width="420dp"-->
<!-- android:layout_height="match_parent"-->
<!-- android:orientation="vertical"-->
<!-- android:paddingBottom="@dimen/d_20">-->

<include layout="@layout/layout_brand_active_info" />
</LinearLayout>
<!-- <include layout="@layout/layout_brand_timetable_info" />-->

<!-- <include layout="@layout/layout_brand_active_info" />-->
<!-- </LinearLayout>-->
</LinearLayout>
</LinearLayout>

+ 0
- 1
app/src/main/res/layout/layout_brand_active_info.xml Parādīt failu

@@ -2,7 +2,6 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="420dp"
android:layout_marginTop="@dimen/d_20"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@drawable/shape_green"


+ 1
- 1
app/src/main/res/layout/layout_brand_class_info.xml Parādīt failu

@@ -9,7 +9,7 @@

<LinearLayout
android:layout_width="match_parent"
android:layout_height="155dp"
android:layout_height="128dp"
android:orientation="horizontal">

<com.qmuiteam.qmui.widget.QMUIRadiusImageView


+ 19
- 19
app/src/main/res/layout/layout_brand_image_info.xml Parādīt failu

@@ -8,24 +8,23 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/bg_img"
android:orientation="vertical">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:includeFontPadding="false"
android:paddingVertical="@dimen/d_20"
android:text="班级风采"
android:textColor="@color/white"
android:textSize="40dp"
android:textStyle="bold" />
<!-- <TextView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:gravity="center"-->
<!-- android:includeFontPadding="false"-->
<!-- android:paddingVertical="@dimen/d_20"-->
<!-- android:text="班级风采"-->
<!-- android:textColor="@color/white"-->
<!-- android:textSize="40dp"-->
<!-- android:textStyle="bold" />-->

<include
android:id="@+id/imgEmpty"
layout="@layout/layout_class_empty"
android:visibility="gone" />
android:visibility="visible" />

<LinearLayout
android:id="@+id/styleImgBox"
@@ -35,17 +34,11 @@
android:paddingHorizontal="@dimen/d_30"
android:paddingBottom="@dimen/d_20">

<ImageView
android:id="@+id/styleImg0"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:scaleType="centerCrop" />

<LinearLayout
android:id="@+id/styleImgLL"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_height="270dp"
android:layout_marginTop="@dimen/d_20"
android:orientation="horizontal">

@@ -54,11 +47,18 @@
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent" />-->

<ImageView
android:id="@+id/styleImg0"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:scaleType="centerCrop" />

<ImageView
android:id="@+id/styleImg1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/d_20"
android:layout_weight="1"
android:scaleType="centerCrop" />



+ 15
- 14
app/src/main/res/layout/layout_brand_timetable_info.xml Parādīt failu

@@ -1,23 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="420dp"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@drawable/shape_purple"
android:orientation="vertical"
android:paddingBottom="@dimen/d_20">
android:orientation="vertical">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:includeFontPadding="false"
android:paddingVertical="@dimen/d_20"
android:text="今日课程表"
android:textColor="@color/white"
android:textSize="40dp"
android:textStyle="bold" />
<!-- <TextView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:gravity="center"-->
<!-- android:includeFontPadding="false"-->
<!-- android:paddingVertical="@dimen/d_20"-->
<!-- android:text="今日课程表"-->
<!-- android:textColor="@color/white"-->
<!-- android:textSize="40dp"-->
<!-- android:textStyle="bold" />-->

<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
@@ -27,7 +26,9 @@
android:id="@+id/timeTableLL"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical"
android:paddingVertical="@dimen/d_15">


</LinearLayout>
</androidx.core.widget.NestedScrollView>

+ 1
- 0
app/src/main/res/layout/layout_class_empty.xml Parādīt failu

@@ -9,6 +9,7 @@
android:layout_height="129dp"
android:src="@mipmap/empty_view_img"/>
<TextView
android:id="@+id/emptyMsg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="暂无数据"


+ 14
- 0
app/src/main/res/layout/timetable_cell1.xml Parādīt failu

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/cell1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center"
tools:showIn="@layout/timetable_row">

<include layout="@layout/timetable_cell2" />

</LinearLayout>

+ 29
- 0
app/src/main/res/layout/timetable_cell2.xml Parādīt failu

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/cell2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="0dp"
android:gravity="center"
android:orientation="horizontal"
android:padding="0dp">

<TextView
android:id="@+id/ttSubjectName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:text=""
android:textColor="@color/white"
android:textSize="@dimen/d_20" />

<TextView
android:id="@+id/ttTeaName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:text=""
android:textColor="@color/gray_2"
android:textSize="@dimen/d_16" />
</LinearLayout>

+ 14
- 0
app/src/main/res/layout/timetable_row.xml Parādīt failu

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/row"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="@dimen/d_10"
android:paddingBottom="@dimen/d_10"
android:gravity="center_vertical">

<include layout="@layout/timetable_cell1" />

</LinearLayout>

+ 0
- 1
app/src/main/res/values/strings.xml Parādīt failu

@@ -1,5 +1,4 @@
<resources>
<string name="app_name">电子班牌</string>
<string name="update_title">检测到新版本</string>
<string name="updatecontent">解决了若干bug</string>
</resources>

Notiek ielāde…
Atcelt
Saglabāt