1.完成搜索静态界面
2.完成收藏、播放历史静态界面
@ -97,6 +97,7 @@ dependencies {
|
||||
implementation(libs.com.google.android.flexbox.flexbox)
|
||||
implementation(libs.play.services.ads.identifier)
|
||||
implementation("com.github.getActivity:ShapeView:9.8")
|
||||
implementation("com.google.code.gson:gson:2.8.6")
|
||||
// implementation(libs.android.billing)
|
||||
// implementation(platform(libs.google.firebase.bom))
|
||||
// implementation(libs.google.firebase.messaging.ktx)
|
||||
|
@ -53,6 +53,7 @@
|
||||
<activity android:name="com.jia.er.nebuluxe.app.me.AboutActivity" />
|
||||
<activity android:name="com.jia.er.nebuluxe.app.me.SettingActivity" />
|
||||
<activity android:name="com.jia.er.nebuluxe.app.home.HotActivity" />
|
||||
<activity android:name="com.jia.er.nebuluxe.app.home.SearchActivity" />
|
||||
<activity android:name="com.jia.er.nebuluxe.app.home.RankActivity" />
|
||||
<activity android:name="com.jia.er.nebuluxe.app.home.FreshActivity" />
|
||||
<activity android:name="com.jia.er.nebuluxe.app.home.GenresActivity" />
|
||||
|
@ -1,8 +1,10 @@
|
||||
package com.jia.er.nebuluxe.app.basics
|
||||
|
||||
import com.jia.er.nebuluxe.app.BuildConfig.DEBUG
|
||||
|
||||
|
||||
object Constants {
|
||||
var isUat = false
|
||||
var isUat = DEBUG
|
||||
const val Constants_BASE_URL_RES = "https://api-nebuluxetv.nebuluxetv.com/xe/"
|
||||
const val CONSTANTS_AuthorizationExample = "Authorization"
|
||||
const val CONSTANTS_device_id = "device-id"
|
||||
|
@ -8,14 +8,17 @@ import com.blankj.utilcode.util.NetworkUtils
|
||||
import com.bumptech.glide.Glide
|
||||
import com.google.gson.Gson
|
||||
import com.jia.er.nebuluxe.app.R
|
||||
import com.jia.er.nebuluxe.app.basics.BaseActivity
|
||||
import com.jia.er.nebuluxe.app.basics.BaseFragment
|
||||
import com.jia.er.nebuluxe.app.basics.Constants
|
||||
import com.jia.er.nebuluxe.app.data.HomeBannerAndNineSquarepRes
|
||||
import com.jia.er.nebuluxe.app.data.HomeBannerBean
|
||||
import com.jia.er.nebuluxe.app.data.HomeModuleBean
|
||||
import com.jia.er.nebuluxe.app.data.HomeTopWeekRes
|
||||
import com.jia.er.nebuluxe.app.databinding.FragmentHomeBinding
|
||||
import com.jia.er.nebuluxe.app.net.MainViewModel
|
||||
import com.jia.er.nebuluxe.app.ui.RotateDownPageTransformer
|
||||
import com.jia.er.nebuluxe.app.utils.LOG
|
||||
import com.jia.er.nebuluxe.app.utils.singleClick
|
||||
import com.jia.er.nebuluxe.app.utils.toast
|
||||
import com.jia.er.nebuluxe.app.video.PlayerDetailActivity
|
||||
@ -38,54 +41,27 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
|
||||
mViewModel.allModules()
|
||||
}
|
||||
binding.tvHot.setOnClickListener {
|
||||
singleClick {
|
||||
startActivity(
|
||||
Intent(
|
||||
context,
|
||||
HotActivity::class.java
|
||||
)
|
||||
)
|
||||
}
|
||||
skip2Activity(HotActivity::class.java)
|
||||
}
|
||||
binding.tvTop.setOnClickListener {
|
||||
singleClick {
|
||||
startActivity(
|
||||
Intent(
|
||||
context,
|
||||
RankActivity::class.java
|
||||
)
|
||||
)
|
||||
}
|
||||
skip2Activity(RankActivity::class.java)
|
||||
}
|
||||
binding.tvFresh.setOnClickListener {
|
||||
singleClick {
|
||||
startActivity(
|
||||
Intent(
|
||||
context,
|
||||
FreshActivity::class.java
|
||||
)
|
||||
)
|
||||
}
|
||||
skip2Activity(FreshActivity::class.java)
|
||||
}
|
||||
binding.tvFresh.setOnClickListener {
|
||||
singleClick {
|
||||
startActivity(
|
||||
Intent(
|
||||
context,
|
||||
GenresActivity::class.java
|
||||
)
|
||||
)
|
||||
}
|
||||
skip2Activity(GenresActivity::class.java)
|
||||
}
|
||||
binding.rlTop.setOnClickListener {
|
||||
skip2Activity(SearchActivity::class.java)
|
||||
}
|
||||
}
|
||||
|
||||
private fun skip2Activity(clazz: Class<out BaseActivity<*>>) {
|
||||
singleClick {
|
||||
startActivity(
|
||||
Intent(
|
||||
context,
|
||||
SearchActivity::class.java
|
||||
Intent(context, clazz)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,9 +71,30 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
|
||||
mViewModel.allModulesData.observe(this) {
|
||||
if (it != null) {
|
||||
if (it?.data?.list?.isNotEmpty() == true) {
|
||||
LOG.bean("HomeFragment", it)
|
||||
for (item in it.data.list) {
|
||||
when (item.module_key) {
|
||||
"marquee" -> {
|
||||
"marquee" -> setMarqueeData(item)
|
||||
"home_banner" -> setBannerData(item)
|
||||
"home_v3_recommand" -> setRecommendData(item)
|
||||
"new_recommand" -> setNewRecommend(item)
|
||||
}
|
||||
}
|
||||
hideLoading()
|
||||
hideNetError()
|
||||
binding?.srHome?.finishRefresh()
|
||||
EventBus.getDefault().post(Constants.CONSTANTS_main_stop)
|
||||
}
|
||||
} else {
|
||||
toast(R.string.network_error)
|
||||
hideLoading()
|
||||
binding?.srHome?.finishRefresh()
|
||||
EventBus.getDefault().post(Constants.CONSTANTS_main_stop)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun setMarqueeData(item: HomeModuleBean.RecommandDataBean) {
|
||||
binding.root.postDelayed({
|
||||
dataList.clear()
|
||||
val marqueeList =
|
||||
@ -112,7 +109,68 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
"home_banner" -> {
|
||||
private fun setNewRecommend(item: HomeModuleBean.RecommandDataBean) {
|
||||
val cagetoryBean =
|
||||
gson.fromJson(item.data, HomeTopWeekRes::class.java)
|
||||
if (cagetoryBean.list.isNotEmpty()) {
|
||||
binding?.clBannerB?.visibility = View.VISIBLE
|
||||
val exampleHomeBannerAdapter =
|
||||
HomeBannerBottomAdapter(cagetoryBean.list)
|
||||
binding?.bannerHomeB?.setBannerGalleryEffect(24, 10, 1f)
|
||||
binding?.bannerHomeB?.setAdapter(
|
||||
exampleHomeBannerAdapter
|
||||
)?.addBannerLifecycleObserver(this)
|
||||
?.setIndicator(binding.indicatorHome, false)
|
||||
exampleHomeBannerAdapter.setOnBannerListener { data, position ->
|
||||
startActivity(
|
||||
Intent(
|
||||
context,
|
||||
PlayerDetailActivity::class.java
|
||||
).apply {
|
||||
putExtra(
|
||||
Constants.CONSTANTS_short_play_id,
|
||||
data?.short_play_id
|
||||
)
|
||||
})
|
||||
}
|
||||
} else {
|
||||
binding?.clBannerB?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
private fun setRecommendData(item: HomeModuleBean.RecommandDataBean) {
|
||||
val homeBannerAndNineSquarepRes =
|
||||
gson.fromJson(
|
||||
item.data,
|
||||
HomeBannerAndNineSquarepRes::class.java
|
||||
)
|
||||
if (homeBannerAndNineSquarepRes?.list?.isNotEmpty() == true) {
|
||||
binding?.clBanner?.visibility = View.VISIBLE
|
||||
val exampleHomeBannerAdapter =
|
||||
HomeBannerAdapter(homeBannerAndNineSquarepRes?.list)
|
||||
binding?.bannerHome?.apply {
|
||||
setAdapter(exampleHomeBannerAdapter)
|
||||
setBannerGalleryEffect(65, 10, 1f)
|
||||
setPageTransformer(RotateDownPageTransformer(10.5f))
|
||||
}
|
||||
exampleHomeBannerAdapter.setOnBannerListener { data, position ->
|
||||
startActivity(
|
||||
Intent(
|
||||
context,
|
||||
PlayerDetailActivity::class.java
|
||||
).apply {
|
||||
putExtra(
|
||||
Constants.CONSTANTS_short_play_id,
|
||||
data?.short_play_id
|
||||
)
|
||||
})
|
||||
}
|
||||
} else {
|
||||
binding?.clBanner?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
private fun setBannerData(item: HomeModuleBean.RecommandDataBean) {
|
||||
val bannerList =
|
||||
gson.fromJson(item.data, Array<HomeBannerBean>::class.java)
|
||||
.toList()
|
||||
@ -186,82 +244,6 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
|
||||
}
|
||||
}
|
||||
|
||||
"home_v3_recommand" -> {
|
||||
val homeBannerAndNineSquarepRes =
|
||||
gson.fromJson(
|
||||
item.data,
|
||||
HomeBannerAndNineSquarepRes::class.java
|
||||
)
|
||||
if (homeBannerAndNineSquarepRes?.list?.isNotEmpty() == true) {
|
||||
binding?.clBanner?.visibility = View.VISIBLE
|
||||
val exampleHomeBannerAdapter =
|
||||
HomeBannerAdapter(homeBannerAndNineSquarepRes?.list)
|
||||
binding?.bannerHome?.apply {
|
||||
setAdapter(exampleHomeBannerAdapter)
|
||||
setBannerGalleryEffect(65, 10, 1f)
|
||||
setPageTransformer(RotateDownPageTransformer(10.5f))
|
||||
}
|
||||
exampleHomeBannerAdapter.setOnBannerListener { data, position ->
|
||||
startActivity(
|
||||
Intent(
|
||||
context,
|
||||
PlayerDetailActivity::class.java
|
||||
).apply {
|
||||
putExtra(
|
||||
Constants.CONSTANTS_short_play_id,
|
||||
data?.short_play_id
|
||||
)
|
||||
})
|
||||
}
|
||||
} else {
|
||||
binding?.clBanner?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
"new_recommand" -> {
|
||||
val cagetoryBean =
|
||||
gson.fromJson(item.data, HomeTopWeekRes::class.java)
|
||||
if (cagetoryBean.list.isNotEmpty()) {
|
||||
binding?.clBannerB?.visibility = View.VISIBLE
|
||||
val exampleHomeBannerAdapter =
|
||||
HomeBannerBottomAdapter(cagetoryBean.list)
|
||||
binding?.bannerHomeB?.setBannerGalleryEffect(24, 10, 1f)
|
||||
binding?.bannerHomeB?.setAdapter(
|
||||
exampleHomeBannerAdapter
|
||||
)?.addBannerLifecycleObserver(this)
|
||||
?.setIndicator(binding.indicatorHome, false)
|
||||
exampleHomeBannerAdapter.setOnBannerListener { data, position ->
|
||||
startActivity(
|
||||
Intent(
|
||||
context,
|
||||
PlayerDetailActivity::class.java
|
||||
).apply {
|
||||
putExtra(
|
||||
Constants.CONSTANTS_short_play_id,
|
||||
data?.short_play_id
|
||||
)
|
||||
})
|
||||
}
|
||||
} else {
|
||||
binding?.clBannerB?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
hideLoading()
|
||||
hideNetError()
|
||||
binding?.srHome?.finishRefresh()
|
||||
EventBus.getDefault().post(Constants.CONSTANTS_main_stop)
|
||||
}
|
||||
} else {
|
||||
toast(R.string.network_error)
|
||||
hideLoading()
|
||||
binding?.srHome?.finishRefresh()
|
||||
EventBus.getDefault().post(Constants.CONSTANTS_main_stop)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun getViewBinding(): FragmentHomeBinding {
|
||||
return FragmentHomeBinding.inflate(layoutInflater)
|
||||
}
|
||||
|
@ -0,0 +1,24 @@
|
||||
package com.jia.er.nebuluxe.app.home;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.chad.library.adapter4.BaseQuickAdapter;
|
||||
import com.chad.library.adapter4.viewholder.QuickViewHolder;
|
||||
import com.jia.er.nebuluxe.app.R;
|
||||
|
||||
public class InputHistoryAdapter extends BaseQuickAdapter<String, QuickViewHolder> {
|
||||
@Override
|
||||
protected void onBindViewHolder(@NonNull QuickViewHolder quickAdapterHelper, int i, @Nullable String s) {
|
||||
quickAdapterHelper.setText(R.id.tv_con, s);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected QuickViewHolder onCreateViewHolder(@NonNull Context context, @NonNull ViewGroup viewGroup, int i) {
|
||||
return new QuickViewHolder(R.layout.item_input_history, viewGroup);
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.jia.er.nebuluxe.app.home;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.chad.library.adapter4.BaseQuickAdapter;
|
||||
import com.chad.library.adapter4.viewholder.QuickViewHolder;
|
||||
import com.jia.er.nebuluxe.app.R;
|
||||
import com.jia.er.nebuluxe.app.utils.TextViewUtil;
|
||||
|
||||
public class InputResultAdapter extends BaseQuickAdapter<String, QuickViewHolder> {
|
||||
String keyword;
|
||||
|
||||
@Override
|
||||
protected void onBindViewHolder(@NonNull QuickViewHolder quickAdapterHelper, int i, @Nullable String s) {
|
||||
quickAdapterHelper.setText(R.id.tv_con, s);
|
||||
quickAdapterHelper.setText(R.id.tv_title, TextViewUtil.getTextColor(s, keyword, R.color.text_color_pink_dark));
|
||||
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected QuickViewHolder onCreateViewHolder(@NonNull Context context, @NonNull ViewGroup viewGroup, int i) {
|
||||
return new QuickViewHolder(R.layout.item_search_result, viewGroup);
|
||||
}
|
||||
|
||||
public void setKeyword(String input) {
|
||||
keyword = input;
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.jia.er.nebuluxe.app.home
|
||||
|
||||
import android.content.Context
|
||||
import android.content.res.ColorStateList
|
||||
import android.graphics.Color
|
||||
import android.graphics.Outline
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.ViewOutlineProvider
|
||||
import android.widget.ImageView
|
||||
import android.widget.SeekBar
|
||||
import androidx.appcompat.widget.AppCompatSeekBar
|
||||
import com.bumptech.glide.Glide
|
||||
import com.chad.library.adapter4.BaseQuickAdapter
|
||||
import com.chad.library.adapter4.viewholder.QuickViewHolder
|
||||
import com.google.android.material.imageview.ShapeableImageView
|
||||
import com.google.android.material.shape.RelativeCornerSize
|
||||
import com.jia.er.nebuluxe.app.R
|
||||
import com.jia.er.nebuluxe.app.data.HomeBannerBean
|
||||
|
||||
class SaveFavoritesAdapter :
|
||||
BaseQuickAdapter<String, QuickViewHolder>() {
|
||||
var currentPosition = 0
|
||||
override fun onBindViewHolder(
|
||||
holder: QuickViewHolder,
|
||||
position: Int,
|
||||
item: String?
|
||||
) {
|
||||
holder.getView<AppCompatSeekBar>(R.id.progress_bar).setProgress(position * 13)
|
||||
// val view = holder.getView<ShapeableImageView>(R.id.example_iv_icon_ceo)
|
||||
// Glide.with(context).load(item?.image_url).placeholder(R.drawable.iv_placeholder_v)
|
||||
// .into(view)
|
||||
// view.scaleType = ImageView.ScaleType.CENTER_CROP
|
||||
// view.shapeAppearanceModel = view.shapeAppearanceModel
|
||||
// .toBuilder()
|
||||
// .setAllCornerSizes(RelativeCornerSize(0.5f))
|
||||
// .build()
|
||||
// view.elevation = 0f
|
||||
// view.clipToOutline = true
|
||||
// view.outlineProvider = object : ViewOutlineProvider() {
|
||||
// override fun getOutline(view: View, outline: Outline) {
|
||||
// val size = minOf(view.width, view.height)
|
||||
// outline.setOval(0, 0, size, size)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (currentPosition == position) {
|
||||
// holder.setVisible(R.id.view, false)
|
||||
// } else {
|
||||
// holder.setVisible(R.id.view, true)
|
||||
// }
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(
|
||||
context: Context,
|
||||
parent: ViewGroup,
|
||||
viewType: Int
|
||||
): QuickViewHolder {
|
||||
return QuickViewHolder(R.layout.item_saved_favory, parent)
|
||||
}
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package com.jia.er.nebuluxe.app.home
|
||||
|
||||
import android.content.Context
|
||||
import android.content.res.ColorStateList
|
||||
import android.graphics.Color
|
||||
import android.graphics.Outline
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.ViewOutlineProvider
|
||||
import android.widget.ImageView
|
||||
import android.widget.SeekBar
|
||||
import com.bumptech.glide.Glide
|
||||
import com.chad.library.adapter4.BaseQuickAdapter
|
||||
import com.chad.library.adapter4.viewholder.QuickViewHolder
|
||||
import com.google.android.material.imageview.ShapeableImageView
|
||||
import com.google.android.material.shape.RelativeCornerSize
|
||||
import com.jia.er.nebuluxe.app.R
|
||||
import com.jia.er.nebuluxe.app.data.HomeBannerBean
|
||||
|
||||
class SaveHistoryAdapter :
|
||||
BaseQuickAdapter<String, QuickViewHolder>() {
|
||||
var currentPosition = 0
|
||||
override fun onBindViewHolder(
|
||||
holder: QuickViewHolder,
|
||||
position: Int,
|
||||
item: String?
|
||||
) {
|
||||
holder.getView<View>(R.id.line).visibility = if (position == 0) View.GONE else View.VISIBLE
|
||||
holder.getView<SeekBar>(R.id.progress_bar).setProgress(position * 10)
|
||||
holder.setSelected(R.id.iv_star, position % 2 == 0)
|
||||
holder.setText(R.id.tv_name, "Name " + position)
|
||||
holder.setText(R.id.tv_con, "Content " + position)
|
||||
holder.setText(
|
||||
R.id.tv_viewed,
|
||||
String.format(context.getString(R.string.viewed_format), position.toString())
|
||||
)
|
||||
// val view = holder.getView<ShapeableImageView>(R.id.example_iv_icon_ceo)
|
||||
// Glide.with(context).load(item?.image_url).placeholder(R.drawable.iv_placeholder_v)
|
||||
// .into(view)
|
||||
// view.scaleType = ImageView.ScaleType.CENTER_CROP
|
||||
// view.shapeAppearanceModel = view.shapeAppearanceModel
|
||||
// .toBuilder()
|
||||
// .setAllCornerSizes(RelativeCornerSize(0.5f))
|
||||
// .build()
|
||||
// view.elevation = 0f
|
||||
// view.clipToOutline = true
|
||||
// view.outlineProvider = object : ViewOutlineProvider() {
|
||||
// override fun getOutline(view: View, outline: Outline) {
|
||||
// val size = minOf(view.width, view.height)
|
||||
// outline.setOval(0, 0, size, size)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (currentPosition == position) {
|
||||
// holder.setVisible(R.id.view, false)
|
||||
// } else {
|
||||
// holder.setVisible(R.id.view, true)
|
||||
// }
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(
|
||||
context: Context,
|
||||
parent: ViewGroup,
|
||||
viewType: Int
|
||||
): QuickViewHolder {
|
||||
return QuickViewHolder(R.layout.item_saved_history, parent)
|
||||
}
|
||||
}
|
@ -1,7 +1,10 @@
|
||||
package com.jia.er.nebuluxe.app.home
|
||||
|
||||
import android.content.Intent
|
||||
import android.graphics.Color
|
||||
import android.view.View
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.jia.er.nebuluxe.app.data.CollectionRes
|
||||
import com.blankj.utilcode.util.NetworkUtils
|
||||
import com.chad.library.adapter4.layoutmanager.QuickGridLayoutManager
|
||||
@ -9,16 +12,67 @@ import com.jia.er.nebuluxe.app.R
|
||||
import com.jia.er.nebuluxe.app.basics.BaseFragment
|
||||
import com.jia.er.nebuluxe.app.databinding.FragmentSavedBinding
|
||||
import com.jia.er.nebuluxe.app.net.MainViewModel
|
||||
import com.jia.er.nebuluxe.app.utils.DialogUtils
|
||||
import com.jia.er.nebuluxe.app.utils.singleClick
|
||||
import com.jia.er.nebuluxe.app.utils.toast
|
||||
|
||||
class SavedFragment : BaseFragment<FragmentSavedBinding>() {
|
||||
private var page: Int = 1
|
||||
|
||||
// private var myListAdapter: MyListAdapter? = null
|
||||
private var edit = false
|
||||
private var current: Int = 0
|
||||
private val mViewModel by lazy { ViewModelProvider(this)[MainViewModel::class.java] }
|
||||
override fun top() {
|
||||
binding.btnFavor.isSelected = true
|
||||
binding.btnFavor.setOnClickListener {
|
||||
binding.btnFavor.isSelected = true
|
||||
binding.btnHistory.isSelected = false
|
||||
binding.rvFavor.visibility = View.VISIBLE
|
||||
binding.rvHistory.visibility = View.GONE
|
||||
}
|
||||
binding.btnHistory.setOnClickListener {
|
||||
binding.btnFavor.isSelected = false
|
||||
binding.btnHistory.isSelected = true
|
||||
binding.rvFavor.visibility = View.GONE
|
||||
binding.rvHistory.visibility = View.VISIBLE
|
||||
}
|
||||
val layoutManager = QuickGridLayoutManager(requireContext(), 3)
|
||||
binding.rvFavor.layoutManager = layoutManager
|
||||
val adapter = SaveFavoritesAdapter()
|
||||
binding.rvFavor.adapter = adapter
|
||||
val debug = listOf(
|
||||
"a",
|
||||
"b",
|
||||
"c",
|
||||
"d",
|
||||
"e",
|
||||
"f"
|
||||
)
|
||||
adapter.items = debug
|
||||
val layoutManager1 = LinearLayoutManager(requireContext())
|
||||
binding.rvHistory.layoutManager = layoutManager1
|
||||
val adapter1 = SaveHistoryAdapter()
|
||||
binding.rvHistory.adapter = adapter1
|
||||
adapter1.items = debug
|
||||
adapter.addOnItemChildClickListener(R.id.iv_favorites_delete, { adapter, view, position ->
|
||||
DialogUtils.showDoubleBtnDialog(
|
||||
requireContext(),
|
||||
"Remove from Favorites?",
|
||||
"This drama will be removed from your favorites.",
|
||||
"Remove",
|
||||
"Cancel",
|
||||
R.drawable.ic_star_remove,
|
||||
object : DialogUtils.DialogOnClickListener {
|
||||
|
||||
override fun onConfirmClick() {
|
||||
toast("确认移除接口")
|
||||
}
|
||||
|
||||
override fun onCancelClick() {
|
||||
}
|
||||
})
|
||||
})
|
||||
// if (NetworkUtils.isConnected()) {
|
||||
// showLoading()
|
||||
// mViewModel.getCollections(page)
|
||||
|
@ -0,0 +1,85 @@
|
||||
package com.jia.er.nebuluxe.app.home;
|
||||
|
||||
import static com.blankj.utilcode.util.KeyboardUtils.hideSoftInput;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.viewbinding.ViewBinding;
|
||||
|
||||
import com.jia.er.nebuluxe.app.basics.BaseActivity;
|
||||
import com.jia.er.nebuluxe.app.databinding.ActivityMainBinding;
|
||||
import com.jia.er.nebuluxe.app.databinding.ActivitySearchBinding;
|
||||
import com.jia.er.nebuluxe.app.utils.AppUtil;
|
||||
import com.jia.er.nebuluxe.app.utils.LOG;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SearchActivity extends BaseActivity<ActivitySearchBinding> {
|
||||
InputResultAdapter adapter2;
|
||||
|
||||
@Override
|
||||
protected void top() {
|
||||
InputHistoryAdapter adapter = new InputHistoryAdapter();
|
||||
LinearLayoutManager manager = new LinearLayoutManager(this);
|
||||
manager.setOrientation(LinearLayoutManager.HORIZONTAL);
|
||||
binding.rvInputHistory.setLayoutManager(manager);
|
||||
binding.rvInputHistory.setAdapter(adapter);
|
||||
|
||||
LinearLayoutManager manager2 = new LinearLayoutManager(this);
|
||||
manager2.setOrientation(LinearLayoutManager.VERTICAL);
|
||||
adapter2 = new InputResultAdapter();
|
||||
binding.rvResult.setLayoutManager(manager2);
|
||||
binding.rvResult.setAdapter(adapter2);
|
||||
List<String> debug = new ArrayList<>();
|
||||
debug.add("Love");
|
||||
debug.add("CEO");
|
||||
debug.add("Recersal Of Fate");
|
||||
adapter.setItems(debug);
|
||||
binding.tvInput.setOnEditorActionListener((textView, actionId, keyEvent) -> {
|
||||
String input = binding.tvInput.getText() == null ? "" : binding.tvInput.getText().toString();
|
||||
LOG.d("SearchActivity.actionId", String.valueOf(actionId));
|
||||
LOG.d("SearchActivity.input", input);
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_SEND) {
|
||||
if (TextUtils.isEmpty(input)) {
|
||||
binding.emptyPan.setVisibility(View.VISIBLE);
|
||||
binding.resultPan.setVisibility(View.GONE);
|
||||
} else {
|
||||
binding.emptyPan.setVisibility(View.GONE);
|
||||
binding.resultPan.setVisibility(View.VISIBLE);
|
||||
onSearch(input);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
private void onSearch(String input) {
|
||||
adapter2.setKeyword(input);
|
||||
List<String> debug = new ArrayList<>();
|
||||
for (int i = 0; i < input.length(); i++) {
|
||||
debug.add(input + " : DEBUG " + i);
|
||||
}
|
||||
adapter2.setItems(debug);
|
||||
adapter2.notifyDataSetChanged();
|
||||
hideSoftInput(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void center() {
|
||||
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected ActivitySearchBinding getViewBinding() {
|
||||
return ActivitySearchBinding.inflate(getLayoutInflater());
|
||||
}
|
||||
}
|
@ -63,7 +63,7 @@ class MeFragment : BaseFragment<FragmentMeBinding>() {
|
||||
getString(R.string.dialog_content_logout),
|
||||
getString(R.string.dialog_confirm_btn_logout),
|
||||
getString(R.string.dialog_cancel_btn_logout),
|
||||
R.mipmap.ic_logout,
|
||||
R.drawable.ic_logout,
|
||||
object : DialogOnClickListener {
|
||||
|
||||
override fun onConfirmClick() {
|
||||
|
@ -50,8 +50,7 @@ object MainRequest {
|
||||
|
||||
|
||||
fun homeTop(): LiveData<Result<BaseRes<HomeTopRes>>> = handleData {
|
||||
appService.homeTop()
|
||||
.response()
|
||||
appService.homeTop().response()
|
||||
}
|
||||
|
||||
|
||||
|
@ -100,6 +100,7 @@ object Retrofit {
|
||||
Constants.CONSTANTS_system_version,
|
||||
Build.VERSION.RELEASE
|
||||
)
|
||||
.addHeader("security","false")
|
||||
.build()
|
||||
if (Constants.isUat) {
|
||||
for (headerName in request.headers.names()) {
|
||||
|
@ -1,9 +1,14 @@
|
||||
package com.jia.er.nebuluxe.app.utils
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.view.inputmethod.InputMethodManager.HIDE_IMPLICIT_ONLY
|
||||
import android.widget.EditText
|
||||
import androidx.core.net.toUri
|
||||
import com.jia.er.nebuluxe.app.basics.MyApplication
|
||||
|
||||
|
||||
object AppUtil {
|
||||
|
||||
@ -13,4 +18,45 @@ object AppUtil {
|
||||
fun openWeb(context: Context, webUrl: String?) {
|
||||
context.startActivity(Intent(Intent.ACTION_VIEW, webUrl?.toUri()))
|
||||
}
|
||||
|
||||
|
||||
fun hideInput(context: Context?) {
|
||||
if (context is Activity) {
|
||||
val activity = context
|
||||
LOG.e("AppUtils", "hideInput:activity-> " + activity)
|
||||
if (activity.getWindow().getCurrentFocus() != null) {
|
||||
if (activity.getWindow().getCurrentFocus() is EditText) {
|
||||
hideInput((activity.getWindow().getCurrentFocus() as EditText?)!!)
|
||||
} else {
|
||||
LOG.e("AppUtils", "hideInput:View-> " + activity.getWindow().getCurrentFocus())
|
||||
val inputManager = activity.getWindow().getContext()
|
||||
.getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
inputManager.hideSoftInputFromWindow(
|
||||
activity.getWindow().getCurrentFocus()!!
|
||||
.getWindowToken(), HIDE_IMPLICIT_ONLY
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun showInput(editText: EditText) {
|
||||
val imm = MyApplication.context
|
||||
.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager?
|
||||
if (imm != null) {
|
||||
editText.requestFocus()
|
||||
imm.showSoftInput(editText, 0)
|
||||
}
|
||||
}
|
||||
|
||||
fun hideInput(editText: EditText) {
|
||||
val imm = MyApplication.context
|
||||
.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
//隐藏软键盘 //
|
||||
imm.hideSoftInputFromWindow(editText.getWindowToken(), 0)
|
||||
//显示软键盘
|
||||
// imm.showSoftInputFromInputMethod(tv.getWindowToken(), 0);
|
||||
// //切换软键盘的显示与隐藏
|
||||
// imm.toggleSoftInputFromWindow(tv.getWindowToken(), 0, InputMethodManager.HIDE_NOT_ALWAYS);
|
||||
}
|
||||
}
|
||||
|
@ -58,6 +58,7 @@ object DialogUtils {
|
||||
.addString(R.id.dialog_confirm, confirmStr)
|
||||
.addString(R.id.dialog_cancel, cancelStr)
|
||||
.addOnClick({ commonDialog, vId ->
|
||||
commonDialog.dismiss()
|
||||
if (vId == R.id.dialog_confirm) {
|
||||
listener.onConfirmClick();
|
||||
} else if (vId == R.id.dialog_cancel) {
|
||||
|
@ -294,7 +294,10 @@ public class LOG {
|
||||
if ("com.rq.base.util.LOG".equals(s.getClassName())) {
|
||||
continue;
|
||||
}
|
||||
if (s.getClassName().startsWith("android.")) {
|
||||
if (!s.getClassName().startsWith("com.jia.er.nebuluxe.app.")) {
|
||||
continue;
|
||||
}
|
||||
if (s.getClassName().startsWith("com.jia.er.nebuluxe.app.utils")) {
|
||||
continue;
|
||||
}
|
||||
String[] arrs = s.getClassName().split("\\.");
|
||||
|
@ -0,0 +1,254 @@
|
||||
package com.jia.er.nebuluxe.app.utils;
|
||||
|
||||
import android.graphics.Typeface;
|
||||
import android.text.SpannableString;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextPaint;
|
||||
import android.text.TextUtils;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.text.style.ClickableSpan;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.text.style.RelativeSizeSpan;
|
||||
import android.text.style.StyleSpan;
|
||||
import android.text.style.UnderlineSpan;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.jia.er.nebuluxe.app.basics.MyApplication;
|
||||
|
||||
public class TextViewUtil {
|
||||
/**
|
||||
* @param tv 控件
|
||||
* @param con 所有内容
|
||||
* @param light 有颜色的内容
|
||||
* @param colorPrimary 颜色ID
|
||||
*/
|
||||
public static void setText(TextView tv, String con, String light, int colorPrimary,
|
||||
float colorSizeRate) {
|
||||
if (TextUtils.isEmpty(con) || TextUtils.isEmpty(light) || tv == null) {
|
||||
LOG.utilLog("DATA ERROR");
|
||||
LOG.e("TextViewUtil", " tv = " + tv + "con = " + con + " \nlight = " + light);
|
||||
return;
|
||||
}
|
||||
SpannableString spannableString = new SpannableString(con);
|
||||
ForegroundColorSpan colorSpan = new ForegroundColorSpan(tv.getContext().getResources()
|
||||
.getColor(colorPrimary));
|
||||
int start = con.indexOf(light);
|
||||
int end = start + light.length();
|
||||
RelativeSizeSpan sizeSpan = new RelativeSizeSpan(colorSizeRate);
|
||||
spannableString.setSpan(sizeSpan, start, end, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
spannableString.setSpan(colorSpan, start, end, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
tv.setText(spannableString);
|
||||
}
|
||||
|
||||
public static void setText(TextView tv, int conRes, String light, int colorPrimary,
|
||||
float colorSizeRate) {
|
||||
if (conRes <= 0 || TextUtils.isEmpty(light) || tv == null) {
|
||||
LOG.utilLog("DATA ERROR");
|
||||
return;
|
||||
}
|
||||
String realContent = String.format(tv.getResources().getString(conRes), light);
|
||||
setText(tv, realContent, light, colorPrimary, colorSizeRate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 文字变大
|
||||
*/
|
||||
public static void setTextBigger(TextView tv, String con, String light, int colorSizeRate) {
|
||||
if (TextUtils.isEmpty(con) || TextUtils.isEmpty(light) || tv == null) {
|
||||
LOG.utilLog("DATA ERROR");
|
||||
LOG.e("TextViewUtil", " tv = " + tv + "con = " + con + " \nlight = " + light);
|
||||
return;
|
||||
}
|
||||
SpannableString spannableString = new SpannableString(con);
|
||||
int start = con.indexOf(light);
|
||||
int end = start + light.length();
|
||||
start = Math.max(0, start);
|
||||
RelativeSizeSpan sizeSpan = new RelativeSizeSpan(colorSizeRate);
|
||||
spannableString.setSpan(sizeSpan, start, end, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
tv.setText(spannableString);
|
||||
}
|
||||
|
||||
public static CharSequence getTextBigger(String con, String light, float colorSizeRate) {
|
||||
if (TextUtils.isEmpty(con) || TextUtils.isEmpty(light)) {
|
||||
LOG.utilLog("DATA ERROR");
|
||||
LOG.e("TextViewUtil", "con = " + con + " \nlight = " + light);
|
||||
return "";
|
||||
}
|
||||
SpannableString spannableString = new SpannableString(con);
|
||||
int start = con.indexOf(light);
|
||||
int end = start + light.length();
|
||||
start = Math.max(0, start);
|
||||
RelativeSizeSpan sizeSpan = new RelativeSizeSpan(colorSizeRate);
|
||||
spannableString.setSpan(sizeSpan, start, end, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
return spannableString;
|
||||
}
|
||||
|
||||
/**
|
||||
* 文字变大
|
||||
*/
|
||||
public static CharSequence getTextColor(String con, String light, int color) {
|
||||
if (TextUtils.isEmpty(con) || TextUtils.isEmpty(light)) {
|
||||
LOG.utilLog("DATA ERROR");
|
||||
LOG.e("TextViewUtil", " tv = " + con + " \nlight = " + light);
|
||||
return "";
|
||||
}
|
||||
SpannableString spannableString = new SpannableString(con);
|
||||
ForegroundColorSpan colorSpan = new ForegroundColorSpan(MyApplication.context.getResources()
|
||||
.getColor(color));
|
||||
int start = con.indexOf(light);
|
||||
int end = start + light.length();
|
||||
spannableString.setSpan(colorSpan, start, end, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
return spannableString;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加下划线(light 下)
|
||||
*/
|
||||
public static CharSequence getTextLine(String con, String light) {
|
||||
if (TextUtils.isEmpty(con) || TextUtils.isEmpty(light)) {
|
||||
LOG.utilLog("DATA ERROR");
|
||||
LOG.e("TextViewUtil", " tv = " + con + " \nlight = " + light);
|
||||
return "";
|
||||
}
|
||||
SpannableString spannableString = new SpannableString(con);
|
||||
UnderlineSpan line = new UnderlineSpan();
|
||||
int start = con.indexOf(light);
|
||||
int end = start + light.length();
|
||||
spannableString.setSpan(line, start, end, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
return spannableString;
|
||||
}
|
||||
|
||||
/**
|
||||
* 前两个变黑 第一个尺寸变大
|
||||
*/
|
||||
// public static CharSequence get123(String bigAndColor, String color, String normal) {
|
||||
// return getTextColorSize(bigAndColor + color + normal, bigAndColor + color, bigAndColor, R.color.text_color_black, 1.6F);
|
||||
// }
|
||||
|
||||
public static CharSequence getTextColorSize(String con, String change, int color,
|
||||
float colorSizeRate) {
|
||||
return getTextColorSize(con, change, change, color, colorSizeRate);
|
||||
}
|
||||
|
||||
public static CharSequence getTextColorSize(String con, String colorChange, String sizeChange, int color,
|
||||
float colorSizeRate) {
|
||||
return getTextColorSize(con, colorChange, sizeChange, color, colorSizeRate, false);
|
||||
}
|
||||
|
||||
public static CharSequence getTextColorSize(String con, String colorChange, String sizeChange, int color,
|
||||
float colorSizeRate, boolean isBold) {
|
||||
if (TextUtils.isEmpty(con) || TextUtils.isEmpty(colorChange) || TextUtils.isEmpty(sizeChange)) {
|
||||
LOG.utilLog("DATA ERROR");
|
||||
LOG.e("TextViewUtil", " tv = " + con + " \nlight = " + colorChange);
|
||||
return "";
|
||||
}
|
||||
SpannableString spannableString = new SpannableString(con);
|
||||
ForegroundColorSpan colorSpan = null;
|
||||
try {
|
||||
colorSpan = new ForegroundColorSpan(MyApplication.context.getResources().getColor(color));
|
||||
} catch (Exception e) {
|
||||
colorSpan = new ForegroundColorSpan(color);
|
||||
}
|
||||
int colorStart = con.indexOf(colorChange);
|
||||
int sizeStart = con.indexOf(sizeChange);
|
||||
int colorEnd = colorStart + colorChange.length();
|
||||
int sizeEnd = colorStart + sizeChange.length();
|
||||
spannableString.setSpan(colorSpan, colorStart, colorEnd, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
if (isBold) {
|
||||
StyleSpan styleSpan = new StyleSpan(Typeface.BOLD);
|
||||
spannableString.setSpan(styleSpan, sizeStart, sizeEnd, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
RelativeSizeSpan sizeSpan = new RelativeSizeSpan(colorSizeRate);
|
||||
spannableString.setSpan(sizeSpan, sizeStart, sizeEnd, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
return spannableString;
|
||||
}
|
||||
|
||||
public static void setTextBigger(TextView tv, int conRes, String light, float colorSizeRate) {
|
||||
if (conRes <= 0 || TextUtils.isEmpty(light) || tv == null) {
|
||||
LOG.utilLog("DATA ERROR");
|
||||
return;
|
||||
}
|
||||
String realContent = String.format(MyApplication.context.getResources().getString(conRes), light);
|
||||
setTextBigger(tv, realContent, light, colorSizeRate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 文字变大
|
||||
*/
|
||||
public static void setTextBigger(TextView tv, String con, String light, float colorSizeRate) {
|
||||
if (TextUtils.isEmpty(con) || TextUtils.isEmpty(light) || tv == null) {
|
||||
LOG.utilLog("DATA ERROR");
|
||||
LOG.e("TextViewUtil", " tv = " + tv + "con = " + con + " \nlight = " + light);
|
||||
return;
|
||||
}
|
||||
SpannableString spannableString = new SpannableString(con);
|
||||
int start = con.indexOf(light);
|
||||
int end = start + light.length();
|
||||
start = Math.max(0, start);
|
||||
RelativeSizeSpan sizeSpan = new RelativeSizeSpan(colorSizeRate);
|
||||
spannableString.setSpan(sizeSpan, start, end, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
tv.setText(spannableString);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param con 全部内容
|
||||
* @param light 变化内容
|
||||
* @param colorSizeRate 变化部分相对基础尺寸比例
|
||||
* @param colorClick 变化部分颜色
|
||||
* @param listener 变化部分点击事件
|
||||
*/
|
||||
public static void setColorAndClick(TextView tv, String con, String light, float colorSizeRate,
|
||||
int colorClick, final View.OnClickListener listener) {
|
||||
if (tv == null || TextUtils.isEmpty(con) || TextUtils.isEmpty(light)) {
|
||||
return;
|
||||
}
|
||||
int start = Math.max(0, con.indexOf(light));
|
||||
int end = Math.min(start + light.length(), con.length());
|
||||
SpannableString spannableString = new SpannableString(con);
|
||||
if (colorSizeRate > 0) {
|
||||
RelativeSizeSpan sizeSpan = new RelativeSizeSpan(colorSizeRate);
|
||||
spannableString.setSpan(sizeSpan, start, end, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
if (listener != null) {
|
||||
spannableString
|
||||
.setSpan(new ClickSpan(listener), start, end, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
tv.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
}
|
||||
if (colorClick > 0) {
|
||||
ForegroundColorSpan colorSpan = new ForegroundColorSpan(tv.getResources()
|
||||
.getColor(colorClick));
|
||||
spannableString.setSpan(colorSpan, start, end, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
tv.setText(spannableString);
|
||||
}
|
||||
|
||||
private static class ClickSpan extends ClickableSpan {
|
||||
private View.OnClickListener mOnClickListener;
|
||||
|
||||
ClickSpan(View.OnClickListener clickListener) {
|
||||
this.mOnClickListener = clickListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View widget) {
|
||||
mOnClickListener.onClick(widget);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDrawState(TextPaint tp) {
|
||||
tp.setColor(tp.linkColor);
|
||||
tp.setUnderlineText(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// public static void setRichText(TextView tv, String con) {
|
||||
// if (tv != null && !TextUtils.isEmpty(con)) {
|
||||
// if (con.contains(".gif")) {//显示Gif图需关闭硬件加速
|
||||
// tv.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
|
||||
// }
|
||||
// RichText.from(con).into(tv);
|
||||
// }
|
||||
// }
|
||||
}
|
BIN
app/src/main/res/drawable-xhdpi/ic_search.png
Normal file
After Width: | Height: | Size: 370 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_arrow_right.png
Normal file
After Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 979 B After Width: | Height: | Size: 979 B |
Before Width: | Height: | Size: 596 B After Width: | Height: | Size: 596 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 884 B After Width: | Height: | Size: 884 B |
Before Width: | Height: | Size: 720 B After Width: | Height: | Size: 720 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_delete_gray.png
Normal file
After Width: | Height: | Size: 539 B |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_save_select_bg.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_save_top_bg.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_star_remove.png
Normal file
After Width: | Height: | Size: 75 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_star_select.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_star_unselect.png
Normal file
After Width: | Height: | Size: 754 B |
Before Width: | Height: | Size: 357 KiB After Width: | Height: | Size: 357 KiB |
5
app/src/main/res/drawable/baseline_delete_forever_24.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FF0101" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||
|
||||
<path android:fillColor="@android:color/white" android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2L18,7L6,7v12zM8.46,11.88l1.41,-1.41L12,12.59l2.12,-2.12 1.41,1.41L13.41,14l2.12,2.12 -1.41,1.41L12,15.41l-2.12,2.12 -1.41,-1.41L10.59,14l-2.13,-2.12zM15.5,4l-1,-1h-5l-1,1L5,4v2h14L19,4z"/>
|
||||
|
||||
</vector>
|
5
app/src/main/res/drawable/bg_conner_10px_black_light.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="@dimen/padding_10px" />
|
||||
<solid android:color="@color/bg_black_light" />
|
||||
</shape>
|
5
app/src/main/res/drawable/bg_conner_20px_black_light.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/bg_black_light" />
|
||||
<corners android:radius="@dimen/padding_20px" />
|
||||
</shape>
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
BIN
app/src/main/res/drawable/ic_default_iv_hor.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/drawable/ic_default_iv_ver.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
17
app/src/main/res/drawable/seek_save_favorites.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@android:id/background">
|
||||
<shape>
|
||||
<solid android:color="@color/white" />
|
||||
<corners android:radius="@dimen/padding_4px" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:id="@android:id/progress">
|
||||
<clip>
|
||||
<shape>
|
||||
<solid android:color="@color/pink" />
|
||||
<corners android:radius="@dimen/padding_4px" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
</layer-list>
|
5
app/src/main/res/drawable/sel_save_click_bg.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/ic_save_select_bg" android:state_selected="true"/>
|
||||
<item android:drawable="@color/transparent" />
|
||||
</selector>
|
5
app/src/main/res/drawable/sel_save_click_color.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/text_color_black" android:state_selected="true" />
|
||||
<item android:color="@color/text_color_white" />
|
||||
</selector>
|
5
app/src/main/res/drawable/sel_star.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/ic_star_select" android:state_selected="true" />
|
||||
<item android:drawable="@drawable/ic_star_unselect" />
|
||||
</selector>
|
@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/iv_home_bg"
|
||||
android:background="@drawable/iv_bg"
|
||||
android:paddingTop="@dimen/padding_55px">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
|
@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/iv_home_bg"
|
||||
android:background="@drawable/iv_bg"
|
||||
android:paddingTop="@dimen/padding_55px">
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/iv_home_bg"
|
||||
android:background="@drawable/iv_bg"
|
||||
android:paddingTop="@dimen/padding_55px">
|
||||
|
||||
|
||||
|
@ -2,12 +2,14 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/bg_black"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="@dimen/padding_84px" />
|
||||
|
||||
<com.flyco.tablayout.CommonTabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
|
@ -1,6 +1,225 @@
|
||||
<?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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/iv_bg"
|
||||
android:paddingTop="@dimen/padding_55px">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/example_iv_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/padding_16px"
|
||||
android:padding="@dimen/padding_8px"
|
||||
android:src="@drawable/iv_example_back"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/padding_5px"
|
||||
android:text="@string/page_title_search"
|
||||
android:textColor="#FFDAA4"
|
||||
android:textSize="@dimen/text_size_18px"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/search_pan"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/padding_44px"
|
||||
android:layout_margin="@dimen/padding_15px"
|
||||
android:background="@drawable/bg_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/example_iv_back">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="@dimen/padding_40px"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/padding_10px"
|
||||
android:padding="@dimen/padding_12px"
|
||||
android:src="@drawable/ic_search"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/tv_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@null"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:hint="@string/hint_search_input"
|
||||
android:imeOptions="actionSearch"
|
||||
android:paddingLeft="@dimen/padding_50px"
|
||||
android:paddingRight="@dimen/padding_50px"
|
||||
android:textColor="@color/text_color_white"
|
||||
android:textColorHint="@color/text_color_hint_B7"
|
||||
android:textSize="@dimen/text_size_12px" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/empty_pan"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/padding_16px"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toBottomOf="@id/search_pan">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/btn_delete"
|
||||
android:layout_width="@dimen/padding_40px"
|
||||
android:layout_height="@dimen/padding_40px"
|
||||
android:padding="@dimen/padding_11px"
|
||||
android:src="@drawable/ic_delete_gray"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_input_history"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/padding_40px"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/btn_delete"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_conner_20px_black_light"
|
||||
android:padding="@dimen/padding_10px"
|
||||
app:layout_constraintTop_toBottomOf="@id/rv_input_history">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_empty_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/search_empty_title"
|
||||
android:textColor="@color/text_color_white"
|
||||
android:textSize="@dimen/text_size_14px"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_empty_con"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/padding_6px"
|
||||
android:text="@string/search_empty_con"
|
||||
android:textColor="@color/text_color_hint_B7"
|
||||
android:textSize="@dimen/text_size_14px"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_empty_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="@dimen/padding_40px"
|
||||
android:layout_height="@dimen/padding_22px"
|
||||
android:paddingLeft="@dimen/padding_12px"
|
||||
android:paddingRight="@dimen/padding_12px"
|
||||
android:src="@drawable/ic_arrow_right"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_empty_title" />
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/iv_empty_1"
|
||||
android:layout_width="@dimen/padding_150px"
|
||||
android:layout_height="@dimen/padding_220px"
|
||||
android:layout_marginTop="@dimen/padding_20px"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_default_iv_ver"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_empty_con"
|
||||
app:shapeAppearance="@style/CircleCornerStyle" />
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/iv_empty_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/padding_108px"
|
||||
android:layout_marginLeft="@dimen/padding_6px"
|
||||
android:layout_marginTop="@dimen/padding_20px"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_default_iv_ver"
|
||||
app:layout_constraintLeft_toRightOf="@id/iv_empty_1"
|
||||
app:layout_constraintRight_toLeftOf="@id/iv_empty_3"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_empty_con"
|
||||
app:shapeAppearance="@style/CircleCornerStyle" />
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/iv_empty_3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/padding_108px"
|
||||
android:layout_marginLeft="@dimen/padding_6px"
|
||||
android:layout_marginTop="@dimen/padding_20px"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_default_iv_ver"
|
||||
app:layout_constraintLeft_toRightOf="@id/iv_empty_2"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_empty_con"
|
||||
app:shapeAppearance="@style/CircleCornerStyle" />
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/iv_empty_4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/padding_108px"
|
||||
android:layout_marginLeft="@dimen/padding_6px"
|
||||
android:layout_marginTop="@dimen/padding_4px"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_default_iv_ver"
|
||||
app:layout_constraintLeft_toRightOf="@id/iv_empty_1"
|
||||
app:layout_constraintRight_toRightOf="@id/iv_empty_2"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_empty_3"
|
||||
app:shapeAppearance="@style/CircleCornerStyle" />
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/iv_empty_5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/padding_108px"
|
||||
android:layout_marginLeft="@dimen/padding_6px"
|
||||
android:layout_marginTop="@dimen/padding_4px"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_default_iv_ver"
|
||||
app:layout_constraintLeft_toRightOf="@id/iv_empty_2"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_empty_3"
|
||||
app:shapeAppearance="@style/CircleCornerStyle" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/result_pan"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/padding_16px"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toBottomOf="@id/search_pan">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_result_tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/padding_12px"
|
||||
android:paddingBottom="@dimen/padding_12px"
|
||||
android:text="@string/tip_search_tip"
|
||||
android:textColor="@color/text_color_white"
|
||||
android:textSize="@dimen/text_size_16px"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_result"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_result_tip" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/iv_home_bg"
|
||||
android:background="@drawable/iv_bg"
|
||||
android:paddingTop="@dimen/padding_55px">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
|
@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/n9_dialog_bg">
|
||||
android:background="@drawable/n9_dialog_bg">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/dialog_title"
|
||||
@ -28,7 +28,7 @@
|
||||
app:layout_constraintLeft_toLeftOf="@id/dialog_title"
|
||||
app:layout_constraintRight_toRightOf="@id/dialog_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/dialog_title"
|
||||
tools:src="@mipmap/ic_logout"
|
||||
tools:src="@drawable/ic_logout"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
@ -72,7 +72,7 @@
|
||||
android:layout_width="@dimen/padding_0px"
|
||||
android:layout_height="@dimen/padding_48px"
|
||||
android:layout_weight="1"
|
||||
android:background="@mipmap/ic_btn_dialog_confirm"
|
||||
android:background="@drawable/ic_btn_dialog_confirm"
|
||||
android:gravity="center"
|
||||
app:endColor="#E593CA"
|
||||
app:startColor="#FFFA80"
|
||||
|
@ -5,7 +5,7 @@
|
||||
android:id="@+id/sr_home"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/iv_home_bg"
|
||||
android:background="@drawable/iv_bg"
|
||||
android:forceHasOverlappingRendering="false"
|
||||
app:srlDragRate="0.8"
|
||||
app:srlEnableAutoLoadMore="false">
|
||||
|
@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/iv_home_bg"
|
||||
android:background="@drawable/iv_bg"
|
||||
android:paddingTop="@dimen/padding_55px">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
|
@ -311,7 +311,7 @@
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="@dimen/padding_22px"
|
||||
android:layout_height="@dimen/padding_22px"
|
||||
android:src="@mipmap/ic_btn_me_language" />
|
||||
android:src="@drawable/ic_btn_me_language" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -331,7 +331,7 @@
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="@dimen/padding_22px"
|
||||
android:layout_height="@dimen/padding_22px"
|
||||
android:src="@mipmap/ic_btn_me_privacy_policy" />
|
||||
android:src="@drawable/ic_btn_me_privacy_policy" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -350,7 +350,7 @@
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="@dimen/padding_22px"
|
||||
android:layout_height="@dimen/padding_22px"
|
||||
android:src="@mipmap/ic_btn_me_delete_account" />
|
||||
android:src="@drawable/ic_btn_me_delete_account" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -384,7 +384,7 @@
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="@dimen/padding_22px"
|
||||
android:layout_height="@dimen/padding_22px"
|
||||
android:src="@mipmap/ic_btn_me_help_center" />
|
||||
android:src="@drawable/ic_btn_me_help_center" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -404,7 +404,7 @@
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="@dimen/padding_22px"
|
||||
android:layout_height="@dimen/padding_22px"
|
||||
android:src="@mipmap/ic_btn_me_user_agreement" />
|
||||
android:src="@drawable/ic_btn_me_user_agreement" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -424,7 +424,7 @@
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="@dimen/padding_22px"
|
||||
android:layout_height="@dimen/padding_22px"
|
||||
android:src="@mipmap/ic_btn_me_about" />
|
||||
android:src="@drawable/ic_btn_me_about" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -1,6 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout 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">
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/iv_bg"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/padding_15px">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_top_click"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/padding_42px"
|
||||
android:layout_marginTop="@dimen/padding_44px"
|
||||
android:layout_marginBottom="@dimen/padding_15px"
|
||||
android:background="@drawable/ic_save_top_bg"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/btn_favor"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/sel_save_click_bg"
|
||||
android:gravity="center"
|
||||
android:text="@string/btn_favorites"
|
||||
android:textColor="@drawable/sel_save_click_color"
|
||||
android:textSize="@dimen/text_size_16px" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/btn_history"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/sel_save_click_bg"
|
||||
android:gravity="center"
|
||||
android:text="@string/btn_history"
|
||||
android:textColor="@drawable/sel_save_click_color"
|
||||
android:textSize="@dimen/text_size_16px" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_favor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_history"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_conner_10px_black_light"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
14
app/src/main/res/layout/item_input_history.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.AppCompatTextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/tv_con"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/padding_10px"
|
||||
android:background="@drawable/bg_conner_20px_black_light"
|
||||
android:padding="@dimen/padding_6px"
|
||||
android:textColor="@color/text_color_gray"
|
||||
android:textSize="@dimen/text_size_12px"
|
||||
tools:text="Love">
|
||||
|
||||
</androidx.appcompat.widget.AppCompatTextView>
|
44
app/src/main/res/layout/item_saved_favory.xml
Normal file
@ -0,0 +1,44 @@
|
||||
<?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"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/padding_6px"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/example_iv_icon_ceo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/padding_144px"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_default_iv_ver"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:shapeAppearance="@style/CircleCornerStyle" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSeekBar
|
||||
android:id="@+id/progress_bar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/padding_4px"
|
||||
android:layout_marginTop="@dimen/padding_6px"
|
||||
android:layout_marginBottom="@dimen/padding_20px"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:progress="50"
|
||||
android:progressDrawable="@drawable/seek_save_favorites"
|
||||
android:thumb="@color/transparent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/example_iv_icon_ceo" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_favorites_delete"
|
||||
android:layout_width="@dimen/padding_20px"
|
||||
android:layout_height="@dimen/padding_20px"
|
||||
android:src="@drawable/baseline_delete_forever_24"
|
||||
app:layout_constraintRight_toRightOf="@id/example_iv_icon_ceo"
|
||||
app:layout_constraintTop_toTopOf="@id/example_iv_icon_ceo" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
99
app/src/main/res/layout/item_saved_history.xml
Normal file
@ -0,0 +1,99 @@
|
||||
<?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="wrap_content"
|
||||
android:layout_margin="@dimen/padding_6px"
|
||||
android:orientation="vertical"
|
||||
tools:background="@color/bg_black_light">
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/line"
|
||||
style="@style/HorizontalLine"
|
||||
android:layout_marginLeft="@dimen/padding_10px"
|
||||
android:layout_marginRight="@dimen/padding_10px"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/example_iv_icon_ceo"
|
||||
android:layout_width="@dimen/padding_92px"
|
||||
android:layout_height="@dimen/padding_124px"
|
||||
android:layout_margin="@dimen/padding_10px"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_default_iv_ver"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:shapeAppearance="@style/CircleCornerStyle" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/padding_15px"
|
||||
android:paddingEnd="@dimen/padding_26px"
|
||||
android:textColor="@color/text_color_white"
|
||||
android:textSize="@dimen/text_size_14px"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toRightOf="@id/example_iv_icon_ceo"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/example_iv_icon_ceo"
|
||||
tools:text="her veiled protectoy" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_con"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/padding_10px"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:paddingStart="@dimen/padding_15px"
|
||||
android:paddingEnd="@dimen/padding_26px"
|
||||
android:textColor="@color/text_color_white"
|
||||
android:textSize="@dimen/text_size_12px"
|
||||
app:layout_constraintLeft_toRightOf="@id/example_iv_icon_ceo"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_name"
|
||||
tools:text="her veiled protectoy" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_viewed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/padding_10px"
|
||||
android:layout_marginBottom="@dimen/padding_40px"
|
||||
android:paddingLeft="@dimen/padding_15px"
|
||||
android:text="viewed 25%"
|
||||
android:textColor="@color/text_color_gray_DF"
|
||||
android:textSize="@dimen/text_size_10px"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/example_iv_icon_ceo" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSeekBar
|
||||
android:id="@+id/progress_bar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/padding_4px"
|
||||
android:layout_marginTop="@dimen/padding_6px"
|
||||
android:layout_marginBottom="@dimen/padding_20px"
|
||||
android:paddingStart="@dimen/padding_15px"
|
||||
android:paddingEnd="@dimen/padding_10px"
|
||||
android:progress="50"
|
||||
android:progressDrawable="@drawable/seek_save_favorites"
|
||||
android:thumb="@color/transparent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_viewed"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_viewed" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_star"
|
||||
android:layout_width="@dimen/padding_26px"
|
||||
android:layout_height="@dimen/padding_26px"
|
||||
android:padding="@dimen/padding_3px"
|
||||
android:src="@drawable/sel_star"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_name" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
76
app/src/main/res/layout/item_search_result.xml
Normal file
@ -0,0 +1,76 @@
|
||||
<?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="wrap_content"
|
||||
android:layout_marginBottom="@dimen/padding_10px"
|
||||
android:background="@drawable/bg_conner_10px_black_light"
|
||||
tools:text="Love">
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/iv"
|
||||
android:layout_width="@dimen/padding_112px"
|
||||
android:layout_height="@dimen/padding_124px"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_default_iv_ver"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:shapeAppearance="@style/CircleCornerStyle" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/padding_10px"
|
||||
android:layout_marginTop="@dimen/padding_10px"
|
||||
android:textColor="@color/text_color_white"
|
||||
android:textSize="@dimen/text_size_13px"
|
||||
app:layout_constraintLeft_toRightOf="@id/iv"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="tv_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_tip"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_color_pink"
|
||||
android:textSize="@dimen/text_size_13px"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title"
|
||||
tools:text="tv_tip" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_hot"
|
||||
android:layout_width="@dimen/padding_12px"
|
||||
android:layout_height="@dimen/padding_12px"
|
||||
android:layout_marginTop="@dimen/padding_10px"
|
||||
android:src="@drawable/iv_item_rank_heat_1"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_tip" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/padding_4px"
|
||||
android:textColor="@color/text_color_white"
|
||||
android:textSize="@dimen/text_size_10px"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_hot"
|
||||
app:layout_constraintLeft_toRightOf="@id/iv_hot"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_hot"
|
||||
tools:text="123k" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_con"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:paddingTop="@dimen/padding_20px"
|
||||
android:text="1234"
|
||||
android:textColor="@color/text_color_white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_tip"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_num" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Before Width: | Height: | Size: 56 KiB |
@ -11,10 +11,16 @@
|
||||
<color name="BDF5E2">#BDF5E2</color>
|
||||
<color name="FFFA80">#FFFA80</color>
|
||||
<color name="F0C2E1">#F0C2E1</color>
|
||||
<color name="transparent">#00000000</color>
|
||||
<color name="pink">#F0C2E1</color>
|
||||
|
||||
<color name="text_color_gray">#D4D4D4</color>
|
||||
<color name="text_color_black">#0F0F0F</color>
|
||||
<color name="text_color_white">#0F0F0F</color>
|
||||
<color name="text_color_pink">#F0C2E1</color>
|
||||
<color name="text_color_pink_dark">#E593CA</color>
|
||||
<color name="text_color_white">#FFF</color>
|
||||
<color name="text_color_hint_B7">#B7B7B7</color>
|
||||
<color name="text_color_gray_DF">#DFDFDF</color>
|
||||
<color name="bg_black">#111111</color>
|
||||
<color name="bg_black_light">#1D1D1D</color>
|
||||
</resources>
|
@ -24,4 +24,12 @@
|
||||
<string name="dialog_content_logout">You’ll need to sign in again. Unsaved history will be lost.</string>
|
||||
<string name="dialog_confirm_btn_logout">Log Out</string>
|
||||
<string name="dialog_cancel_btn_logout">Cancel</string>
|
||||
<string name="btn_favorites">Favorites</string>
|
||||
<string name="btn_history">History</string>
|
||||
<string name="viewed_format">Viewed %s %%</string>
|
||||
<string name="page_title_search">Search</string>
|
||||
<string name="hint_search_input">What’s Your Mood Today?</string>
|
||||
<string name="search_empty_title">What Everyone’s Watching</string>
|
||||
<string name="search_empty_con">Join the trend</string>
|
||||
<string name="tip_search_tip">Search Results</string>
|
||||
</resources>
|
@ -10,4 +10,15 @@
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:orientation">vertical</item>
|
||||
</style>
|
||||
|
||||
<style name="CircleCornerStyle">
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="cornerSize">@dimen/padding_10px</item>
|
||||
</style>
|
||||
|
||||
<style name="HorizontalLine">
|
||||
<item name="android:background">@color/text_color_white</item>
|
||||
<item name="android:layout_height">1px</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
</style>
|
||||
</resources>
|