Compare commits
2 Commits
15f5c91d59
...
22dda64929
Author | SHA1 | Date | |
---|---|---|---|
|
22dda64929 | ||
|
cdff6889f5 |
@ -1,16 +1,11 @@
|
|||||||
package com.jia.er.nebuluxe.app.home
|
package com.jia.er.nebuluxe.app.home
|
||||||
|
|
||||||
import android.content.Intent
|
|
||||||
import android.graphics.Rect
|
|
||||||
import android.os.Bundle
|
|
||||||
import android.view.View
|
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
|
||||||
import com.blankj.utilcode.util.NetworkUtils
|
import com.blankj.utilcode.util.NetworkUtils
|
||||||
|
import com.jia.er.nebuluxe.app.BuildConfig.DEBUG
|
||||||
import com.jia.er.nebuluxe.app.R
|
import com.jia.er.nebuluxe.app.R
|
||||||
import com.jia.er.nebuluxe.app.basics.BaseActivity
|
import com.jia.er.nebuluxe.app.basics.BaseActivity
|
||||||
import com.jia.er.nebuluxe.app.basics.Constants.CONSTANTS_short_play_id
|
|
||||||
import com.jia.er.nebuluxe.app.data.ShortListCategoryDataInfo
|
import com.jia.er.nebuluxe.app.data.ShortListCategoryDataInfo
|
||||||
import com.jia.er.nebuluxe.app.databinding.ActivityGenresBinding
|
import com.jia.er.nebuluxe.app.databinding.ActivityGenresBinding
|
||||||
import com.jia.er.nebuluxe.app.net.MainViewModel
|
import com.jia.er.nebuluxe.app.net.MainViewModel
|
||||||
@ -42,20 +37,13 @@ class GenresActivity : BaseActivity<ActivityGenresBinding>() {
|
|||||||
val manager1 = LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)
|
val manager1 = LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)
|
||||||
binding?.rvRanks?.layoutManager = manager1
|
binding?.rvRanks?.layoutManager = manager1
|
||||||
binding?.rvRanks?.adapter = homeRankTrendingAdapter
|
binding?.rvRanks?.adapter = homeRankTrendingAdapter
|
||||||
homeRankTrendingAdapter?.submitList(it.data.list)
|
val list = mutableListOf<ShortListCategoryDataInfo.CategoryListData>()
|
||||||
binding?.rvRanks?.addItemDecoration(object : RecyclerView.ItemDecoration() {
|
if (DEBUG) {
|
||||||
override fun getItemOffsets(
|
list.addAll(it.data.list)
|
||||||
outRect: Rect,
|
list.addAll(it.data.list)
|
||||||
view: View,
|
|
||||||
parent: RecyclerView,
|
|
||||||
state: RecyclerView.State
|
|
||||||
) {
|
|
||||||
super.getItemOffsets(outRect, view, parent, state)
|
|
||||||
if (parent.getChildPosition(view) != (it.data.list.size - 1)) {
|
|
||||||
outRect.bottom = -100
|
|
||||||
}
|
}
|
||||||
}
|
list.addAll(it.data.list)
|
||||||
})
|
homeRankTrendingAdapter?.submitList(list)
|
||||||
homeRankTrendingAdapter?.isStateViewEnable = true
|
homeRankTrendingAdapter?.isStateViewEnable = true
|
||||||
homeRankTrendingAdapter?.setStateViewLayout(this, R.layout.layout_emptyview)
|
homeRankTrendingAdapter?.setStateViewLayout(this, R.layout.layout_emptyview)
|
||||||
// homeRankTrendingAdapter.addOnItemChildClickListener(
|
// homeRankTrendingAdapter.addOnItemChildClickListener(
|
||||||
|
@ -19,39 +19,30 @@ import com.jia.er.nebuluxe.app.video.PlayerDetailActivity
|
|||||||
class GenresAdapter :
|
class GenresAdapter :
|
||||||
BaseQuickAdapter<ShortListCategoryDataInfo.CategoryListData, QuickViewHolder>(),
|
BaseQuickAdapter<ShortListCategoryDataInfo.CategoryListData, QuickViewHolder>(),
|
||||||
FullSpanAdapterType {
|
FullSpanAdapterType {
|
||||||
|
val rlBg = arrayOf(
|
||||||
|
R.drawable.iv_genres_1,
|
||||||
|
R.drawable.iv_genres_2,
|
||||||
|
R.drawable.iv_genres_3,
|
||||||
|
R.drawable.iv_genres_4
|
||||||
|
)
|
||||||
|
|
||||||
override fun onBindViewHolder(
|
override fun onBindViewHolder(
|
||||||
holder: QuickViewHolder,
|
holder: QuickViewHolder,
|
||||||
position: Int,
|
position: Int,
|
||||||
item: ShortListCategoryDataInfo.CategoryListData?
|
item: ShortListCategoryDataInfo.CategoryListData?
|
||||||
) {
|
) {
|
||||||
when (position) {
|
if (position == 0) {
|
||||||
0 -> {
|
holder.setBackgroundResource(R.id.rl, R.drawable.iv_genres_1_first)
|
||||||
holder.setBackgroundResource(R.id.rl, R.drawable.iv_genres_1)
|
} else {
|
||||||
holder.setBackgroundResource(R.id.line, R.color.E3D4FF)
|
holder.setBackgroundResource(R.id.rl, rlBg[position % rlBg.size])
|
||||||
}
|
|
||||||
|
|
||||||
1 -> {
|
|
||||||
holder.setBackgroundResource(R.id.rl, R.drawable.iv_genres_2)
|
|
||||||
holder.setBackgroundResource(R.id.line, R.color.BDF5E2)
|
|
||||||
}
|
|
||||||
|
|
||||||
2 -> {
|
|
||||||
holder.setBackgroundResource(R.id.rl, R.drawable.iv_genres_3)
|
|
||||||
holder.setBackgroundResource(R.id.line, R.color.FFFA80)
|
|
||||||
}
|
|
||||||
|
|
||||||
else -> {
|
|
||||||
holder.setBackgroundResource(R.id.rl, R.drawable.iv_genres_4)
|
|
||||||
holder.setBackgroundResource(R.id.line, R.color.F0C2E1)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// holder.setBackgroundResource(R.id.line, rlBg[position % lineBg.size])
|
||||||
val view = holder.getView<RecyclerView>(R.id.rv_genres_item)
|
val view = holder.getView<RecyclerView>(R.id.rv_genres_item)
|
||||||
holder.setText(R.id.tv_type, item?.category_name)
|
holder.setText(R.id.tv_type, item?.category_name)
|
||||||
holder.setText(
|
holder.setText(
|
||||||
R.id.tv_num,
|
R.id.tv_num,
|
||||||
item?.short_play_list?.size.toString().plus("\n").plus("Dramas")
|
item?.short_play_list?.size.toString().plus("\n").plus("Dramas")
|
||||||
)
|
)
|
||||||
LOG.d("GenresAdapter", "onBindViewHolder.53:" + position)
|
|
||||||
view?.layoutManager = manager
|
view?.layoutManager = manager
|
||||||
view?.adapter = homeRankTrendingAdapter
|
view?.adapter = homeRankTrendingAdapter
|
||||||
homeRankTrendingAdapter?.submitList(item?.short_play_list)
|
homeRankTrendingAdapter?.submitList(item?.short_play_list)
|
||||||
@ -59,6 +50,14 @@ class GenresAdapter :
|
|||||||
|
|
||||||
val homeRankTrendingAdapter = GenresItemAdapter()
|
val homeRankTrendingAdapter = GenresItemAdapter()
|
||||||
var manager: RecyclerView.LayoutManager? = null
|
var manager: RecyclerView.LayoutManager? = null
|
||||||
|
|
||||||
|
override fun getItemViewType(
|
||||||
|
position: Int,
|
||||||
|
list: List<ShortListCategoryDataInfo.CategoryListData>
|
||||||
|
): Int {
|
||||||
|
return position
|
||||||
|
}
|
||||||
|
|
||||||
override fun onCreateViewHolder(
|
override fun onCreateViewHolder(
|
||||||
context: Context,
|
context: Context,
|
||||||
parent: ViewGroup,
|
parent: ViewGroup,
|
||||||
@ -66,7 +65,7 @@ class GenresAdapter :
|
|||||||
): QuickViewHolder {
|
): QuickViewHolder {
|
||||||
manager = LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false)
|
manager = LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false)
|
||||||
homeRankTrendingAdapter.setOnItemClickListener { adapter, view, position ->
|
homeRankTrendingAdapter.setOnItemClickListener { adapter, view, position ->
|
||||||
LOG.d("GenresAdapter", "onCreateViewHolder.68:")
|
LOG.d("GenresAdapter", "onCreateViewHolder.68:" + viewType)
|
||||||
var it = adapter.getItem(position) as ShortPlayListData
|
var it = adapter.getItem(position) as ShortPlayListData
|
||||||
LOG.d("GenresAdapter", "onCreateViewHolder.70:")
|
LOG.d("GenresAdapter", "onCreateViewHolder.70:")
|
||||||
context.startActivity(
|
context.startActivity(
|
||||||
@ -78,6 +77,10 @@ class GenresAdapter :
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if (viewType == 0) {
|
||||||
|
return QuickViewHolder(R.layout.item_genres_first, parent)
|
||||||
|
} else {
|
||||||
return QuickViewHolder(R.layout.item_genres, parent)
|
return QuickViewHolder(R.layout.item_genres, parent)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,10 +29,8 @@ class HotAdapter :
|
|||||||
posterView.apply {
|
posterView.apply {
|
||||||
// 顶部倾斜程度(左侧更低)
|
// 顶部倾斜程度(左侧更低)
|
||||||
setTopSlantOffsetDp(25f)
|
setTopSlantOffsetDp(25f)
|
||||||
|
|
||||||
// 左上小圆角,其他正常
|
// 左上小圆角,其他正常
|
||||||
setTopLeftShortStyle(topLeftDp = 12f, otherDp = 18f)
|
setTopLeftShortStyle(topLeftDp = 12f, otherDp = 18f)
|
||||||
|
|
||||||
// 如果还需更贴合
|
// 如果还需更贴合
|
||||||
setCornerRadiiDp(12f, 18f, 18f, 18f)
|
setCornerRadiiDp(12f, 18f, 18f, 18f)
|
||||||
}
|
}
|
||||||
|
@ -9,13 +9,15 @@ import android.widget.TextView
|
|||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import com.blankj.utilcode.util.KeyboardUtils
|
import com.blankj.utilcode.util.KeyboardUtils
|
||||||
import com.bumptech.glide.Glide
|
import com.google.android.material.imageview.ShapeableImageView
|
||||||
import com.jia.er.nebuluxe.app.R
|
import com.jia.er.nebuluxe.app.R
|
||||||
import com.jia.er.nebuluxe.app.basics.BaseActivity
|
import com.jia.er.nebuluxe.app.basics.BaseActivity
|
||||||
import com.jia.er.nebuluxe.app.basics.Constants
|
import com.jia.er.nebuluxe.app.basics.Constants
|
||||||
|
import com.jia.er.nebuluxe.app.data.BaseRes
|
||||||
import com.jia.er.nebuluxe.app.data.ExampleKeywordDataRes
|
import com.jia.er.nebuluxe.app.data.ExampleKeywordDataRes
|
||||||
import com.jia.er.nebuluxe.app.databinding.ActivitySearchBinding
|
import com.jia.er.nebuluxe.app.databinding.ActivitySearchBinding
|
||||||
import com.jia.er.nebuluxe.app.net.MainViewModel
|
import com.jia.er.nebuluxe.app.net.MainViewModel
|
||||||
|
import com.jia.er.nebuluxe.app.utils.ImageLoadUtil
|
||||||
import com.jia.er.nebuluxe.app.utils.Memory
|
import com.jia.er.nebuluxe.app.utils.Memory
|
||||||
import com.jia.er.nebuluxe.app.utils.toast
|
import com.jia.er.nebuluxe.app.utils.toast
|
||||||
import com.jia.er.nebuluxe.app.video.PlayerDetailActivity
|
import com.jia.er.nebuluxe.app.video.PlayerDetailActivity
|
||||||
@ -73,31 +75,15 @@ class SearchActivity : BaseActivity<ActivitySearchBinding>() {
|
|||||||
openDetail(data.short_play_id)
|
openDetail(data.short_play_id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
binding.ivEmpty1.setOnClickListener(itemClickListener)
|
|
||||||
binding.ivEmpty2.setOnClickListener(itemClickListener)
|
|
||||||
binding.ivEmpty3.setOnClickListener(itemClickListener)
|
|
||||||
binding.ivEmpty4.setOnClickListener(itemClickListener)
|
|
||||||
binding.ivEmpty5.setOnClickListener(itemClickListener)
|
|
||||||
binding.btnMore.setOnClickListener { skip2Activity(HotActivity::class.java) }
|
binding.btnMore.setOnClickListener { skip2Activity(HotActivity::class.java) }
|
||||||
mViewModel.hotsData.observe(this) {
|
mViewModel.hotsData.observe(this) {
|
||||||
val lists = it.data?.list.orEmpty().take(5) // 限制最多5个元素
|
val lists = it.data?.list.orEmpty().take(5) // 限制最多5个元素
|
||||||
lists.size.let { position ->
|
lists.size.let { size ->
|
||||||
binding.ivEmpty1.visibility = if (position >= 1) View.VISIBLE else View.GONE
|
setClickInfoAndVisibility(size, binding.ivEmpty1, it, 0, itemClickListener)
|
||||||
binding.ivEmpty2.visibility = if (position >= 2) View.VISIBLE else View.GONE
|
setClickInfoAndVisibility(size, binding.ivEmpty2, it, 1, itemClickListener)
|
||||||
binding.ivEmpty3.visibility = if (position >= 3) View.VISIBLE else View.GONE
|
setClickInfoAndVisibility(size, binding.ivEmpty3, it, 2, itemClickListener)
|
||||||
binding.ivEmpty4.visibility = if (position >= 4) View.VISIBLE else View.GONE
|
setClickInfoAndVisibility(size, binding.ivEmpty4, it, 3, itemClickListener)
|
||||||
binding.ivEmpty5.visibility = if (position >= 5) View.VISIBLE else View.GONE
|
setClickInfoAndVisibility(size, binding.ivEmpty5, it, 4, itemClickListener)
|
||||||
binding.ivEmpty1.setTag(it.data?.list[0])
|
|
||||||
binding.ivEmpty2.setTag(it.data?.list[1])
|
|
||||||
binding.ivEmpty3.setTag(it.data?.list[2])
|
|
||||||
binding.ivEmpty4.setTag(it.data?.list[3])
|
|
||||||
binding.ivEmpty5.setTag(it.data?.list[4])
|
|
||||||
Glide.with(this).load(it.data?.list[0]?.image_url).into(binding.ivEmpty1)
|
|
||||||
Glide.with(this).load(it.data?.list[1]?.image_url).into(binding.ivEmpty2)
|
|
||||||
Glide.with(this).load(it.data?.list[2]?.image_url).into(binding.ivEmpty3)
|
|
||||||
Glide.with(this).load(it.data?.list[3]?.image_url).into(binding.ivEmpty4)
|
|
||||||
Glide.with(this).load(it.data?.list[4]?.image_url).into(binding.ivEmpty5)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mViewModel.searchData.observe(this) {
|
mViewModel.searchData.observe(this) {
|
||||||
@ -118,6 +104,23 @@ class SearchActivity : BaseActivity<ActivitySearchBinding>() {
|
|||||||
mViewModel.hots()
|
mViewModel.hots()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun setClickInfoAndVisibility(
|
||||||
|
size: Int,
|
||||||
|
iv: ShapeableImageView,
|
||||||
|
it: BaseRes<ExampleKeywordDataRes>,
|
||||||
|
index: Int,
|
||||||
|
itemClickListener: View.OnClickListener
|
||||||
|
) {
|
||||||
|
if (size <= index) {
|
||||||
|
iv.visibility = View.GONE
|
||||||
|
} else {
|
||||||
|
iv.visibility = View.VISIBLE
|
||||||
|
iv.setTag(it.data?.list[index])
|
||||||
|
ImageLoadUtil.loadImage(it.data?.list[index]?.image_url, iv)
|
||||||
|
iv.setOnClickListener(itemClickListener)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun onReturn() {
|
override fun onReturn() {
|
||||||
super.onReturn()
|
super.onReturn()
|
||||||
binding.emptyPan.visibility = View.VISIBLE
|
binding.emptyPan.visibility = View.VISIBLE
|
||||||
|
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 95 KiB |
BIN
app/src/main/res/drawable-xxhdpi/iv_genres_1_first.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 159 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 94 KiB |
@ -2,8 +2,8 @@
|
|||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:width="@dimen/padding_108px" android:height="@dimen/padding_36px">
|
<item android:width="@dimen/padding_108px" android:height="@dimen/padding_36px">
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<solid android:color="#FFFFFF"/>
|
<solid android:color="#FFFFFF" />
|
||||||
<corners android:radius="@dimen/padding_16px"/>
|
<corners android:radius="@dimen/padding_24px" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
</selector>
|
</selector>
|
@ -45,6 +45,7 @@
|
|||||||
android:layout_marginTop="-12dp"
|
android:layout_marginTop="-12dp"
|
||||||
android:layout_marginRight="@dimen/padding_16px"
|
android:layout_marginRight="@dimen/padding_16px"
|
||||||
android:overScrollMode="never"
|
android:overScrollMode="never"
|
||||||
|
tools:listitem="@layout/item_hot"
|
||||||
android:scrollbars="vertical"
|
android:scrollbars="vertical"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
@ -1,63 +1,87 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="@dimen/padding_16px"
|
|
||||||
android:layout_marginRight="@dimen/padding_16px">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/rl"
|
android:id="@+id/rl"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/padding_263px"
|
||||||
|
android:layout_marginTop="@dimen/padding_n_120px"
|
||||||
|
android:background="@drawable/iv_genres_1">
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/iv_genres_1"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
android:weightSum="20">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0px"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="18"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/tv_type"
|
android:id="@+id/tv_type"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/padding_18px"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginTop="@dimen/padding_21px"
|
android:layout_marginStart="@dimen/padding_18px"
|
||||||
android:text="CEO"
|
|
||||||
android:textColor="#0F0F0F"
|
android:textColor="#0F0F0F"
|
||||||
android:textSize="@dimen/text_size_15px" />
|
android:textSize="@dimen/text_size_15px"
|
||||||
|
tools:text="CEO" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/tv_num"
|
android:id="@+id/tv_num"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_marginTop="@dimen/padding_16px"
|
android:layout_marginEnd="@dimen/padding_21px"
|
||||||
android:layout_marginRight="@dimen/padding_21px"
|
|
||||||
android:text="43\nDramas"
|
|
||||||
android:textColor="#0F0F0F"
|
android:textColor="#0F0F0F"
|
||||||
android:textSize="@dimen/text_size_12px" />
|
android:textSize="@dimen/text_size_12px"
|
||||||
|
tools:text="43\nDramas" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/rv_genres_item"
|
android:id="@+id/rv_genres_item"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/padding_140px"
|
android:layout_height="@dimen/padding_140px"
|
||||||
android:layout_marginTop="@dimen/padding_10px"
|
|
||||||
android:layout_below="@id/tv_type"
|
android:layout_below="@id/tv_type"
|
||||||
android:background="@drawable/bg_genres"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_marginLeft="@dimen/padding_10px"
|
android:layout_marginLeft="@dimen/padding_10px"
|
||||||
|
android:layout_marginTop="@dimen/padding_10px"
|
||||||
|
android:layout_marginRight="@dimen/padding_10px"
|
||||||
|
android:layout_marginBottom="@dimen/padding_20px"
|
||||||
|
android:background="@drawable/bg_genres"
|
||||||
android:paddingLeft="@dimen/padding_7px"
|
android:paddingLeft="@dimen/padding_7px"
|
||||||
android:paddingRight="@dimen/padding_10px"
|
android:paddingRight="@dimen/padding_10px"
|
||||||
android:layout_marginRight="@dimen/padding_10px"
|
|
||||||
tools:itemCount="1"
|
tools:itemCount="1"
|
||||||
tools:listitem="@layout/item_genres_img" />
|
tools:listitem="@layout/item_genres_img" />
|
||||||
|
</LinearLayout>
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/line"
|
android:layout_width="0px"
|
||||||
android:layout_width="@dimen/padding_38px"
|
android:layout_height="match_parent"
|
||||||
android:layout_height="@dimen/padding_3px"
|
android:layout_weight="1" />
|
||||||
android:background="#E3D4FF"
|
</LinearLayout>
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
</FrameLayout>
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
86
app/src/main/res/layout/item_genres_first.xml
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout 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:id="@+id/rl"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/padding_215px"
|
||||||
|
android:background="@drawable/iv_genres_1_first">
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="20">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0px"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="18"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_type"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/padding_18px"
|
||||||
|
android:textColor="#0F0F0F"
|
||||||
|
android:textSize="@dimen/text_size_15px"
|
||||||
|
tools:text="CEO" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_num"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginEnd="@dimen/padding_21px"
|
||||||
|
android:textColor="#0F0F0F"
|
||||||
|
android:textSize="@dimen/text_size_12px"
|
||||||
|
tools:text="43\nDramas" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_genres_item"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/padding_140px"
|
||||||
|
android:layout_below="@id/tv_type"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginLeft="@dimen/padding_10px"
|
||||||
|
android:layout_marginTop="@dimen/padding_10px"
|
||||||
|
android:layout_marginRight="@dimen/padding_10px"
|
||||||
|
android:layout_marginBottom="@dimen/padding_20px"
|
||||||
|
android:background="@drawable/bg_genres"
|
||||||
|
android:paddingLeft="@dimen/padding_7px"
|
||||||
|
android:paddingRight="@dimen/padding_10px"
|
||||||
|
tools:itemCount="1"
|
||||||
|
tools:listitem="@layout/item_genres_img" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0px"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
</LinearLayout>
|
||||||
|
</FrameLayout>
|
@ -44,6 +44,14 @@
|
|||||||
<dimen name="padding_38px">38dp</dimen>
|
<dimen name="padding_38px">38dp</dimen>
|
||||||
<dimen name="padding_39px">39dp</dimen>
|
<dimen name="padding_39px">39dp</dimen>
|
||||||
<dimen name="padding_40px">40dp</dimen>
|
<dimen name="padding_40px">40dp</dimen>
|
||||||
|
<dimen name="padding_n_40px">-40dp</dimen>
|
||||||
|
<dimen name="padding_n_60px">-60dp</dimen>
|
||||||
|
<dimen name="padding_n_50px">-50dp</dimen>
|
||||||
|
<dimen name="padding_n_80px">-80dp</dimen>
|
||||||
|
<dimen name="padding_n_90px">-90dp</dimen>
|
||||||
|
<dimen name="padding_n_100px">-100dp</dimen>
|
||||||
|
<dimen name="padding_n_110px">-110dp</dimen>
|
||||||
|
<dimen name="padding_n_120px">-120dp</dimen>
|
||||||
<dimen name="padding_41px">41dp</dimen>
|
<dimen name="padding_41px">41dp</dimen>
|
||||||
<dimen name="padding_42px">42dp</dimen>
|
<dimen name="padding_42px">42dp</dimen>
|
||||||
<dimen name="padding_43px">43dp</dimen>
|
<dimen name="padding_43px">43dp</dimen>
|
||||||
|
@ -27,7 +27,7 @@ squareupOkhttp = "4.10.0"
|
|||||||
squareupLoggingInterceptor = "4.10.0"
|
squareupLoggingInterceptor = "4.10.0"
|
||||||
squareupRetrofit = "2.9.0"
|
squareupRetrofit = "2.9.0"
|
||||||
squareupConverterGson = "2.9.0"
|
squareupConverterGson = "2.9.0"
|
||||||
tencentMmkv = "1.3.7"
|
tencentMmkv = "1.3.14"
|
||||||
utilcodex = "1.31.1"
|
utilcodex = "1.31.1"
|
||||||
playServicesAdsIdentifier = "18.2.0"
|
playServicesAdsIdentifier = "18.2.0"
|
||||||
#androidBilling = "7.0.0"
|
#androidBilling = "7.0.0"
|
||||||
|