首页banner修改
This commit is contained in:
@@ -12,8 +12,6 @@ import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.ViewModelStore
|
||||
import androidx.lifecycle.ViewModelStoreOwner
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.load.model.GlideUrl
|
||||
import com.lzy.ninegrid.NineGridView
|
||||
import com.orhanobut.logger.AndroidLogAdapter
|
||||
import com.orhanobut.logger.Logger
|
||||
@@ -47,7 +45,6 @@ import com.xjjk.healthyclients.utils.updateplugin.CustomDownloadNotifier
|
||||
import com.xjjk.healthyclients.utils.updateplugin.CustomInstallNotifier
|
||||
import com.xjjk.healthyclients.utils.updateplugin.CustomUpdateNotifier
|
||||
import com.xjjk.healthyclients.view.AppraiseDialog
|
||||
import okhttp3.OkHttpClient
|
||||
import org.json.JSONException
|
||||
import org.json.JSONObject
|
||||
import org.lzh.framework.updatepluginlib.UpdateConfig
|
||||
@@ -98,9 +95,6 @@ class MyApplication : Application(), ViewModelStoreOwner {
|
||||
registerActivityLifecycleCallbacks(AdjustLifecycleCallbacks())
|
||||
val androidId = DevicesInfoUtils.getAndroidId(this)
|
||||
println("设备id:${androidId}")
|
||||
if (UrlConfig.testDeviceList.contains(androidId)) {
|
||||
UrlConfig.isTestDevice = true
|
||||
}
|
||||
}
|
||||
|
||||
override fun attachBaseContext(base: Context) {
|
||||
|
||||
@@ -32,7 +32,8 @@ interface HomeApi {
|
||||
/**
|
||||
* 首页banner
|
||||
*/
|
||||
@GET("/sys/api/banner/selectBannerList")
|
||||
// @GET("/sys/api/banner/selectBannerList")
|
||||
@GET("/sys/api/banner/selectAllBannerList")
|
||||
suspend fun getHomeBannerList(@QueryMap params: MutableMap<String, Any?>): ApiResponse<MutableList<HomeBannerBean>>
|
||||
|
||||
/**
|
||||
@@ -64,4 +65,10 @@ interface HomeApi {
|
||||
@POST("/health-system/bank/userPoints/app/pointCheckIn")
|
||||
suspend fun postUserPointsCheckIn(@Body requestBody: RequestBody): ApiResponse<CheckInBean>
|
||||
|
||||
/**
|
||||
* 心理帮助图片url
|
||||
*/
|
||||
@GET("/health-consultation/consultation/conSession/getPicUrl")
|
||||
suspend fun getConSessionPicUrl(@QueryMap params: MutableMap<String, Any?>): ApiResponse<String>
|
||||
|
||||
}
|
||||
@@ -37,9 +37,9 @@ object HomeRepository : BaseRepository() {
|
||||
return apiCall { service.getHomeNoticeDetail(map) }
|
||||
}
|
||||
|
||||
suspend fun getHomeBannerList(showLocation: String): ApiResponse<MutableList<HomeBannerBean>> {
|
||||
suspend fun getHomeBannerList(): ApiResponse<MutableList<HomeBannerBean>> {
|
||||
val map = mutableMapOf<String, Any?>()
|
||||
map["showLocation"] = showLocation
|
||||
// map["showLocation"] = showLocation
|
||||
return apiCall { service.getHomeBannerList(map) }
|
||||
}
|
||||
|
||||
@@ -75,4 +75,9 @@ object HomeRepository : BaseRepository() {
|
||||
suspend fun postUserPointsCheckIn(checkInBean: CheckInBean): ApiResponse<CheckInBean> {
|
||||
return apiCall { service.postUserPointsCheckIn(checkInBean.toJson().toRequestBody()) }
|
||||
}
|
||||
|
||||
suspend fun getConSessionPicUrl(): ApiResponse<String> {
|
||||
val map = mutableMapOf<String, Any?>()
|
||||
return apiCall { service.getConSessionPicUrl(map) }
|
||||
}
|
||||
}
|
||||
@@ -18,9 +18,8 @@ import com.xjjk.healthyclients.databinding.FragmentHomeBinding
|
||||
import com.xjjk.healthyclients.event.HomeTabChangeEvent
|
||||
import com.xjjk.healthyclients.event.RefreshEvent
|
||||
import com.xjjk.healthyclients.superfuntion.initColors
|
||||
import com.xjjk.healthyclients.superfuntion.load
|
||||
import com.xjjk.healthyclients.superfuntion.showBanner
|
||||
import com.xjjk.healthyclients.superfuntion.startAppointmentWaitAffirmActivity
|
||||
import com.xjjk.healthyclients.superfuntion.startEmergencySeekDoctorActivity
|
||||
import com.xjjk.healthyclients.superfuntion.startGroupChat
|
||||
import com.xjjk.healthyclients.superfuntion.startLoginActivity
|
||||
import com.xjjk.healthyclients.superfuntion.startMyGuidanceActivity
|
||||
@@ -113,41 +112,57 @@ class HomeFragment :
|
||||
}
|
||||
|
||||
override fun bindEvent() {
|
||||
mBinding.headImg.setOnClickListener {
|
||||
toActivity(HomeNoticeListActivity::class.java)
|
||||
mBinding.homeMarqueeView.setOnItemClickListener { position, textView ->
|
||||
if (DataStoreManager.isLogin()) {
|
||||
toActivity(HomeNoticeListActivity::class.java)
|
||||
}
|
||||
|
||||
}
|
||||
mBinding.apply {
|
||||
addClickViews(
|
||||
image1, image2, image3, image4, layoutItem4.imgLeft, layoutItem4.imgRight,
|
||||
addClickViews(layoutItem4.imgLeft, layoutItem4.imgRight,
|
||||
layoutItem1.homeHeadTab1, layoutItem1.homeHeadTab2, layoutItem1.homeHeadTab3,
|
||||
layoutItem1.homeHeadTab4, homeMarqueeView, layoutItem3.tvDoctorMore
|
||||
layoutItem1.homeHeadTab4, layoutItem3.tvDoctorMore
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
when (v?.id) {
|
||||
R.id.img_left, R.id.img_right, R.id.home_head_tab1, R.id.home_head_tab2, R.id.home_head_tab4,
|
||||
R.id.image1, R.id.image4 -> {
|
||||
toActivity(EmptyActivity::class.java)
|
||||
R.id.img_left -> {
|
||||
val bundle = Bundle()
|
||||
bundle.putString("title","智慧体重")
|
||||
toActivity(EmptyActivity::class.java,bundle)
|
||||
}
|
||||
|
||||
R.id.image2 -> {
|
||||
toActivity(HomeBannerDetailActivity::class.java)
|
||||
|
||||
R.id.img_right -> {
|
||||
val bundle = Bundle()
|
||||
bundle.putString("title","一人一案")
|
||||
toActivity(EmptyActivity::class.java,bundle)
|
||||
}
|
||||
|
||||
R.id.image3 -> {
|
||||
EventBus.getDefault().post(HomeTabChangeEvent().apply { index=1 })
|
||||
R.id.home_head_tab1 -> {
|
||||
val bundle = Bundle()
|
||||
bundle.putString("title","健康档案")
|
||||
toActivity(EmptyActivity::class.java,bundle)
|
||||
}
|
||||
|
||||
R.id.home_head_tab2 -> {
|
||||
val bundle = Bundle()
|
||||
bundle.putString("title","健康体检")
|
||||
toActivity(EmptyActivity::class.java,bundle)
|
||||
}
|
||||
|
||||
R.id.home_head_tab4 -> {
|
||||
val bundle = Bundle()
|
||||
bundle.putString("title","健康银行")
|
||||
toActivity(EmptyActivity::class.java,bundle)
|
||||
}
|
||||
|
||||
R.id.home_head_tab3 -> {
|
||||
startEmergencySeekDoctorActivity(requireContext())
|
||||
}
|
||||
|
||||
R.id.home_marqueeView -> {
|
||||
if (DataStoreManager.isLogin()) {
|
||||
toActivity(HomeNoticeListActivity::class.java)
|
||||
EventBus.getDefault().post(HomeTabChangeEvent().apply { index = 2 })
|
||||
} else {
|
||||
startLoginActivity(requireContext())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,10 +187,10 @@ class HomeFragment :
|
||||
super.onResume()
|
||||
if (DataStoreManager.isLogin()) {
|
||||
mBinding.tvHi.visibility = View.VISIBLE
|
||||
mBinding.homeMarqueeView.visibility = View.VISIBLE
|
||||
mBinding.layoutNotice.visibility = View.VISIBLE
|
||||
mBinding.tvHi.text = "hi~ ${DataStoreManager.getUserInfo().realname}"
|
||||
} else {
|
||||
mBinding.homeMarqueeView.visibility = View.GONE
|
||||
mBinding.layoutNotice.visibility = View.GONE
|
||||
mBinding.tvHi.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
@@ -188,10 +203,47 @@ class HomeFragment :
|
||||
if (it.isNullOrEmpty()) {
|
||||
return@collectLatest
|
||||
}
|
||||
mBinding.image1.load(it.get(0).photoUrl, false)
|
||||
mBinding.image2.load(it.get(1).photoUrl, false)
|
||||
mBinding.image3.load(it.get(2).photoUrl, false)
|
||||
mBinding.image4.load(it.get(3).photoUrl, false)
|
||||
val bannerList1 = it.filter { homeBannerBean ->
|
||||
homeBannerBean.showLocation.equals("1")
|
||||
}.sortedBy { homeBannerBean -> homeBannerBean.sort }
|
||||
|
||||
val bannerList2 = it.filter { homeBannerBean ->
|
||||
homeBannerBean.showLocation.equals("2")
|
||||
}.sortedBy { homeBannerBean -> homeBannerBean.sort }
|
||||
|
||||
val bannerList3 = it.filter { homeBannerBean ->
|
||||
homeBannerBean.showLocation.equals("3")
|
||||
}.sortedBy { homeBannerBean -> homeBannerBean.sort }
|
||||
|
||||
val bannerList4 = it.filter { homeBannerBean ->
|
||||
homeBannerBean.showLocation.equals("4")
|
||||
}.sortedBy { homeBannerBean -> homeBannerBean.sort }
|
||||
|
||||
showBanner(mBinding.banner1,bannerList1){
|
||||
val bundle = Bundle()
|
||||
bundle.putString("title","体检套餐")
|
||||
toActivity(EmptyActivity::class.java,bundle)
|
||||
|
||||
}
|
||||
showBanner(mBinding.banner2,bannerList2){
|
||||
|
||||
toActivity(HomeBannerDetailActivity::class.java)
|
||||
}
|
||||
|
||||
showBanner(mBinding.banner3, bannerList3) {
|
||||
if (DataStoreManager.isLogin()) {
|
||||
EventBus.getDefault().post(HomeTabChangeEvent().apply { index = 1 })
|
||||
} else {
|
||||
startLoginActivity(requireContext())
|
||||
}
|
||||
}
|
||||
showBanner(mBinding.banner4, bannerList4) {
|
||||
val bundle = Bundle()
|
||||
bundle.putString("title", "AI随访")
|
||||
toActivity(EmptyActivity::class.java, bundle)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -209,6 +261,8 @@ class HomeFragment :
|
||||
mBinding.homeMarqueeView.stopFlipping()
|
||||
delay(100)
|
||||
mBinding.homeMarqueeView.startWithList(stringList)
|
||||
delay(1000 * 120)
|
||||
mViewModel.getHomeNoticeListRepeat()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -236,11 +290,13 @@ class HomeFragment :
|
||||
|
||||
|
||||
override fun initData() {
|
||||
mViewModel.getHomeBannerList("2")
|
||||
onRefresh()
|
||||
}
|
||||
|
||||
override fun onRefresh() {
|
||||
mBinding.swipeRefresh.isRefreshing = false
|
||||
mViewModel.getHomeBannerList()
|
||||
|
||||
if (ConstantUtils.mCheckToken) {
|
||||
mViewModel.selectDoctorRecommendHome()
|
||||
}
|
||||
|
||||
@@ -55,8 +55,8 @@ class UserInfoFragment :
|
||||
mList.clear()
|
||||
mList.add(UserMenuBean(1, "咨询人管理", R.drawable.ic_user_personnel_manager, View.VISIBLE))
|
||||
mList.add(UserMenuBean(3, "应急就医", R.drawable.ic_user_sos, View.VISIBLE))
|
||||
mList.add(UserMenuBean(4, "消息通知", R.drawable.icon_home_xiaolaba, View.VISIBLE))
|
||||
mList.add(UserMenuBean(8,"紧急联系人",R.drawable.ic_user_contacts,View.INVISIBLE))
|
||||
mList.add(UserMenuBean(8,"紧急联系人",R.drawable.ic_user_contacts,View.VISIBLE))
|
||||
mList.add(UserMenuBean(4, "消息通知", R.drawable.ic_user_message, View.INVISIBLE))
|
||||
|
||||
|
||||
mUserMenuAdapter =
|
||||
|
||||
@@ -13,8 +13,8 @@ object UrlConfig {
|
||||
*/
|
||||
|
||||
|
||||
// private const val DEBUG_DEFAULT_IP_ADDRESS_REMOTE = "http://192.168.1.23/" // 开发环境
|
||||
private const val DEBUG_DEFAULT_IP_ADDRESS_REMOTE = "http://api-xj.tri.dt.io/" // 开发环境
|
||||
private const val DEBUG_DEFAULT_IP_ADDRESS_REMOTE = "http://192.168.1.47" // 开发环境
|
||||
// private const val DEBUG_DEFAULT_IP_ADDRESS_REMOTE = "http://api-xj.tri.dt.io/" // 开发环境
|
||||
private const val TEST_DEFAULT_IP_ADDRESS_REMOTE = "https://xj-api.mcrm.vip:8888" // 测试环境
|
||||
// private const val PRODUCT_DEFAULT_IP_ADDRESS_REMOTE = "https://api.xjygjk.com" // 正式环境
|
||||
private const val PRODUCT_DEFAULT_IP_ADDRESS_REMOTE = "https://api-jkglpt.iosp.ydpt.tech" // 正式环境
|
||||
@@ -32,8 +32,6 @@ object UrlConfig {
|
||||
|
||||
val baseUrlType: BaseUrlType = BaseUrlType.TEST
|
||||
|
||||
var testDeviceList = mutableListOf("7e8e7e49a26340b1","bb2d17cc138d109f")//测试设备列表 荣耀 oppo vivo
|
||||
var isTestDevice: Boolean = false
|
||||
var isOpenIm: Boolean = true
|
||||
|
||||
enum class BaseUrlType(val type: Int) {
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.youth.banner.indicator.CircleIndicator
|
||||
|
||||
fun Fragment.showBanner(
|
||||
banner: Banner<Any, BannerAdapter<Any, *>>,
|
||||
bannerDataList: MutableList<HomeBannerBean>,
|
||||
bannerDataList: List<HomeBannerBean>,
|
||||
listener: ((HomeBannerBean)-> Unit)? = null
|
||||
) {
|
||||
val bannerImageAdapter = object : BannerImageAdapter<HomeBannerBean>(bannerDataList) {
|
||||
@@ -37,6 +37,8 @@ fun Fragment.showBanner(
|
||||
)
|
||||
imageView.layoutParams = params
|
||||
// imageView.scaleType = ImageView.ScaleType.CENTER_CROP
|
||||
imageView.adjustViewBounds = true
|
||||
imageView.scaleType = ImageView.ScaleType.FIT_XY
|
||||
return BannerImageHolder(imageView)
|
||||
}
|
||||
}
|
||||
@@ -47,7 +49,7 @@ fun Fragment.showBanner(
|
||||
.isAutoLoop(true)
|
||||
.setIndicator(CircleIndicator(requireContext()))
|
||||
.setIndicatorGravity(IndicatorConfig.Direction.CENTER)
|
||||
.setIndicatorSelectedWidth(10)
|
||||
.setIndicatorSelectedWidth(15)
|
||||
|
||||
banner.setOnBannerListener { data, position ->
|
||||
data as HomeBannerBean
|
||||
|
||||
@@ -15,6 +15,8 @@ class EmptyActivity :
|
||||
|
||||
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
val stringExtra = intent.getStringExtra("title")
|
||||
mBinding.toolbarLay.title=stringExtra
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
@@ -22,7 +24,6 @@ class EmptyActivity :
|
||||
}
|
||||
|
||||
|
||||
|
||||
override fun bindEvent() {
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -209,7 +209,7 @@ class UserMyGuidanceActivity : BaseVMBActivity<MyGuidanceActivityViewModel, Acti
|
||||
}
|
||||
|
||||
/**
|
||||
* 1 待开始 3 进行中 5已完成
|
||||
* 1 待开始 3 进行中 5已完成 6 历史
|
||||
*/
|
||||
fun orderState(state:Int){
|
||||
mTitleState="$state"
|
||||
|
||||
+17
-2
@@ -2,10 +2,16 @@ package com.xjjk.healthyclients.ui.activity.home
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.lifecycle.Lifecycle
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.lifecycle.repeatOnLifecycle
|
||||
import com.xjjk.healthyclients.R
|
||||
import com.xjjk.healthyclients.base.BaseVMBActivity
|
||||
import com.xjjk.healthyclients.databinding.ActivityHomeBannerBinding
|
||||
import com.xjjk.healthyclients.superfuntion.load
|
||||
import com.xjjk.healthyclients.ui.viewmodel.HomeViewModel
|
||||
import kotlinx.coroutines.flow.collectLatest
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
/**
|
||||
* 首页banner
|
||||
@@ -19,7 +25,7 @@ class HomeBannerDetailActivity :
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
|
||||
mViewModel.getConSessionPicUrl()
|
||||
}
|
||||
|
||||
override fun bindEvent() {
|
||||
@@ -27,7 +33,16 @@ class HomeBannerDetailActivity :
|
||||
|
||||
override fun createObserve() {
|
||||
super.createObserve()
|
||||
|
||||
lifecycleScope.launch {
|
||||
repeatOnLifecycle(Lifecycle.State.CREATED) {
|
||||
mViewModel.sessionPicUrl.collectLatest {
|
||||
if (it.isNullOrEmpty()) {
|
||||
return@collectLatest
|
||||
}
|
||||
mBinding.imgBanner.load(it,false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun processClick(paramView: View?) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.xjjk.healthyclients.ui.viewmodel
|
||||
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.xjjk.healthyclients.base.viewmodel.BaseViewModel
|
||||
import com.xjjk.healthyclients.bean.guidance.GuidanceListBean
|
||||
import com.xjjk.healthyclients.bean.home.HomeBannerBean
|
||||
@@ -9,10 +8,8 @@ import com.xjjk.healthyclients.data.repository.GuidanceRepository
|
||||
import com.xjjk.healthyclients.data.repository.HomeRepository
|
||||
import com.xjjk.healthyclients.superfuntion.handleRequest
|
||||
import com.xjjk.healthyclients.superfuntion.launch
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.flow.MutableSharedFlow
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
class HomeViewModel : BaseViewModel() {
|
||||
|
||||
@@ -22,6 +19,7 @@ class HomeViewModel : BaseViewModel() {
|
||||
var homeNoticeList = MutableSharedFlow<MutableList<HomeNoticeBean>?>()
|
||||
var homeNoticeDetail = MutableSharedFlow<HomeNoticeBean?>()
|
||||
var homeBannerList = MutableSharedFlow<MutableList<HomeBannerBean>?>()
|
||||
var sessionPicUrl = MutableSharedFlow<String?>()
|
||||
|
||||
|
||||
var isRefreshing = MutableStateFlow(false)
|
||||
@@ -88,17 +86,16 @@ class HomeViewModel : BaseViewModel() {
|
||||
* 首页消息轮询
|
||||
*/
|
||||
fun getHomeNoticeListRepeat() {
|
||||
viewModelScope.launch {
|
||||
repeat(100) {
|
||||
launch(
|
||||
showDialog = false,
|
||||
{
|
||||
handleRequest(
|
||||
HomeRepository.getHomeNoticeList(1, 10),
|
||||
successBlock = {
|
||||
homeNoticeRepeat.emit(it.result)
|
||||
})
|
||||
delay(1000 * 120)
|
||||
}
|
||||
|
||||
}
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
@@ -114,11 +111,11 @@ class HomeViewModel : BaseViewModel() {
|
||||
)
|
||||
}
|
||||
|
||||
fun getHomeBannerList(showLocation: String) {
|
||||
fun getHomeBannerList() {
|
||||
launch(
|
||||
{
|
||||
handleRequest(
|
||||
HomeRepository.getHomeBannerList(showLocation),
|
||||
HomeRepository.getHomeBannerList(),
|
||||
successBlock = {
|
||||
homeBannerList.emit(it.result)
|
||||
})
|
||||
@@ -126,4 +123,17 @@ class HomeViewModel : BaseViewModel() {
|
||||
)
|
||||
}
|
||||
|
||||
fun getConSessionPicUrl() {
|
||||
launch(
|
||||
{
|
||||
handleRequest(
|
||||
HomeRepository.getConSessionPicUrl(),
|
||||
successBlock = {
|
||||
sessionPicUrl.emit(it.result)
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 633 B |
@@ -15,8 +15,7 @@
|
||||
<include
|
||||
android:id="@+id/toolbar_lay"
|
||||
layout="@layout/lay_title_bar"
|
||||
app:darkStyle="@{true}"
|
||||
app:title="@{@string/app_name}" />
|
||||
app:darkStyle="@{true}" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
@@ -19,20 +19,15 @@
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1300dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/ic_home_banner_detail" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
app:mvAnimDuration="1000"
|
||||
app:mvDirection="bottom_to_top"
|
||||
app:mvInterval="3000"
|
||||
app:mvSingleLine="false"
|
||||
app:mvSingleLine="true"
|
||||
app:mvTextColor="#77849E"
|
||||
app:mvTextSize="14sp" />
|
||||
|
||||
@@ -97,36 +97,26 @@
|
||||
android:layout_marginHorizontal="6dp"
|
||||
android:layout_marginTop="10dp" />
|
||||
|
||||
<!-- <com.youth.banner.Banner-->
|
||||
<!-- android:id="@+id/banner1"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="120dp"-->
|
||||
<!-- android:layout_below="@+id/layout_item1"-->
|
||||
<!-- android:layout_marginHorizontal="12dp"-->
|
||||
<!-- android:layout_marginTop="10dp" />-->
|
||||
<ImageView
|
||||
android:id="@+id/image1"
|
||||
<com.youth.banner.Banner
|
||||
android:id="@+id/banner1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="65dp"
|
||||
android:layout_marginHorizontal="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@mipmap/ic_home_image1" />
|
||||
android:layout_marginTop="10dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image2"
|
||||
<com.youth.banner.Banner
|
||||
android:id="@+id/banner2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginHorizontal="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@mipmap/ic_home_image2" />
|
||||
android:layout_marginTop="10dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image3"
|
||||
<com.youth.banner.Banner
|
||||
android:id="@+id/banner3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginHorizontal="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@mipmap/ic_home_image3" />
|
||||
android:layout_marginTop="10dp" />
|
||||
|
||||
<include
|
||||
android:id="@+id/layout_item3"
|
||||
@@ -142,20 +132,12 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<!-- <com.youth.banner.Banner-->
|
||||
<!-- android:id="@+id/banner2"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_below="@+id/layout_item4"-->
|
||||
<!-- android:layout_marginHorizontal="12dp"-->
|
||||
<!-- android:layout_marginTop="10dp" />-->
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image4"
|
||||
<com.youth.banner.Banner
|
||||
android:id="@+id/banner4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="12dp"
|
||||
android:background="@mipmap/ic_home_image4" />
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginHorizontal="12dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:background="@mipmap/ic_xiaolaba" />
|
||||
|
||||
<TextView
|
||||
@@ -22,8 +23,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:ellipsize="end"
|
||||
android:lines="2"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/color_theme_or_black_33"
|
||||
android:textStyle="bold"
|
||||
tools:text="这是一个测试通知的内容,主要内容就是写一些文字,然后看看写的怎么样.这是一个测试通知的内容,主要内容就是写一些文字,然后看看写的怎么样" />
|
||||
|
||||
<TextView
|
||||
@@ -32,9 +34,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tv_title"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:textColor="@color/color_theme_or_black_33"
|
||||
android:textSize="@dimen/txt12"
|
||||
tools:text="2025-01-01" />
|
||||
@@ -43,6 +45,6 @@
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@color/text_black_99" />
|
||||
</LinearLayout>
|
||||
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
Reference in New Issue
Block a user