Commit 174bae57 authored by mengcuiguang2's avatar mengcuiguang2

代码优化

parent a5f84795
......@@ -92,6 +92,7 @@
<activity android:name=".main.my.MoresettingsActivity"/>
<activity android:name=".main.my.AboutusActivity"/>
<activity android:name=".main.my.PermissionsActivity"/>
<activity android:name=".main.home.HistoricalimageActivity"/>
<!-- ShareSDK start -->
<activity
......
package com.mints.street.main.home
import android.os.Bundle
import android.view.View
import com.coorchice.library.utils.LogUtils
import com.fry.base.base.BaseActivity
import com.mints.street.BR
import com.mints.street.R
import com.mints.street.databinding.ActivityHistoricalImageBinding
import kotlinx.android.synthetic.main.activity_historical_image.*
import me.goldze.mvvmhabit.utils.ToastUtils
/**
* 描述:历史影像
* 作者:孟崔广
* 时间:2021/7/12 17:51
*/
class HistoricalimageActivity :BaseActivity<ActivityHistoricalImageBinding, HistoricalimageModel>(), View.OnClickListener {
override fun initVariableId() = BR.viewModel
override fun initContentView(savedInstanceState: Bundle?)= R.layout.activity_historical_image
override fun initData() {
super.initData()
initView()
}
private fun initView() {
}
override fun onClick(v: View?) {
}
}
package com.mints.street.main.home
import android.app.Application
import me.goldze.mvvmhabit.base.BaseViewModel
class HistoricalimageModel(application: Application): BaseViewModel(application) {
}
\ No newline at end of file
......@@ -16,6 +16,7 @@ import com.mints.street.BR
import com.mints.street.R
import com.mints.street.databinding.FragmentMyBinding
import com.mints.street.login.LoginActivity
import com.mints.street.main.home.HistoricalimageActivity
import kotlinx.android.synthetic.main.fragment_my.*
......@@ -73,7 +74,8 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), View.OnClickL
override fun onClick(v: View?) {
when (v?.id) {
R.id.ly_aboutus -> {
startActivity(AboutusActivity::class.java)
// startActivity(AboutusActivity::class.java)
startActivity(HistoricalimageActivity::class.java)
}
R.id.ly_moresettings -> {
startActivity(MoresettingsActivity::class.java)
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="ViewModel"
type="com.mints.street.main.home.HistoricalimageModel" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent">
</LinearLayout>
</layout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment