Commit 65c8a8bd by konghaorui

测评模块资源重命名

parent c76c0b51
......@@ -169,6 +169,7 @@ dependencies {
//开发模式
api project(':m-consultant')
api project(':m-user')
api project(':m-tests')
api (project(':ydl-platform')){
transitive = true
}
......
......@@ -3,17 +3,13 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
//apply plugin: 'plugin.resTools' // 资源重命名插件
apply plugin: 'plugin.resTools' // 资源重命名插件
// 配置插件dsl
//resConfig {
// new_prefix = 'tests_' // 资源前缀
// old_prefix = '' // 老前缀,可为''空字符串
// // === below use default
// // resFolderPath 资源目录
// // srcFolderPath 源代码目录
// // manifestFilePath 清单文件目录
//}
// 配置资源重命名插件
resConfig {
new_prefix = 'tests_' // 资源前缀
old_prefix = '' // 老前缀,可为''空字符串
}
kapt {
arguments {
......@@ -49,7 +45,7 @@ android {
}
//前缀的名字
// resourcePrefix "tests_"
resourcePrefix "tests_"
//Flavor 信息
publishNonDefault true
......@@ -58,16 +54,6 @@ android {
xlzx {}
}
sourceSets {
main {
res.srcDirs = [
'src/main/res/layouts/testhome',
'src/main/res/layouts',
'src/main/res'
]
}
}
}
dependencies {
......
......@@ -8,38 +8,19 @@
<activity
android:name=".list.view.TestCategoryListActivity"
android:screenOrientation="portrait"
android:theme="@style/NoTitleTheme"
android:theme="@style/platform_NoTitleTheme"
/>
<activity
android:name=".answer.TestAnswerActivity"
android:screenOrientation="portrait" />
<activity
android:name=".detail.TestDetailActivity"
android:screenOrientation="portrait" />
<!-- 跳转测评详情 中间页面-->
<activity
android:name=".detail.jump.JumpTestDetailActivity"
android:screenOrientation="portrait"
android:theme="@style/Transparent" />
<activity
android:name=".SelectConversationActivity"
android:screenOrientation="portrait" />
<activity
android:name=".result.TestResultActivity"
android:screenOrientation="portrait" />
<activity
android:name=".search.TestSearchActivity"
android:screenOrientation="portrait"
android:theme="@style/NoTitleTheme"
android:theme="@style/platform_NoTitleTheme"
/>
<!--测评首页-->
<activity
android:name=".home.TestHomeActivity"
android:screenOrientation="portrait" />
<!--跳转测试结果 中间页-->
<activity
android:name=".result.jump.JumpTestResultActivity"
android:screenOrientation="portrait"
android:theme="@style/Transparent" />
</application>
</manifest>
......@@ -11,16 +11,17 @@ import android.widget.Toast
import com.alibaba.android.arouter.facade.annotation.Route
import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydl_image.transform.GlideCircleTransform
import com.yidianling.router.im.IMRequestCallback
import com.yidianling.tests.router.TestsIn
import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.dialog.NormalDialog
import com.ydl.ydlcommon.http.YdlRetrofitUtils
import com.ydl.ydlcommon.http.api.Command
import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.utils.NetworkParamsUtils
import com.ydl.ydlcommon.utils.remind.HttpErrorUtils
import com.ydl.ydlcommon.view.dialog.NormalDialog
import com.yidianling.router.im.IMRequestCallback
import com.yidianling.tests.home.param.RecentCmd
import com.yidianling.tests.router.TestsIn
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.activity_select_conversation.*
import kotlinx.android.synthetic.main.tests_activity_select_conversation.*
import java.util.*
/**
......@@ -29,7 +30,7 @@ import java.util.*
@Route(path = "/test/select_conversation")
class SelectConversationActivity : BaseActivity() {
override fun layoutResId(): Int {
return R.layout.activity_select_conversation
return R.layout.tests_activity_select_conversation
}
override fun initDataAndEvent() {
......@@ -76,7 +77,7 @@ class SelectConversationActivity : BaseActivity() {
}
override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View {
val view = LayoutInflater.from(mContext).inflate(R.layout.ui_select_conversation_item, null, false)
val view = LayoutInflater.from(mContext).inflate(R.layout.tests_ui_select_conversation_item, null, false)
val s = view.findViewById<ImageView>(R.id.sdv_head) as ImageView
val n = view.findViewById<TextView>(R.id.name) as TextView
GlideApp.with(mContext)
......@@ -122,7 +123,7 @@ class SelectConversationActivity : BaseActivity() {
}
private fun getData() {
val cmd = Command.RecentCmd()
val cmd = RecentCmd()
TestRetrofitApi.getTestRetrofitApi().getRecentExpertList(NetworkParamsUtils.getMaps(cmd))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
......
......@@ -26,8 +26,8 @@ import com.yidianling.tests.home.presenter.TestHomePresenterImpl
import com.yidianling.tests.home.utils.TestHomeUtils
import com.yidianling.tests.home.widget.SwipeToLoadHelper
import de.greenrobot.event.EventBus
import kotlinx.android.synthetic.main.testhome_activity.*
import kotlinx.android.synthetic.main.testhome_bar.*
import kotlinx.android.synthetic.main.tests_testhome_activity.*
import kotlinx.android.synthetic.main.tests_testhome_bar.*
import org.json.JSONObject
/**
......@@ -76,7 +76,7 @@ class TestHomeActivity : BaseMvpActivity<ITestHomeContract.View,ITestHomeContrac
}
override fun layoutResId(): Int {
return R.layout.testhome_activity
return R.layout.tests_testhome_activity
}
override fun initDataAndEvent() {
......
......@@ -5,7 +5,7 @@ import android.view.View
import android.view.ViewGroup
import com.yidianling.tests.R
import com.yidianling.tests.home.config.ITestHomeConfig
import kotlinx.android.synthetic.main.testhome_item_load_more.view.*
import kotlinx.android.synthetic.main.tests_testhome_item_load_more.view.*
/**
......@@ -49,7 +49,7 @@ class AdapterWrapper(private val mAdapter: RecyclerView.Adapter<RecyclerView.Vie
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
if (viewType == ITEM_TYPE_LOAD) {
if (mWrapperHolder == null) {
var view = View.inflate(parent.context, R.layout.testhome_item_load_more, null)
var view = View.inflate(parent.context, R.layout.tests_testhome_item_load_more, null)
view.setOnClickListener(this)
mWrapperHolder = WrapperHolder(view)
}
......@@ -132,7 +132,7 @@ class AdapterWrapper(private val mAdapter: RecyclerView.Adapter<RecyclerView.Vie
}
fun setMoreDrawable(){
val drawable = itemView.context.resources.getDrawable(R.drawable.testhome_more)
val drawable = itemView.context.resources.getDrawable(R.drawable.tests_testhome_more)
/// 这一步必须要做,否则不会显示.
drawable.setBounds(0, 0, drawable.minimumWidth, drawable.minimumHeight)
itemView.item_load_tv.setCompoundDrawablesWithIntrinsicBounds(null, null, drawable, null)
......
......@@ -86,7 +86,7 @@ class TestHomeAdapter(private val mContext: Context,
return RecommendedFirstViewHolder(TestHomeRecommendedFirstView(parent.context, testHomeEvent))
}
else -> {
return EmptyViewHolder(View.inflate(parent.context, R.layout.testhome_empty, null))
return EmptyViewHolder(View.inflate(parent.context, R.layout.tests_testhome_empty, null))
}
}
}
......
package com.yidianling.tests.home.param;
import com.ydl.ydlcommon.data.http.BaseCommand;
/**
* Created by haorui on 2019-11-01.
* Des:
*/
public class RecentCmd extends BaseCommand {
public RecentCmd() {
}
}
\ No newline at end of file
......@@ -168,7 +168,7 @@ class TestHomeUtils {
} else {
hitBuffer.append(iHits.toInt())
}
hitBuffer.append(context.resources.getString(R.string.testhome_hit))
hitBuffer.append(context.resources.getString(R.string.tests_testhome_hit))
return hitBuffer.toString()
}
......@@ -204,7 +204,7 @@ class TestHomeUtils {
} else {
numBuffer.append(iNum.toInt())
}
numBuffer.append(context.resources.getString(R.string.testhome_peopletest))
numBuffer.append(context.resources.getString(R.string.tests_testhome_peopletest))
return numBuffer.toString()
}
......@@ -237,8 +237,8 @@ class TestHomeUtils {
*/
fun priceStyle(context: Context, textView: TextView, content: String, subIndex: Int, EndIndex: Int) {
val sp = SpannableString(content)
sp.setSpan(TextAppearanceSpan(context, R.style.style_price_start), 0, subIndex, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
sp.setSpan(TextAppearanceSpan(context, R.style.style_price_end), subIndex, EndIndex, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
sp.setSpan(TextAppearanceSpan(context, R.style.tests_style_price_start), 0, subIndex, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
sp.setSpan(TextAppearanceSpan(context, R.style.tests_style_price_end), subIndex, EndIndex, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
textView.text = sp
}
/**
......@@ -246,8 +246,8 @@ class TestHomeUtils {
*/
fun priceStyleNew(context: Context, textView: TextView, content: String, subIndex: Int, EndIndex: Int) {
val sp = SpannableString(content)
sp.setSpan(TextAppearanceSpan(context, R.style.style_price_end), 0, subIndex, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
sp.setSpan(TextAppearanceSpan(context, R.style.style_price_start), subIndex, EndIndex, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
sp.setSpan(TextAppearanceSpan(context, R.style.tests_style_price_end), 0, subIndex, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
sp.setSpan(TextAppearanceSpan(context, R.style.tests_style_price_start), subIndex, EndIndex, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
textView.text = sp
}
......
......@@ -51,7 +51,7 @@ class TestHomeBannerAdapter(
imageView.scaleType = ImageView.ScaleType.FIT_XY
GlideApp.with(mContext)
.load(item.bannerImageUrl)
.placeholder(R.drawable.testhome_banner_nor)
.placeholder(R.drawable.tests_testhome_banner_nor)
.centerCrop()
.into(imageView)
(mImageViews as ArrayList<ImageView>).add(imageView)
......
......@@ -10,7 +10,7 @@ import com.yidianling.tests.R
import com.yidianling.tests.home.bean.TestHomeBodyBean
import com.yidianling.tests.home.bean.TestHomeDataBean
import com.yidianling.tests.home.event.ITestHomeEvent
import kotlinx.android.synthetic.main.testhome_banner_view.view.*
import kotlinx.android.synthetic.main.tests_testhome_banner_view.view.*
/**
* @author yuanwai
......@@ -44,7 +44,7 @@ class TestHomeBannerView(context: Context?, testHomeEvent: ITestHomeEvent) : Fra
private fun initView() {
val params = FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
View.inflate(context, R.layout.testhome_banner_view, this)
View.inflate(context, R.layout.tests_testhome_banner_view, this)
layoutParams = params
dp14 = RxImageTool.dip2px(14f)
dp4 = RxImageTool.dip2px(4f)
......@@ -82,7 +82,7 @@ class TestHomeBannerView(context: Context?, testHomeEvent: ITestHomeEvent) : Fra
for (index in 0..count) {
urlLists.add((mDataList as ArrayList<TestHomeBodyBean>)[index].bannerImageUrl!!)
}
banner.setImageLoader(GlideImageLoader(R.drawable.testhome_banner_nor)).setImages(urlLists).start()
banner.setImageLoader(GlideImageLoader(R.drawable.tests_testhome_banner_nor)).setImages(urlLists).start()
banner.setOnBannerListener {
testHomeEvent!!.bannerClick((mDataList as ArrayList<TestHomeBodyBean>)[it].bannerLinkUrl, it, (mDataList as ArrayList<TestHomeBodyBean>)[it].bannerName)
......@@ -138,10 +138,10 @@ class TestHomeBannerView(context: Context?, testHomeEvent: ITestHomeEvent) : Fra
//
// if (index == 0) {
// imageWidth = dp14
// imageView.setBackgroundResource(R.drawable.testhome_tip_select)
// imageView.setBackgroundResource(R.drawable.tests_testhome_tip_select)
// } else {
// imageWidth = dp4
// imageView.setBackgroundResource(R.drawable.testhome_tip_unselect)
// imageView.setBackgroundResource(R.drawable.tests_testhome_tip_unselect)
// }
// var layoutParams = LinearLayout.LayoutParams(imageWidth, dp4)
// imageView.scaleType = ImageView.ScaleType.FIT_XY
......@@ -170,10 +170,10 @@ class TestHomeBannerView(context: Context?, testHomeEvent: ITestHomeEvent) : Fra
// }
// if (i == selectItems) {
// imageWidth = dp14
// imageView.setBackgroundResource(R.drawable.testhome_tip_select)
// imageView.setBackgroundResource(R.drawable.tests_testhome_tip_select)
// } else {
// imageWidth = dp4
// imageView.setBackgroundResource(R.drawable.testhome_tip_unselect)
// imageView.setBackgroundResource(R.drawable.tests_testhome_tip_unselect)
// }
// var params = LinearLayout.LayoutParams(imageWidth, dp4)
// params.leftMargin = margin
......
......@@ -17,7 +17,7 @@ import com.yidianling.tests.home.bean.TestHomeCategoryBean
import com.yidianling.tests.home.bean.TestHomeDataBean
import com.yidianling.tests.home.event.ITestHomeEvent
import com.ydl.ydlcommon.utils.ScreenUtil
import kotlinx.android.synthetic.main.testhome_category_view.view.*
import kotlinx.android.synthetic.main.tests_testhome_category_view.view.*
import java.util.*
/**
......@@ -91,7 +91,7 @@ class TestHomeCategoryView(mContext: Context, testHomeEvent: ITestHomeEvent) : L
*/
private fun initView() {
orientation = VERTICAL
View.inflate(context, R.layout.testhome_category_view, this)
View.inflate(context, R.layout.tests_testhome_category_view, this)
val params = ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
layoutParams = params
initArgs()
......@@ -191,7 +191,7 @@ class TestHomeCategoryView(mContext: Context, testHomeEvent: ITestHomeEvent) : L
* 加载图片
*/
private fun bindIconData(imageView: ImageView, categoryBean: TestHomeCategoryBean) {
GlideApp.with(context).load(categoryBean.categoryUrl).placeholder(R.drawable.testhome_type_nor)
GlideApp.with(context).load(categoryBean.categoryUrl).placeholder(R.drawable.tests_testhome_type_nor)
.centerCrop().into(imageView)
}
......@@ -240,7 +240,7 @@ class TestHomeCategoryView(mContext: Context, testHomeEvent: ITestHomeEvent) : L
lineParam.rightMargin = dp15
lineParam.topMargin = multiple * (imageViewWidth + dp8 + textViewHeight) + dp8
lineView = View(context)
lineView!!.setBackgroundColor(resources.getColor(R.color.testhome_line))
lineView!!.setBackgroundColor(resources.getColor(R.color.tests_testhome_line))
lineView!!.layoutParams = lineParam
}
......
......@@ -13,7 +13,7 @@ import com.yidianling.tests.R
import com.yidianling.tests.home.bean.TestHomeBodyBean
import com.yidianling.tests.home.event.ITestHomeEvent
import com.yidianling.tests.home.utils.TestHomeUtils
import kotlinx.android.synthetic.main.testhome_dailyitem_view.view.*
import kotlinx.android.synthetic.main.tests_testhome_dailyitem_view.view.*
/**
* @author yuanwai
......@@ -40,7 +40,7 @@ class TestHomeDailyHorizoItemView(mContext: Context, testHomeEvent: ITestHomeEve
*/
private fun initView() {
var params = LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)
View.inflate(context, R.layout.testhome_dailyitem_view, this)
View.inflate(context, R.layout.tests_testhome_dailyitem_view, this)
var dp6 = RxImageTool.dip2px(6f)
if (isRight!!) {
params.setMargins(dp6, RxImageTool.dip2px(5f), RxImageTool.dip2px(15f), RxImageTool.dip2px(5f))
......@@ -57,7 +57,7 @@ class TestHomeDailyHorizoItemView(mContext: Context, testHomeEvent: ITestHomeEve
*/
fun initData(bodyBean: TestHomeBodyBean, position: Int) {
GlideApp.with(context).load(bodyBean.dailyImageUrl)
.placeholder(R.drawable.testhome_list_nor)
.placeholder(R.drawable.tests_testhome_list_nor)
.centerCrop().into(img_icon)
tv_title.text = bodyBean.dailyTitle
tv_content.text = TestHomeUtils.getNum(context, bodyBean.dailyContent)
......@@ -80,13 +80,13 @@ class TestHomeDailyHorizoItemView(mContext: Context, testHomeEvent: ITestHomeEve
|| "0.0" == price
|| "0.00" == price){
tv_price.text = "免费"
tv_price.setBackgroundResource(R.drawable.testhome_recom_price_bg)
tv_price.setBackgroundResource(R.drawable.tests_testhome_recom_price_bg)
tv_price.setTextColor(Color.parseColor("#34CD65"))
} else {
var newPrice = TestHomeUtils.getOriginalPrice(tv_coupon_money,price,couponMoney)
var priceContent = "¥$newPrice"
TestHomeUtils.priceStyleNew(context, tv_price, priceContent, 1, priceContent.length)
tv_price.setBackgroundResource(R.drawable.testhome_null)
tv_price.setBackgroundResource(R.drawable.tests_testhome_null)
}
}
}
\ No newline at end of file
......@@ -6,7 +6,7 @@ import android.widget.HorizontalScrollView
import com.yidianling.tests.R
import com.yidianling.tests.home.bean.TestHomeBodyBean
import com.yidianling.tests.home.event.ITestHomeEvent
import kotlinx.android.synthetic.main.testhome_dailyhorizo_view.view.*
import kotlinx.android.synthetic.main.tests_testhome_dailyhorizo_view.view.*
/**
* @author yuanwai
......@@ -29,7 +29,7 @@ class TestHomeDailyHorizoView(mContext: Context, testHomeEvent: ITestHomeEvent)
* 界面初始化
*/
private fun initView() {
View.inflate(context, R.layout.testhome_dailyhorizo_view, this)
View.inflate(context, R.layout.tests_testhome_dailyhorizo_view, this)
isVerticalScrollBarEnabled = false
isHorizontalScrollBarEnabled = false
}
......
......@@ -9,7 +9,7 @@ import com.yidianling.tests.R
import com.yidianling.tests.home.bean.TestHomeDataBean
import com.yidianling.tests.home.contract.ITestHomeContract
import com.yidianling.tests.home.event.ITestHomeEvent
import kotlinx.android.synthetic.main.testhome_daily_view.view.*
import kotlinx.android.synthetic.main.tests_testhome_daily_view.view.*
/**
* @author yuanwai
......@@ -51,8 +51,8 @@ class TestHomeDailyView(mContext: Context,
private fun initView() {
var params = RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
layoutParams = params
mView = View.inflate(context, R.layout.testhome_daily_view, this)
testhome_dailyRight.setOnClickListener {
mView = View.inflate(context, R.layout.tests_testhome_daily_view, this)
tests_testhome_dailyRight.setOnClickListener {
testHomeView!!.dailyChange()
}
}
......@@ -105,7 +105,7 @@ class TestHomeDailyView(mContext: Context,
} else {
var params = RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
dailyHorizoView = TestHomeDailyHorizoView(context, testHomeEvent!!)
dailyHorizoView.id = R.id.testhome_daily
dailyHorizoView.id = R.id.tests_testhome_daily
dailyHorizoView.couponMoney = this.couponMoney
dailyHorizoView.initData(mDataBean!!.body!!)
params.addRule(BELOW, R.id.tv_title)
......@@ -123,8 +123,8 @@ class TestHomeDailyView(mContext: Context,
hasLine = true
var param = RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, RxImageTool.dip2px(9f))
var bottomLine = View(context)
bottomLine.setBackgroundColor(resources.getColor(R.color.testhome_line))
param.addRule(BELOW, R.id.testhome_daily)
bottomLine.setBackgroundColor(resources.getColor(R.color.tests_testhome_line))
param.addRule(BELOW, R.id.tests_testhome_daily)
bottomLine.layoutParams = param
addView(bottomLine)
}
......
......@@ -13,8 +13,8 @@ import android.widget.FrameLayout
import com.yidianling.tests.R
import com.yidianling.tests.home.bean.TestHomeBodyBean
import com.yidianling.tests.home.event.ITestHomeEvent
import kotlinx.android.synthetic.main.testhome_realtest_view_in.view.*
import kotlinx.android.synthetic.main.testhome_realtest_view_out.view.*
import kotlinx.android.synthetic.main.tests_testhome_realtest_view_in.view.*
import kotlinx.android.synthetic.main.tests_testhome_realtest_view_out.view.*
/**
* @author yuanwai
......@@ -70,8 +70,8 @@ class TestHomeRealTestView(mContext : Context,testHomeEvent : ITestHomeEvent) :
*/
private fun initView() {
var params = ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.WRAP_CONTENT)
view_out = View.inflate(context, R.layout.testhome_realtest_view_out,null)
view_in = View.inflate(context, R.layout.testhome_realtest_view_in,null)
view_out = View.inflate(context, R.layout.tests_testhome_realtest_view_out,null)
view_in = View.inflate(context, R.layout.tests_testhome_realtest_view_in,null)
addView(view_out)
addView(view_in)
layoutParams = params
......@@ -174,11 +174,11 @@ class TestHomeRealTestView(mContext : Context,testHomeEvent : ITestHomeEvent) :
private fun getName(name : String?) : String{
var nameBuffer = StringBuffer()
nameBuffer.append(resources.getString(R.string.testhome_just))
nameBuffer.append(resources.getString(R.string.tests_testhome_just))
nameBuffer.append(" ")
nameBuffer.append(name)
nameBuffer.append(" ")
nameBuffer.append(resources.getString(R.string.testhome_test))
nameBuffer.append(resources.getString(R.string.tests_testhome_test))
return nameBuffer.toString()
}
......
......@@ -10,6 +10,7 @@ import android.widget.FrameLayout
import android.widget.LinearLayout
import android.widget.TextView
import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.utils.ScreenUtil
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxImageTool
import com.yidianling.tests.R
......@@ -17,8 +18,7 @@ import com.yidianling.tests.home.bean.TestHomeBodyBean
import com.yidianling.tests.home.bean.TestHomeDataBean
import com.yidianling.tests.home.event.ITestHomeEvent
import com.yidianling.tests.home.utils.TestHomeUtils
import com.ydl.ydlcommon.utils.ScreenUtil
import kotlinx.android.synthetic.main.testhome_recommend_first_view.view.*
import kotlinx.android.synthetic.main.tests_testhome_recommend_first_view.view.*
/**
* @author yuanwai
......@@ -47,7 +47,7 @@ class TestHomeRecommendedFirstView(mContext: Context, testHomeEvent: ITestHomeEv
* 界面初始化
*/
private fun initView() {
View.inflate(context, R.layout.testhome_recommend_first_view, this)
View.inflate(context, R.layout.tests_testhome_recommend_first_view, this)
imgWidth = ScreenUtil.screenWidth - RxImageTool.dip2px(30f)
initImageParam()
addTitle()
......@@ -62,11 +62,11 @@ class TestHomeRecommendedFirstView(mContext: Context, testHomeEvent: ITestHomeEv
params.leftMargin = RxImageTool.dip2px(15f)
params.topMargin = RxImageTool.dip2px(30f)
val titleView = TextView(context)
titleView.id = R.id.testhome_recommenTitle
titleView.id = R.id.tests_testhome_recommenTitle
titleView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 18f)
titleView.setTextColor(resources.getColor(R.color.testhome_title))
titleView.setTextColor(resources.getColor(R.color.tests_testhome_title))
val drawable = resources.getDrawable(R.drawable.testhome_hot)
val drawable = resources.getDrawable(R.drawable.tests_testhome_hot)
/// 这一步必须要做,否则不会显示.
drawable.setBounds(0, 0, drawable.minimumWidth, drawable.minimumHeight)
titleView.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null)
......@@ -81,7 +81,7 @@ class TestHomeRecommendedFirstView(mContext: Context, testHomeEvent: ITestHomeEv
return
}
//设置标题
findViewById<TextView>(R.id.testhome_recommenTitle).text = dataBean.head!!.title
findViewById<TextView>(R.id.tests_testhome_recommenTitle).text = dataBean.head!!.title
//设置推荐列表数据
initRecommeded(dataBean.body!![0], position)
}
......@@ -99,7 +99,7 @@ class TestHomeRecommendedFirstView(mContext: Context, testHomeEvent: ITestHomeEv
tv_recomContent.text = bodyBean.recommendedContent
setPrice(bodyBean.recommendedPrice)
tv_recomNum.text = TestHomeUtils.getNum(context, bodyBean.recommendedNum)
GlideApp.with(context).load(bodyBean.recommendedUrl).placeholder(R.drawable.testhome_banner_nor)
GlideApp.with(context).load(bodyBean.recommendedUrl).placeholder(R.drawable.tests_testhome_banner_nor)
.into(img_recom)
LogUtil.e("宽:${img_recom.measuredWidth};高${img_recom.measuredHeight}")
tv_Hits.text = TestHomeUtils.getHits(context, bodyBean.recommendedHits)
......@@ -117,13 +117,13 @@ class TestHomeRecommendedFirstView(mContext: Context, testHomeEvent: ITestHomeEv
tv_recomPrice.visibility = View.VISIBLE
if ("免费" == price) {
tv_recomPrice.text = price
tv_recomPrice.setBackgroundResource(R.drawable.testhome_recom_price_bg)
tv_recomPrice.setBackgroundResource(R.drawable.tests_testhome_recom_price_bg)
tv_recomPrice.setTextColor(Color.parseColor("#34CD65"))
} else {
var newPrice = TestHomeUtils.getOriginalPrice(tv_coupon_money,price,couponMoney)
var priceContent = "¥$newPrice"
TestHomeUtils.priceStyleNew(context, tv_recomPrice, priceContent, 1, priceContent.length)
tv_recomPrice.setBackgroundResource(R.drawable.testhome_null)
tv_recomPrice.setBackgroundResource(R.drawable.tests_testhome_null)
}
}
......
......@@ -13,7 +13,7 @@ import com.yidianling.tests.home.bean.TestHomeBodyBean
import com.yidianling.tests.home.bean.TestHomeDataBean
import com.yidianling.tests.home.event.ITestHomeEvent
import com.yidianling.tests.home.utils.TestHomeUtils
import kotlinx.android.synthetic.main.testhome_recommended_view.view.*
import kotlinx.android.synthetic.main.tests_testhome_recommended_view.view.*
/**
* @author yuanwai
......@@ -38,7 +38,7 @@ class TestHomeRecommendedView(mContext: Context, testHomeEvent: ITestHomeEvent)
* 界面初始化
*/
private fun initView() {
View.inflate(context, R.layout.testhome_recommended_view, this)
View.inflate(context, R.layout.tests_testhome_recommended_view, this)
dp2 = RxImageTool.dip2px(2f)
dp5 = RxImageTool.dip2px(5f)
}
......@@ -64,7 +64,7 @@ class TestHomeRecommendedView(mContext: Context, testHomeEvent: ITestHomeEvent)
setPrice(bodyBean.recommendedPrice)
tv_recomNum.text = TestHomeUtils.getNum(context, bodyBean.recommendedNum)
GlideApp.with(context).load(bodyBean.recommendedUrl)
.placeholder(R.drawable.testhome_list_nor)
.placeholder(R.drawable.tests_testhome_list_nor)
.centerCrop().into(img_recom)
tv_Hits.text = TestHomeUtils.getHits(context, bodyBean.recommendedHits)
setOnClickListener {
......@@ -81,7 +81,7 @@ class TestHomeRecommendedView(mContext: Context, testHomeEvent: ITestHomeEvent)
if ("免费" == price){
tv_recomPrice.setPadding(dp5!!,dp2!!,dp5!!,dp2!!)
tv_recomPrice.text = price
tv_recomPrice.setBackgroundResource(R.drawable.testhome_recom_price_bg)
tv_recomPrice.setBackgroundResource(R.drawable.tests_testhome_recom_price_bg)
tv_recomPrice.setTextColor(Color.parseColor("#34CD65"))
tv_coupon_money.visibility = View.GONE
}else{
......@@ -89,7 +89,7 @@ class TestHomeRecommendedView(mContext: Context, testHomeEvent: ITestHomeEvent)
tv_recomPrice.setPadding(0,dp2!!,dp5!!,dp2!!)
var priceContent = "¥$newPrice"
TestHomeUtils.priceStyleNew(context,tv_recomPrice,priceContent, 1, priceContent.length)
tv_recomPrice.setBackgroundResource(R.drawable.testhome_null)
tv_recomPrice.setBackgroundResource(R.drawable.tests_testhome_null)
}
}
}
\ No newline at end of file
......@@ -31,7 +31,7 @@ import com.yidianling.tests.list.view.adapter.TestListPagerAdapter
import com.yidianling.tests.list.view.widget.CategoryPopupWindow
import com.yidianling.tests.router.TestsIn
import com.yidianling.tests.search.TestSearchActivity
import kotlinx.android.synthetic.main.activity_test_category_list.*
import kotlinx.android.synthetic.main.tests_activity_test_category_list.*
@Route(path = "/ceshi/category_list")
class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListActivityPresenter>(), TestListActivityView, PopupWindow.OnDismissListener {
......@@ -95,7 +95,7 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
}
override fun layoutResId(): Int {
return R.layout.activity_test_category_list
return R.layout.tests_activity_test_category_list
}
override fun initDataAndEvent() {
......
......@@ -23,13 +23,13 @@ import com.yidianling.tests.list.presenter.TestListActivityPresenter
import com.yidianling.tests.list.view.adapter.TestListPagerAdapter
import com.yidianling.tests.router.TestsIn
import com.yidianling.tests.search.TestSearchActivity
import kotlinx.android.synthetic.main.activity_test_list.*
import kotlinx.android.synthetic.main.tests_activity_test_list.*
@Route(path = "/ceshi/list")
class TestListActivity : BaseMvpActivity<TestListActivityView, TestListActivityPresenter>(), TestListActivityView {
override fun layoutResId(): Int {
return R.layout.activity_test_list
return R.layout.tests_activity_test_list
}
override fun initDataAndEvent() {
......
......@@ -38,7 +38,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
import io.reactivex.functions.Consumer
import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.fragment_test_list.*
import kotlinx.android.synthetic.main.tests_fragment_test_list.*
import java.util.*
class TestListFragment : BaseFragment(), MyBaseAdapter.OnItemClickListener<Test> {
......@@ -52,7 +52,7 @@ class TestListFragment : BaseFragment(), MyBaseAdapter.OnItemClickListener<Test>
}
override fun layoutResId(): Int {
return R.layout.fragment_test_list
return R.layout.tests_fragment_test_list
}
private var category: String? = null //测试类型id
......@@ -152,7 +152,7 @@ class TestListFragment : BaseFragment(), MyBaseAdapter.OnItemClickListener<Test>
.put("test_type", categoryName ?: "")
.burryPoint("testClick")
if (v == null || data == null) {
ToastUtil.toastShort(getString(R.string.wrong_args))
ToastUtil.toastShort(getString(R.string.tests_wrong_args))
return
}
//如果列表是待支付 的话 则跳转 支付界面
......
......@@ -10,7 +10,7 @@ import android.view.ViewGroup
import android.widget.TextView
import com.yidianling.tests.R
import com.yidianling.tests.list.model.bean.CategotyPopItem
import kotlinx.android.synthetic.main.item_tab_pop_sort.view.*
import kotlinx.android.synthetic.main.tests_item_tab_pop_sort.view.*
/**
* Created by zqk on 17-9-20.
......@@ -24,7 +24,7 @@ class CategoryConditionRecyclerViewAdapter(private val context: Context,
var lastSelectText : String ?= null
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): ViewHolder {
val itemView = LayoutInflater.from(context).inflate(R.layout.item_tab_pop_sort, parent, false)
val itemView = LayoutInflater.from(context).inflate(R.layout.tests_item_tab_pop_sort, parent, false)
return ViewHolder(itemView)
}
......
......@@ -15,8 +15,8 @@ import com.yidianling.tests.R
import com.yidianling.tests.home.utils.TestHomeUtils
import com.yidianling.tests.list.model.bean.Test
import kotlinx.android.synthetic.main.testlist_item_view.view.*
import kotlinx.android.synthetic.main.view_footview_loadmore.view.*
import kotlinx.android.synthetic.main.tests_testlist_item_view.view.*
import kotlinx.android.synthetic.main.tests_view_footview_loadmore.view.*
/**
......@@ -77,7 +77,7 @@ class TestListRecyclerAdapter(private val context: Context,
.dontAnimate()
.dontTransform()
// .diskCacheStrategy(DiskCacheStrategy.ALL)
.placeholder(R.drawable.default_img)
.placeholder(R.drawable.tests_default_img)
.into(holder.ivCover)
holder.tvTitle.text = test.name
holder.tvTestCount.text =TestHomeUtils.getNumNew(context, test.count)
......@@ -90,11 +90,11 @@ class TestListRecyclerAdapter(private val context: Context,
holder.pbLoading.visibility = View.VISIBLE
holder.ivNoMoreLeft.visibility = View.GONE
holder.ivNoMoreRight.visibility = View.GONE
holder.tvContent.text = context.getString(R.string.loading)
holder.tvContent.text = context.getString(R.string.tests_loading)
} else {
holder.pbLoading.visibility = View.GONE
holder.tvContent.text = context.getString(R.string.load_end)
holder.tvContent.text = context.getString(R.string.tests_load_end)
holder.ivNoMoreLeft.visibility = View.VISIBLE
holder.ivNoMoreRight.visibility = View.VISIBLE
}
......@@ -117,14 +117,14 @@ class TestListRecyclerAdapter(private val context: Context,
tvCoupon.visibility = View.GONE
textView.setPadding(dp5!!,dp2!!,dp5!!,dp2!!)
textView.text = "免费"
textView.setBackgroundResource(R.drawable.testhome_recom_price_bg)
textView.setBackgroundResource(R.drawable.tests_testhome_recom_price_bg)
textView.setTextColor(Color.parseColor("#34CD65"))
}else{
var newPrice = TestHomeUtils.getOriginalPrice(tvCoupon,price,couponMoney)
textView.setPadding(0,dp5!!,dp5!!,0)
var priceContent = "¥$newPrice"
TestHomeUtils.priceStyleNew(context,textView,priceContent, 1, priceContent.length)
textView.setBackgroundResource(R.drawable.testhome_null)
textView.setBackgroundResource(R.drawable.tests_testhome_null)
}
}
......@@ -134,13 +134,13 @@ class TestListRecyclerAdapter(private val context: Context,
} else if (viewType == TYPE_NORMAL) {
var view :View ?=null
if (pageType== PAGE_TYPE_CATEGORY){
view = LayoutInflater.from(parent?.context).inflate(R.layout.item_category_testlist_view, parent, false)
view = LayoutInflater.from(parent?.context).inflate(R.layout.tests_item_category_testlist_view, parent, false)
}else {
view = LayoutInflater.from(parent?.context).inflate(R.layout.testlist_item_view, parent, false)
view = LayoutInflater.from(parent?.context).inflate(R.layout.tests_testlist_item_view, parent, false)
}
NormalViewHolder(view!!)
} else {
val view = LayoutInflater.from(parent?.context).inflate(R.layout.view_footview_loadmore, parent, false)
val view = LayoutInflater.from(parent?.context).inflate(R.layout.tests_view_footview_loadmore, parent, false)
FootViewHolder(view)
}
}
......
......@@ -9,7 +9,7 @@ import android.widget.PopupWindow
import com.yidianling.tests.R
import com.yidianling.tests.list.model.bean.CategotyPopItem
import com.yidianling.tests.list.view.adapter.CategoryConditionRecyclerViewAdapter
import kotlinx.android.synthetic.main.ui_category_sort_popup_window.view.*
import kotlinx.android.synthetic.main.tests_ui_category_sort_popup_window.view.*
/**
* 排序弹窗
......@@ -23,7 +23,7 @@ class CategoryPopupWindow(val context: Context,
var adapter: CategoryConditionRecyclerViewAdapter
init {
val view = LayoutInflater.from(context).inflate(R.layout.ui_category_sort_popup_window, null)
val view = LayoutInflater.from(context).inflate(R.layout.tests_ui_category_sort_popup_window, null)
this.contentView = view
this.isFocusable = true
@Suppress("DEPRECATION")
......
......@@ -7,7 +7,7 @@ import android.view.ViewGroup
import com.ydl.ydlcommon.adapter.MyBaseAdapter
import com.yidianling.tests.R
import com.yidianling.tests.list.model.bean.Test
import kotlinx.android.synthetic.main.item_hot_test.view.*
import kotlinx.android.synthetic.main.tests_item_hot_test.view.*
/**
* HotTestListAdapter
......@@ -41,10 +41,10 @@ class HotTestListAdapter(val hotTestList: MutableList<Test>) : RecyclerView.Adap
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): RecyclerView.ViewHolder {
return if (viewType == TYPE_NORMAL) {
val view = LayoutInflater.from(parent!!.context).inflate(R.layout.item_hot_test, parent, false)
val view = LayoutInflater.from(parent!!.context).inflate(R.layout.tests_item_hot_test, parent, false)
NormalViewHolder(view)
} else {
val view = LayoutInflater.from(parent!!.context).inflate(R.layout.item_hot_test_header, parent, false)
val view = LayoutInflater.from(parent!!.context).inflate(R.layout.tests_item_hot_test_header, parent, false)
object : RecyclerView.ViewHolder(view) {}
}
}
......
......@@ -29,8 +29,8 @@ import com.yidianling.tests.list.model.bean.RecommendSearchItemBean
import com.yidianling.tests.list.model.bean.Test
import com.yidianling.tests.list.view.adapter.TestListRecyclerAdapter
import de.greenrobot.event.EventBus
import kotlinx.android.synthetic.main.activity_test_search.*
import kotlinx.android.synthetic.main.item_hot_search.view.*
import kotlinx.android.synthetic.main.tests_activity_test_search.*
import kotlinx.android.synthetic.main.tests_item_hot_search.view.*
class TestSearchActivity : BaseMvpActivity<TestSearchView, TestSearchPresenter>(), TestSearchView, View.OnClickListener {
......@@ -41,7 +41,7 @@ class TestSearchActivity : BaseMvpActivity<TestSearchView, TestSearchPresenter>(
}
override fun layoutResId(): Int {
return R.layout.activity_test_search
return R.layout.tests_activity_test_search
}
override fun initDataAndEvent() {
......@@ -105,8 +105,8 @@ class TestSearchActivity : BaseMvpActivity<TestSearchView, TestSearchPresenter>(
RouterManager.getTestsRouter()?.testDetailH5(data.id.toString())
}
headerHotSearch = View.inflate(this, R.layout.header_hot_search, null) as LinearLayout?;
searchHeader = View.inflate(this, R.layout.header_search_list, null);
headerHotSearch = View.inflate(this, R.layout.tests_header_hot_search, null) as LinearLayout?;
searchHeader = View.inflate(this, R.layout.tests_header_search_list, null);
tvSearchHint = searchHeader?.findViewById(R.id.tv_search_hint);
flHotSearch = headerHotSearch?.findViewById(R.id.flHotSearch)
......@@ -177,7 +177,7 @@ class TestSearchActivity : BaseMvpActivity<TestSearchView, TestSearchPresenter>(
private fun doSearch() {
keyword = etSearch.text.toString()
if (TextUtils.isEmpty(keyword)) {
ToastUtil.toastShort(getString(R.string.no_search_keyword_hint))
ToastUtil.toastShort(getString(R.string.tests_no_search_keyword_hint))
return
}
hideSoftInput()
......@@ -232,7 +232,7 @@ class TestSearchActivity : BaseMvpActivity<TestSearchView, TestSearchPresenter>(
headerHotSearch?.visibility = View.VISIBLE
flHotSearch?.removeAllViews()
for (index in keywordData.indices) {
val view = LayoutInflater.from(this).inflate(R.layout.item_recommend_hot_search, flHotSearch, false)
val view = LayoutInflater.from(this).inflate(R.layout.tests_item_recommend_hot_search, flHotSearch, false)
view.tvHotSearch.text = keywordData[index].keyWord
view.setOnClickListener {
etSearch.setText(keywordData[index].keyWord)
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:drawable="@drawable/ic_test_checked"/>
<item android:state_checked="false" android:drawable="@drawable/ic_test_unchecked"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:drawable="@drawable/tests_ic_test_checked"/>
<item android:state_checked="false" android:drawable="@drawable/tests_ic_test_unchecked"/>
</selector>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<size
android:width="1dp"
android:height="1dp" />
<solid android:color="@color/colorDivider" />
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<size
android:width="1dp"
android:height="1dp" />
<solid android:color="@color/tests_colorDivider" />
</shape>
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.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="match_parent"
tools:ignore="ResourceName">
<com.ydl.ydlcommon.view.TitleBar
android:id="@+id/title_bar"
android:layout_width="match_parent"
android:layout_height="@dimen/platform_title_bar_height"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:pa_left_start_icon="@drawable/platform_toolbar_back"
app:right_iv="@drawable/more_green"
app:right_start_icon="@drawable/share"
app:pa_title_text="测试介绍" />
<ScrollView
android:id="@+id/scrollView"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintBottom_toTopOf="@+id/btnStartTest"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/title_bar"
tools:visibility="visible">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingBottom="16dp">
<ImageView
android:id="@+id/ivCover"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:contentDescription="@null"
android:scaleType="fitCenter" />
<TextView
android:id="@+id/tvTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/ivCover"
android:layout_marginEnd="24dp"
android:layout_marginStart="24dp"
android:layout_marginTop="16dp"
android:textAlignment="center"
android:textSize="20sp"
android:textStyle="bold"
tools:text="简易工作压力量表" />
<LinearLayout
android:id="@+id/llInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tvTitle"
android:gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:id="@+id/tvTestCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:drawableLeft="@drawable/ic_edit"
android:drawablePadding="8dp"
android:drawableStart="@drawable/ic_edit"
android:textColor="@color/color_black_ff999999"
android:textSize="12sp"
tools:text="3796人测过" />
<TextView
android:id="@+id/tvQuestionNum"
android:layout_width="wrap_content"
android:layout_height="16dp"
android:layout_marginLeft="24dp"
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
android:drawableLeft="@drawable/ic_item"
android:drawablePadding="8dp"
android:drawableStart="@drawable/ic_item"
android:textColor="@color/color_black_ff999999"
android:textSize="12sp"
tools:text="10个问题" />
</LinearLayout>
<TextView
android:id="@+id/tvDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/llInfo"
android:layout_marginEnd="24dp"
android:layout_marginStart="24dp"
android:layout_marginTop="16dp"
android:lineSpacingExtra="8sp"
android:textColor="@color/platform_color_black_333333"
android:textSize="16sp"
tools:text="每个人都会遇到压力,您想知道自己的压力状态吗?赶紧点击测试一下吧!" />
<TextView
android:id="@+id/tvTestTips"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tvDesc"
android:layout_marginEnd="24dp"
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
android:text="@string/testdetail_tips"
android:textColor="@color/color_black_ff999999"
android:textSize="12sp" />
<TextView
android:id="@+id/tvDigmenTips"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tvTestTips"
android:layout_marginEnd="24dp"
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
android:text="@string/testdetail_tips"
android:textColor="@color/color_black_ff999999"
android:textSize="12sp"
android:visibility="gone"
tools:visibility="visible" />
</RelativeLayout>
</ScrollView>
<Button
android:id="@+id/btnStartTest"
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@drawable/bg_btn_no_corner_green"
android:text="@string/start_test"
android:textColor="@color/white"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<FrameLayout
android:id="@+id/flLoading"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:paddingBottom="60dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/title_bar"
tools:visibility="gone">
<ProgressBar
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
</FrameLayout>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".list.view.TestListActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/platform_title_bar_height"
android:background="@color/white"
android:gravity="center_vertical"
>
<ImageView
android:id="@+id/iv_test_list_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="15dp"
android:src="@drawable/icon_test_back"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="32dp"
android:background="@drawable/bg_test_search_input"
android:orientation="horizontal"
android:layout_marginRight="15dp"
>
<ImageView
android:layout_width="13dp"
android:layout_height="13dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="12dp"
android:src="@drawable/search_gray"/>
<TextView
android:id="@+id/tv_test_search"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="8dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/search"
android:textColor="#BFBFBF"
android:textSize="@dimen/platform_default_text_size_small"
android:textStyle="normal"
android:typeface="sans"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/activity_tab_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
tools:context="q.rorbin.verticaltablayoutdemo.TabFragmentActivity">
<com.ydl.ydlcommon.view.verticaltablayout.VerticalTabLayout
android:id="@+id/vt_test_search"
android:layout_width="72dp"
android:layout_height="match_parent"
android:background="#F7F7F7"
app:pa_tab_height="44dp"
app:pa_tab_indicator_margin="13dp"
app:pa_tab_mode="scrollable"
/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
>
<LinearLayout
android:id="@+id/ll_sort"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
>
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id="@+id/dr_sort"
style="@style/FilterTextViewStyle"
android:layout_width="wrap_content"
android:layout_height="44dp"
android:layout_marginLeft="@dimen/platform_dp_16"
android:drawableEnd="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:drawableRight="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:text="综合排序"
android:textColor="@color/platform_color_242424"
/>
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id="@+id/dr_filter"
style="@style/FilterTextViewStyle"
android:layout_width="wrap_content"
android:layout_height="44dp"
android:drawableEnd="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:drawableRight="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:paddingLeft="15dp"
android:text="全部"
android:textColor="@color/platform_color_242424"
/>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.ydl.ydlcommon.view.verticaltablayout.VerticalViewPager
android:id="@+id/vvp_test"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<View
android:id="@+id/view_mask"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#3c000000"
android:visibility="gone"
/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".list.view.TestListActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/platform_title_bar_height"
android:background="@color/white"
android:gravity="center_vertical"
>
<ImageView
android:id="@+id/iv_test_list_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="15dp"
android:src="@drawable/tests_icon_test_back"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="32dp"
android:background="@drawable/tests_bg_test_search_input"
android:orientation="horizontal"
android:layout_marginRight="15dp"
>
<ImageView
android:layout_width="13dp"
android:layout_height="13dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="12dp"
android:src="@drawable/tests_search_gray"/>
<TextView
android:id="@+id/tv_test_search"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="8dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/tests_search"
android:textColor="#BFBFBF"
android:textSize="@dimen/platform_default_text_size_small"
android:textStyle="normal"
android:typeface="sans"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/activity_tab_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
tools:context="q.rorbin.verticaltablayoutdemo.TabFragmentActivity">
<com.ydl.ydlcommon.view.verticaltablayout.VerticalTabLayout
android:id="@+id/vt_test_search"
android:layout_width="72dp"
android:layout_height="match_parent"
android:background="#F7F7F7"
app:pa_tab_height="44dp"
app:pa_tab_indicator_margin="13dp"
app:pa_tab_mode="scrollable"
/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
>
<LinearLayout
android:id="@+id/ll_sort"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
>
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id="@+id/dr_sort"
style="@style/tests_FilterTextViewStyle"
android:layout_width="wrap_content"
android:layout_height="44dp"
android:layout_marginLeft="@dimen/platform_dp_16"
android:drawableEnd="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:drawableRight="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:text="综合排序"
android:textColor="@color/platform_color_242424"
/>
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id="@+id/dr_filter"
style="@style/tests_FilterTextViewStyle"
android:layout_width="wrap_content"
android:layout_height="44dp"
android:drawableEnd="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:drawableRight="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:paddingLeft="15dp"
android:text="全部"
android:textColor="@color/platform_color_242424"
/>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.ydl.ydlcommon.view.verticaltablayout.VerticalViewPager
android:id="@+id/vvp_test"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<View
android:id="@+id/view_mask"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#3c000000"
android:visibility="gone"
/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".list.view.TestListActivity">
<com.ydl.ydlcommon.view.TitleBar
android:id="@+id/titleBar"
android:layout_width="match_parent"
android:layout_height="@dimen/platform_title_bar_height"
app:bm_line_color="@color/transparent"
app:pa_left_start_icon="@drawable/platform_toolbar_back"
app:right_iv="@drawable/more12x"
app:right_start_icon="@drawable/icon_navsearch_green"
app:pa_title_text="心理测试" />
<LinearLayout
android:id="@+id/llTestRedPacketTips"
android:layout_width="match_parent"
android:layout_height="@dimen/platform_dp_36"
android:orientation="horizontal"
android:visibility="gone"
android:background="@color/platform_color_FFEBE0">
<ImageView
android:layout_width="@dimen/platform_dp_14"
android:layout_height="@dimen/platform_dp_17"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/platform_dp_15"
android:background="@drawable/test_redpacket" />
<TextView
android:id="@+id/tvTestRedPacketTips"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/platform_dp_12"
android:textSize="@dimen/platform_dp_12"
android:textColor="@color/platform_color_FF5B05"
android:layout_gravity="center_vertical"
tools:text="还有5个心理测试红包等你使用"/>
</LinearLayout>
<android.support.design.widget.TabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="40dp"
app:tabIndicatorColor="@color/platform_platform_google_green"
app:tabMode="scrollable"
app:tabSelectedTextColor="@color/platform_platform_google_green" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/platform_divide_color" />
<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".list.view.TestListActivity">
<com.ydl.ydlcommon.view.TitleBar
android:id="@+id/titleBar"
android:layout_width="match_parent"
android:layout_height="@dimen/platform_title_bar_height"
app:pa_bm_line_color="@color/transparent"
app:pa_left_start_icon="@drawable/platform_toolbar_back"
app:pa_right_iv="@drawable/platform_more12x"
app:pa_right_start_icon="@drawable/tests_icon_navsearch_green"
app:pa_title_text="心理测试" />
<LinearLayout
android:id="@+id/llTestRedPacketTips"
android:layout_width="match_parent"
android:layout_height="@dimen/platform_dp_36"
android:orientation="horizontal"
android:visibility="gone"
android:background="@color/platform_color_FFEBE0">
<ImageView
android:layout_width="@dimen/platform_dp_14"
android:layout_height="@dimen/platform_dp_17"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/platform_dp_15"
android:background="@drawable/tests_test_redpacket" />
<TextView
android:id="@+id/tvTestRedPacketTips"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/platform_dp_12"
android:textSize="@dimen/platform_dp_12"
android:textColor="@color/platform_color_FF5B05"
android:layout_gravity="center_vertical"
tools:text="还有5个心理测试红包等你使用"/>
</LinearLayout>
<android.support.design.widget.TabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="40dp"
app:tabIndicatorColor="@color/platform_google_green"
app:tabMode="scrollable"
app:tabSelectedTextColor="@color/platform_google_green" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/platform_divide_color" />
<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<LinearLayout 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/clContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical"
tools:context=".search.TestSearchActivity">
<LinearLayout
android:id="@+id/ll_title"
android:layout_width="match_parent"
android:layout_height="45dp"
android:gravity="center_vertical"
app:layout_constraintTop_toTopOf="parent">
<com.ydl.ydlcommon.view.DeleteEditTextView
android:id="@+id/etSearch"
android:layout_width="0dp"
android:layout_height="36dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:background="@drawable/bg_test_search_input"
android:drawableStart="@drawable/search_gray"
android:drawableLeft="@drawable/search_gray"
android:drawablePadding="8dp"
android:ems="10"
android:hint="输入标题与内容"
android:imeOptions="actionSearch"
android:inputType="text|textPersonName"
android:lines="1"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:textCursorDrawable="@color/platform_color_42C1FF"
android:textSize="14sp" />
<TextView
android:id="@+id/tvBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="6dp"
android:padding="10dp"
android:text="@string/platform_cancel"
android:textColor="@color/platform_color_999999" />
</LinearLayout>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_hot_list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_search_list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<LinearLayout
android:id="@+id/llEmpty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="visible">
<ImageView
android:id="@+id/iv_empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="30dp"
android:src="@drawable/platform_ico_img_zixun_empty"
android:visibility="gone"
tools:visibility="visible" />
<TextView
android:id="@+id/tv_search_empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="15dp"
tools:text="为您找到以下跟“付费”有关的内容" />
</LinearLayout>
</RelativeLayout>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
<LinearLayout 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/clContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical"
tools:context=".search.TestSearchActivity">
<LinearLayout
android:id="@+id/ll_title"
android:layout_width="match_parent"
android:layout_height="45dp"
android:gravity="center_vertical"
app:layout_constraintTop_toTopOf="parent">
<com.ydl.ydlcommon.view.DeleteEditTextView
android:id="@+id/etSearch"
android:layout_width="0dp"
android:layout_height="36dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:background="@drawable/tests_bg_test_search_input"
android:drawableStart="@drawable/tests_search_gray"
android:drawableLeft="@drawable/tests_search_gray"
android:drawablePadding="8dp"
android:ems="10"
android:hint="输入标题与内容"
android:imeOptions="actionSearch"
android:inputType="text|textPersonName"
android:lines="1"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:textCursorDrawable="@color/platform_color_42C1FF"
android:textSize="14sp" />
<TextView
android:id="@+id/tvBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="6dp"
android:padding="10dp"
android:text="@string/platform_cancel"
android:textColor="@color/platform_color_999999" />
</LinearLayout>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_hot_list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_search_list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<LinearLayout
android:id="@+id/llEmpty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="visible">
<ImageView
android:id="@+id/iv_empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="30dp"
android:src="@drawable/platform_ico_img_zixun_empty"
android:visibility="gone"
tools:visibility="visible" />
<TextView
android:id="@+id/tv_search_empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="15dp"
tools:text="为您找到以下跟“付费”有关的内容" />
</LinearLayout>
</RelativeLayout>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
<FrameLayout 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"
tools:context=".list.view.TestListFragment">
<android.support.v7.widget.RecyclerView
android:id="@+id/rvTestList"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="@+id/flLoading"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:paddingBottom="60dp"
tools:visibility="visible">
<ProgressBar
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
</FrameLayout>
<LinearLayout
android:id="@+id/llNoTest"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical"
android:paddingBottom="100dp"
android:visibility="gone">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@null"
android:src="@drawable/blank" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="@string/no_test_record_hint"
android:textColor="@color/color_grey_888888" />
</LinearLayout>
</FrameLayout>
<FrameLayout 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"
tools:context=".list.view.TestListFragment">
<android.support.v7.widget.RecyclerView
android:id="@+id/rvTestList"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="@+id/flLoading"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:paddingBottom="60dp"
tools:visibility="visible">
<ProgressBar
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
</FrameLayout>
<LinearLayout
android:id="@+id/llNoTest"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical"
android:paddingBottom="100dp"
android:visibility="gone">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@null"
android:src="@drawable/tests_blank" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="@string/tests_no_test_record_hint"
android:textColor="@color/tests_color_grey_888888" />
</LinearLayout>
</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
>
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="18dp"
android:layout_marginRight="123dp"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/platform_color_333333"
android:textSize="@dimen/sp_16"
android:textStyle="bold"
tools:text="你的心理足够成熟么你的心理足够成熟么"
/>
<TextView
android:id="@+id/tvContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_title"
android:layout_marginLeft="15dp"
android:layout_marginTop="5dp"
android:layout_marginRight="123dp"
android:ellipsize="end"
android:lineSpacingExtra="4dp"
android:maxLines="2"
android:minHeight="24dp"
android:minLines="2"
android:textColor="#666"
android:textSize="12sp"
tools:text="这里是副标题,这里是副标题,这里是副标题,这里是副标题"/>
<TextView
android:id="@+id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/cv_recom"
android:layout_marginTop="14dp"
android:layout_marginLeft="15dp"
android:background="@drawable/testhome_recom_price_bg"
android:gravity="center"
android:paddingLeft="5dp"
android:paddingTop="1dp"
android:paddingRight="5dp"
android:paddingBottom="1dp"
android:textColor="#34CD65"
android:textSize="11dp"
tools:text="免费"/>
<TextView
android:id="@+id/tv_coupon_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_corner_border_orange"
android:textColor="#FF5A4C"
tools:text="券已抵扣5元"
android:layout_toRightOf="@id/tv_price"
android:layout_marginLeft="6dp"
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:paddingRight="4dp"
android:paddingLeft="4dp"
android:textSize="10sp"
android:gravity="center"
android:layout_alignBottom="@id/tv_price"
android:layout_marginBottom="2dp"
android:visibility="gone"
tools:visibility="visible"
/>
<android.support.v7.widget.CardView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/cv_recom"
android:layout_width="96dp"
android:layout_height="68dp"
android:layout_alignParentRight="true"
android:layout_marginTop="20dp"
android:layout_marginRight="15dp"
app:cardCornerRadius="6dp"
app:cardElevation="0px">
<ImageView
android:id="@+id/ivCover"
android:layout_width="96dp"
android:layout_height="68dp"
android:scaleType="centerCrop"/>
</android.support.v7.widget.CardView>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/tv_price"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:gravity="bottom"
android:layout_marginTop="14dp"
>
<TextView
android:id="@+id/tv_hits"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#333333"
android:textSize="10sp"
android:textStyle="bold"
tools:text="16w"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="人气"
android:textColor="#666666"
android:textSize="10sp"/>
<TextView
android:id="@+id/tv_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:textColor="#333333"
android:textSize="10sp"
android:textStyle="bold"
tools:text="14000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="bottom"
android:text="人已测"
android:textColor="#666666"
android:textSize="10sp"/>
</LinearLayout>
<View
android:id="@+id/s_bottom_line"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_below="@+id/tv_price"
android:layout_marginLeft="15dp"
android:layout_marginTop="18dp"
android:layout_marginRight="15dp"
android:background="#F0F0F0"/>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
>
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="18dp"
android:layout_marginRight="123dp"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/platform_color_333333"
android:textSize="@dimen/sp_16"
android:textStyle="bold"
tools:text="你的心理足够成熟么你的心理足够成熟么"
/>
<TextView
android:id="@+id/tvContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_title"
android:layout_marginLeft="15dp"
android:layout_marginTop="5dp"
android:layout_marginRight="123dp"
android:ellipsize="end"
android:lineSpacingExtra="4dp"
android:maxLines="2"
android:minHeight="24dp"
android:minLines="2"
android:textColor="#666"
android:textSize="12sp"
tools:text="这里是副标题,这里是副标题,这里是副标题,这里是副标题"/>
<TextView
android:id="@+id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/cv_recom"
android:layout_marginTop="14dp"
android:layout_marginLeft="15dp"
android:background="@drawable/tests_testhome_recom_price_bg"
android:gravity="center"
android:paddingLeft="5dp"
android:paddingTop="1dp"
android:paddingRight="5dp"
android:paddingBottom="1dp"
android:textColor="#34CD65"
android:textSize="11dp"
tools:text="免费"/>
<TextView
android:id="@+id/tv_coupon_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/tests_bg_corner_border_orange"
android:textColor="#FF5A4C"
tools:text="券已抵扣5元"
android:layout_toRightOf="@id/tv_price"
android:layout_marginLeft="6dp"
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:paddingRight="4dp"
android:paddingLeft="4dp"
android:textSize="10sp"
android:gravity="center"
android:layout_alignBottom="@id/tv_price"
android:layout_marginBottom="2dp"
android:visibility="gone"
tools:visibility="visible"
/>
<android.support.v7.widget.CardView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/cv_recom"
android:layout_width="96dp"
android:layout_height="68dp"
android:layout_alignParentRight="true"
android:layout_marginTop="20dp"
android:layout_marginRight="15dp"
app:cardCornerRadius="6dp"
app:cardElevation="0px">
<ImageView
android:id="@+id/ivCover"
android:layout_width="96dp"
android:layout_height="68dp"
android:scaleType="centerCrop"/>
</android.support.v7.widget.CardView>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/tv_price"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:gravity="bottom"
android:layout_marginTop="14dp"
>
<TextView
android:id="@+id/tv_hits"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#333333"
android:textSize="10sp"
android:textStyle="bold"
tools:text="16w"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="人气"
android:textColor="#666666"
android:textSize="10sp"/>
<TextView
android:id="@+id/tv_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:textColor="#333333"
android:textSize="10sp"
android:textStyle="bold"
tools:text="14000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="bottom"
android:text="人已测"
android:textColor="#666666"
android:textSize="10sp"/>
</LinearLayout>
<View
android:id="@+id/s_bottom_line"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_below="@+id/tv_price"
android:layout_marginLeft="15dp"
android:layout_marginTop="18dp"
android:layout_marginRight="15dp"
android:background="#F0F0F0"/>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:padding="16dp"
android:text="@string/recommend_test"
android:textColor="@color/platform_color_black_333333" />
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:padding="16dp"
android:text="@string/tests_recommend_test"
android:textColor="@color/platform_color_black_333333" />
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/tvHotSearch"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_marginBottom="6dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:background="@drawable/bg_gray_radius_20"
android:gravity="center"
android:orientation="vertical"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:textColor="@color/platform_color_333333"
tools:text="自闭症"
tools:ignore="MissingDefaultResource"/>
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/tvHotSearch"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_marginBottom="6dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:background="@drawable/tests_bg_gray_radius_20"
android:gravity="center"
android:orientation="vertical"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:textColor="@color/platform_color_333333"
tools:text="自闭症"
tools:ignore="MissingDefaultResource"/>
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
<include layout="@layout/testhome_bar" />
</FrameLayout>
</android.support.v4.widget.SwipeRefreshLayout>
</FrameLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
<include layout="@layout/tests_testhome_bar" />
</FrameLayout>
</android.support.v4.widget.SwipeRefreshLayout>
</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="162dp"
android:background="@drawable/testhome_bg" />
<android.support.v7.widget.CardView xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="54dp"
android:layout_marginRight="15dp"
app:cardCornerRadius="6dp"
app:cardElevation="2dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="146dp">
<com.ydl.ydlcommon.view.banner.Banner
android:id="@+id/banner"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:pa_indicator_different_width="14dp"
app:pa_indicator_drawable_selected="@drawable/testhome_tip_select"
app:pa_indicator_drawable_unselected="@drawable/testhome_tip_unselect"
app:pa_indicator_height="5dp"
app:pa_indicator_margin="1.25dp"
app:pa_is_selected_same_unselected="false" />
</FrameLayout>
</android.support.v7.widget.CardView>
</merge>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="162dp"
android:background="@drawable/tests_testhome_bg" />
<android.support.v7.widget.CardView xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="54dp"
android:layout_marginRight="15dp"
app:cardCornerRadius="6dp"
app:cardElevation="2dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="146dp">
<com.ydl.ydlcommon.view.banner.Banner
android:id="@+id/banner"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:pa_indicator_different_width="14dp"
app:pa_indicator_drawable_selected="@drawable/tests_testhome_tip_select"
app:pa_indicator_drawable_unselected="@drawable/tests_testhome_tip_unselect"
app:pa_indicator_height="5dp"
app:pa_indicator_margin="1.25dp"
app:pa_is_selected_same_unselected="false" />
</FrameLayout>
</android.support.v7.widget.CardView>
</merge>
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="48dp"
android:orientation="horizontal">
<View
android:id="@+id/v_bg"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@drawable/testhome_bg" />
<LinearLayout
android:id="@+id/ll_bar_root"
android:layout_width="match_parent"
android:layout_height="48dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/img_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:background="@drawable/testhome_back" />
<RelativeLayout
android:id="@+id/rl_search"
android:layout_width="0px"
android:layout_height="32dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:layout_weight="1"
android:background="@drawable/testhome_bar_search_bg"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:drawableLeft="@drawable/testhome_search"
android:drawablePadding="4dp"
android:hint="输入关键字查找测评"
android:textColorHint="#B3ffffff"
android:textSize="12dp" />
</RelativeLayout>
<ImageView
android:id="@+id/img_mine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:padding="5dp"
android:src="@drawable/testhome_mine" />
</LinearLayout>
</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="48dp"
android:orientation="horizontal">
<View
android:id="@+id/v_bg"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@drawable/tests_testhome_bg" />
<LinearLayout
android:id="@+id/ll_bar_root"
android:layout_width="match_parent"
android:layout_height="48dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/img_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:background="@drawable/tests_testhome_back" />
<RelativeLayout
android:id="@+id/rl_search"
android:layout_width="0px"
android:layout_height="32dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:layout_weight="1"
android:background="@drawable/tests_testhome_bar_search_bg"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:drawableLeft="@drawable/tests_testhome_search"
android:drawablePadding="4dp"
android:hint="输入关键字查找测评"
android:textColorHint="#B3ffffff"
android:textSize="12dp" />
</RelativeLayout>
<ImageView
android:id="@+id/img_mine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:padding="5dp"
android:src="@drawable/tests_testhome_mine" />
</LinearLayout>
</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18dp"
android:layout_marginTop="30dp"
android:layout_marginLeft="15dp"
android:drawablePadding="5dp"
android:drawableLeft="@drawable/testhome_everyday"
tools:text="每日精选" />
<TextView
android:id="@id/testhome_dailyRight"
android:layout_width="48dp"
android:layout_height="19dp"
android:layout_marginTop="30dp"
android:layout_alignParentRight="true"
android:gravity="center"
android:text="@string/testhome_dailychange"
android:textSize="10dp"
android:textColor="#666"
android:layout_marginRight="15dp"
android:background="@drawable/testhome_dailychange_bg"/>
</merge>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18dp"
android:layout_marginTop="30dp"
android:layout_marginLeft="15dp"
android:drawablePadding="5dp"
android:drawableLeft="@drawable/tests_testhome_everyday"
tools:text="每日精选" />
<TextView
android:id="@id/tests_testhome_dailyRight"
android:layout_width="48dp"
android:layout_height="19dp"
android:layout_marginTop="30dp"
android:layout_alignParentRight="true"
android:gravity="center"
android:text="@string/tests_testhome_dailychange"
android:textSize="10dp"
android:textColor="#666"
android:layout_marginRight="15dp"
android:background="@drawable/tests_testhome_dailychange_bg"/>
</merge>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="156dp"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:paddingBottom="10dp"
>
<ImageView
android:id="@+id/img_icon"
android:layout_width="156dp"
android:layout_height="90dp"
android:scaleType="centerCrop"/>
<TextView
android:id="@+id/tv_title"
android:layout_below="@+id/img_icon"
android:layout_width="156dp"
android:layout_height="wrap_content"
android:textSize="14dp"
android:textColor="#333"
android:maxLines="2"
android:ellipsize="end"
android:layout_marginTop="16dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:textStyle="bold"
android:lines="2"
tools:text="天生命好?测试你是欧洲人还是非洲人"/>
<TextView
android:id="@+id/tv_price"
android:layout_below="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:layout_marginTop="@dimen/platform_dp_10"
android:background="@drawable/testhome_recom_price_bg"
android:gravity="center"
android:paddingBottom="2dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="2dp"
android:textColor="#34CD65"
android:textSize="11dp"
tools:text="免费"
/>
<TextView
android:layout_alignBottom="@id/img_icon"
android:id="@+id/tv_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_marginBottom="4dp"
android:gravity="right"
android:paddingRight="16dp"
android:textSize="10dp"
android:textColor="#d7ffffff"
android:layout_marginTop="6dp"
android:lines="1"
android:ellipsize="end"
tools:text="5616人测过"/>
<TextView
android:id="@+id/tv_coupon_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_corner_border_orange"
android:textColor="#FF5A4C"
tools:text="券已抵扣5元"
android:layout_toRightOf="@id/tv_price"
android:layout_marginLeft="6dp"
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:paddingRight="4dp"
android:paddingLeft="2dp"
android:textSize="10sp"
android:gravity="center"
android:layout_alignBottom="@id/tv_price"
android:visibility="gone"
tools:visibility="visible"
android:layout_marginBottom="4dp"
/>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="156dp"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:paddingBottom="10dp"
>
<ImageView
android:id="@+id/img_icon"
android:layout_width="156dp"
android:layout_height="90dp"
android:scaleType="centerCrop"/>
<TextView
android:id="@+id/tv_title"
android:layout_below="@+id/img_icon"
android:layout_width="156dp"
android:layout_height="wrap_content"
android:textSize="14dp"
android:textColor="#333"
android:maxLines="2"
android:ellipsize="end"
android:layout_marginTop="16dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:textStyle="bold"
android:lines="2"
tools:text="天生命好?测试你是欧洲人还是非洲人"/>
<TextView
android:id="@+id/tv_price"
android:layout_below="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:layout_marginTop="@dimen/platform_dp_10"
android:background="@drawable/tests_testhome_recom_price_bg"
android:gravity="center"
android:paddingBottom="2dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="2dp"
android:textColor="#34CD65"
android:textSize="11dp"
tools:text="免费"
/>
<TextView
android:layout_alignBottom="@id/img_icon"
android:id="@+id/tv_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_marginBottom="4dp"
android:gravity="right"
android:paddingRight="16dp"
android:textSize="10dp"
android:textColor="#d7ffffff"
android:layout_marginTop="6dp"
android:lines="1"
android:ellipsize="end"
tools:text="5616人测过"/>
<TextView
android:id="@+id/tv_coupon_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/tests_bg_corner_border_orange"
android:textColor="#FF5A4C"
tools:text="券已抵扣5元"
android:layout_toRightOf="@id/tv_price"
android:layout_marginLeft="6dp"
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:paddingRight="4dp"
android:paddingLeft="2dp"
android:textSize="10sp"
android:gravity="center"
android:layout_alignBottom="@id/tv_price"
android:visibility="gone"
tools:visibility="visible"
android:layout_marginBottom="4dp"
/>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="?android:attr/selectableItemBackground"
xmlns:tools="http://schemas.android.com/tools">
<ImageView
android:id="@+id/img_icon_in"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:scaleType="centerCrop"
android:background="@drawable/testhome_category"/>
<TextView
android:layout_gravity="center_vertical"
tools:text="杰伦布朗刚测了"
android:layout_marginLeft="6dp"
android:id="@+id/tv_name_in"
android:textColor="#999"
android:textSize="12dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_gravity="center_vertical"
tools:text="你的内心有几岁"
android:layout_marginLeft="6dp"
android:id="@+id/tv_title_in"
android:textSize="12dp"
android:textColor="#FAA05A"
android:lines="1"
android:ellipsize="end"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="?android:attr/selectableItemBackground"
xmlns:tools="http://schemas.android.com/tools">
<ImageView
android:id="@+id/img_icon_in"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:scaleType="centerCrop"
android:background="@drawable/tests_testhome_category"/>
<TextView
android:layout_gravity="center_vertical"
tools:text="杰伦布朗刚测了"
android:layout_marginLeft="6dp"
android:id="@+id/tv_name_in"
android:textColor="#999"
android:textSize="12dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_gravity="center_vertical"
tools:text="你的内心有几岁"
android:layout_marginLeft="6dp"
android:id="@+id/tv_title_in"
android:textSize="12dp"
android:textColor="#FAA05A"
android:lines="1"
android:ellipsize="end"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="?android:attr/selectableItemBackground"
xmlns:tools="http://schemas.android.com/tools">
<ImageView
android:id="@+id/img_icon_out"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:scaleType="centerCrop"
android:background="@drawable/testhome_category"/>
<TextView
android:layout_gravity="center_vertical"
tools:text="杰伦布朗刚测了"
android:layout_marginLeft="6dp"
android:id="@+id/tv_name_out"
android:textColor="#999"
android:textSize="12dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_gravity="center_vertical"
tools:text="你的内心有几岁"
android:layout_marginLeft="6dp"
android:id="@+id/tv_title_out"
android:textSize="12dp"
android:textColor="#FAA05A"
android:lines="1"
android:ellipsize="end"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="?android:attr/selectableItemBackground"
xmlns:tools="http://schemas.android.com/tools">
<ImageView
android:id="@+id/img_icon_out"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:scaleType="centerCrop"
android:background="@drawable/tests_testhome_category"/>
<TextView
android:layout_gravity="center_vertical"
tools:text="杰伦布朗刚测了"
android:layout_marginLeft="6dp"
android:id="@+id/tv_name_out"
android:textColor="#999"
android:textSize="12dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_gravity="center_vertical"
tools:text="你的内心有几岁"
android:layout_marginLeft="6dp"
android:id="@+id/tv_title_out"
android:textSize="12dp"
android:textColor="#FAA05A"
android:lines="1"
android:ellipsize="end"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView 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="5dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="70dp"
app:cardCornerRadius="6dp"
app:cardElevation="2dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/img_recom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop" />
<TextView
android:id="@+id/tv_recomTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="15dp"
android:ellipsize="end"
android:lines="1"
android:textColor="#3d3d3d"
android:textSize="15dp"
tools:text="天生好命?测你是欧洲人还是非洲人" />
<TextView
android:id="@+id/tv_recomContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="8dp"
android:ellipsize="end"
android:lines="1"
android:textColor="#666"
android:textSize="12dp"
tools:text="你是速度快放假独守空房绝对是框架的首付款涉及到开发商贷款纠纷" />
<View
android:id="@+id/v_line"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="13dp"
android:background="#F0F0F0" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="36dp">
<TextView
android:id="@+id/tv_recomPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:layout_marginTop="@dimen/platform_dp_10"
android:background="@drawable/testhome_recom_price_bg"
android:gravity="center"
android:paddingBottom="2dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="2dp"
android:textColor="#34CD65"
android:textSize="11dp"
tools:text="免费" />
<TextView
android:id="@+id/tv_coupon_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_corner_border_orange"
android:textColor="#FF5A4C"
tools:text="券已抵扣5元"
android:layout_toRightOf="@id/tv_recomPrice"
android:layout_marginLeft="6dp"
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:paddingRight="4dp"
android:paddingLeft="4dp"
android:textSize="10sp"
android:gravity="center"
android:layout_alignBottom="@id/tv_recomPrice"
android:layout_marginBottom="4dp"
android:visibility="gone"
tools:visibility="visible"
/>
<TextView
android:id="@+id/tv_recomNum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="15dp"
android:textColor="#999"
android:textSize="10dp"
tools:text="14000人测过" />
<TextView
android:id="@+id/tv_Hits"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="14dp"
android:layout_toLeftOf="@+id/tv_recomNum"
android:textColor="#999"
android:textSize="10dp"
tools:text="5616人气" />
</RelativeLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView 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="5dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="70dp"
app:cardCornerRadius="6dp"
app:cardElevation="2dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/img_recom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop" />
<TextView
android:id="@+id/tv_recomTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="15dp"
android:ellipsize="end"
android:lines="1"
android:textColor="#3d3d3d"
android:textSize="15dp"
tools:text="天生好命?测你是欧洲人还是非洲人" />
<TextView
android:id="@+id/tv_recomContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="8dp"
android:ellipsize="end"
android:lines="1"
android:textColor="#666"
android:textSize="12dp"
tools:text="你是速度快放假独守空房绝对是框架的首付款涉及到开发商贷款纠纷" />
<View
android:id="@+id/v_line"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="13dp"
android:background="#F0F0F0" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="36dp">
<TextView
android:id="@+id/tv_recomPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:layout_marginTop="@dimen/platform_dp_10"
android:background="@drawable/tests_testhome_recom_price_bg"
android:gravity="center"
android:paddingBottom="2dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="2dp"
android:textColor="#34CD65"
android:textSize="11dp"
tools:text="免费" />
<TextView
android:id="@+id/tv_coupon_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/tests_bg_corner_border_orange"
android:textColor="#FF5A4C"
tools:text="券已抵扣5元"
android:layout_toRightOf="@id/tv_recomPrice"
android:layout_marginLeft="6dp"
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:paddingRight="4dp"
android:paddingLeft="4dp"
android:textSize="10sp"
android:gravity="center"
android:layout_alignBottom="@id/tv_recomPrice"
android:layout_marginBottom="4dp"
android:visibility="gone"
tools:visibility="visible"
/>
<TextView
android:id="@+id/tv_recomNum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="15dp"
android:textColor="#999"
android:textSize="10dp"
tools:text="14000人测过" />
<TextView
android:id="@+id/tv_Hits"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="14dp"
android:layout_toLeftOf="@+id/tv_recomNum"
android:textColor="#999"
android:textSize="10dp"
tools:text="5616人气" />
</RelativeLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:layout_width="match_parent"
xmlns:tools="http://schemas.android.com/tools">
<TextView
android:id="@+id/tv_recomTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/platform_sp_16"
android:textStyle="bold"
android:layout_marginTop="20dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="191dp"
android:maxLines="2"
android:ellipsize="end"
tools:text="你的心理足够成熟么"/>
<TextView
android:id="@+id/tv_recomContent"
android:layout_below="@+id/tv_recomTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="191dp"
android:textSize="12dp"
android:ellipsize="end"
android:textColor="#666"
android:maxLines="2"
android:layout_marginTop="8dp"
android:layout_marginLeft="15dp"
tools:text="这里是副标题,这里是副标题,这里是副标题,这里是副标题"/>
<TextView
android:id="@+id/tv_recomPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="2dp"
android:paddingBottom="2dp"
android:layout_alignBottom="@+id/tv_recomNum"
android:gravity="center"
android:layout_marginTop="@dimen/platform_dp_10"
android:layout_marginLeft="15dp"
android:textSize="11dp"
android:textColor="#34CD65"
android:background="@drawable/testhome_recom_price_bg"
tools:text="免费"/>
<TextView
android:id="@+id/tv_coupon_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_corner_border_orange"
android:textColor="#FF5A4C"
tools:text="券已抵扣5元"
android:layout_toRightOf="@id/tv_recomPrice"
android:layout_marginLeft="6dp"
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:paddingRight="4dp"
android:paddingLeft="4dp"
android:textSize="10sp"
android:gravity="center"
android:layout_alignBottom="@id/tv_recomPrice"
android:layout_marginBottom="2dp"
android:visibility="gone"
tools:visibility="visible"
/>
<android.support.v7.widget.CardView
android:id="@+id/cv_recom"
android:layout_width="156dp"
android:layout_height="90dp"
android:layout_marginTop="20dp"
android:layout_marginRight="15dp"
android:layout_alignParentRight="true"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:cardElevation="0px"
app:cardCornerRadius="6dp">
<ImageView
android:id="@+id/img_recom"
android:scaleType="centerCrop"
android:layout_width="156dp"
android:layout_height="90dp"/>
</android.support.v7.widget.CardView>
<TextView
android:id="@+id/tv_recomNum"
android:layout_below="@+id/cv_recom"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:layout_width="wrap_content"
android:layout_height="23dp"
android:textSize="10dp"
android:textColor="#999"
android:gravity="bottom"
tools:text="14000人测过"/>
<TextView
android:id="@+id/tv_Hits"
android:layout_width="wrap_content"
android:layout_height="23dp"
android:gravity="bottom"
android:textSize="10dp"
android:textColor="#999"
android:layout_below="@+id/cv_recom"
android:layout_toLeftOf="@+id/tv_recomNum"
android:layout_marginRight="14dp"
tools:text="5616人气"/>
<View
android:id="@+id/s_bottom_line"
android:layout_below="@+id/tv_recomNum"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="#F0F0F0"
android:layout_marginTop="13dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp" />
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:layout_width="match_parent"
xmlns:tools="http://schemas.android.com/tools">
<TextView
android:id="@+id/tv_recomTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:textStyle="bold"
android:layout_marginTop="20dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="191dp"
android:maxLines="2"
android:ellipsize="end"
tools:text="你的心理足够成熟么"/>
<TextView
android:id="@+id/tv_recomContent"
android:layout_below="@+id/tv_recomTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="191dp"
android:textSize="12dp"
android:ellipsize="end"
android:textColor="#666"
android:maxLines="2"
android:layout_marginTop="8dp"
android:layout_marginLeft="15dp"
tools:text="这里是副标题,这里是副标题,这里是副标题,这里是副标题"/>
<TextView
android:id="@+id/tv_recomPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="2dp"
android:paddingBottom="2dp"
android:layout_alignBottom="@+id/tv_recomNum"
android:gravity="center"
android:layout_marginTop="@dimen/platform_dp_10"
android:layout_marginLeft="15dp"
android:textSize="11dp"
android:textColor="#34CD65"
android:background="@drawable/tests_testhome_recom_price_bg"
tools:text="免费"/>
<TextView
android:id="@+id/tv_coupon_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/tests_bg_corner_border_orange"
android:textColor="#FF5A4C"
tools:text="券已抵扣5元"
android:layout_toRightOf="@id/tv_recomPrice"
android:layout_marginLeft="6dp"
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:paddingRight="4dp"
android:paddingLeft="4dp"
android:textSize="10sp"
android:gravity="center"
android:layout_alignBottom="@id/tv_recomPrice"
android:layout_marginBottom="2dp"
android:visibility="gone"
tools:visibility="visible"
/>
<android.support.v7.widget.CardView
android:id="@+id/cv_recom"
android:layout_width="156dp"
android:layout_height="90dp"
android:layout_marginTop="20dp"
android:layout_marginRight="15dp"
android:layout_alignParentRight="true"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:cardElevation="0px"
app:cardCornerRadius="6dp">
<ImageView
android:id="@+id/img_recom"
android:scaleType="centerCrop"
android:layout_width="156dp"
android:layout_height="90dp"/>
</android.support.v7.widget.CardView>
<TextView
android:id="@+id/tv_recomNum"
android:layout_below="@+id/cv_recom"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:layout_width="wrap_content"
android:layout_height="23dp"
android:textSize="10dp"
android:textColor="#999"
android:gravity="bottom"
tools:text="14000人测过"/>
<TextView
android:id="@+id/tv_Hits"
android:layout_width="wrap_content"
android:layout_height="23dp"
android:gravity="bottom"
android:textSize="10dp"
android:textColor="#999"
android:layout_below="@+id/cv_recom"
android:layout_toLeftOf="@+id/tv_recomNum"
android:layout_marginRight="14dp"
tools:text="5616人气"/>
<View
android:id="@+id/s_bottom_line"
android:layout_below="@+id/tv_recomNum"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="#F0F0F0"
android:layout_marginTop="13dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp" />
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
>
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="18dp"
android:layout_marginRight="146dp"
android:ellipsize="end"
android:maxLines="1"
android:textSize="@dimen/sp_16"
android:textStyle="bold"
android:textColor="@color/platform_color_333333"
tools:text="你的心理足够成熟么你的心理足够成熟么"/>
<TextView
android:id="@+id/tvContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_title"
android:layout_marginLeft="15dp"
android:layout_marginTop="5dp"
android:layout_marginRight="146dp"
android:ellipsize="end"
android:maxLines="2"
android:textColor="#666"
android:textSize="12sp"
android:lineSpacingExtra="4dp"
android:minLines="2"
android:minHeight="24dp"
tools:text="这里是副标题,这里是副标题,这里是副标题,这里是副标题"/>
<TextView
android:id="@+id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/cv_recom"
android:layout_marginTop="@dimen/platform_dp_12"
android:layout_marginLeft="15dp"
android:background="@drawable/testhome_recom_price_bg"
android:gravity="center"
android:paddingLeft="5dp"
android:paddingTop="2dp"
android:paddingRight="5dp"
android:paddingBottom="2dp"
android:textColor="#34CD65"
android:textSize="11dp"
tools:text="免费"/>
<TextView
android:id="@+id/tv_coupon_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_corner_border_orange"
android:textColor="#FF5A4C"
tools:text="券已抵扣5元"
android:layout_toRightOf="@id/tv_price"
android:layout_marginLeft="6dp"
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:paddingRight="4dp"
android:paddingLeft="4dp"
android:textSize="10sp"
android:gravity="center"
android:layout_alignBottom="@id/tv_price"
android:layout_marginBottom="2dp"
android:visibility="gone"
tools:visibility="visible"
/>
<android.support.v7.widget.CardView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/cv_recom"
android:layout_width="115dp"
android:layout_height="68dp"
android:layout_alignParentRight="true"
android:layout_marginTop="20dp"
android:layout_marginRight="15dp"
app:cardCornerRadius="6dp"
app:cardElevation="0px">
<ImageView
android:id="@+id/ivCover"
android:layout_width="115dp"
android:layout_height="68dp"
android:scaleType="centerCrop"/>
</android.support.v7.widget.CardView>
<LinearLayout
android:layout_alignBottom="@id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/cv_recom"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:gravity="bottom"
>
<TextView
android:id="@+id/tv_hits"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="bottom"
android:textColor="#333333"
android:textSize="10sp"
android:textStyle="bold"
tools:text="16w"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="bottom"
android:textColor="#666666"
android:textSize="10sp"
android:text="人气"/>
<TextView
android:id="@+id/tv_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:gravity="bottom"
android:textColor="#333333"
android:textSize="10sp"
android:textStyle="bold"
tools:text="14000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="bottom"
android:text="人已测"
android:textColor="#666666"
android:textSize="10sp"/>
</LinearLayout>
<View
android:id="@+id/s_bottom_line"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_below="@+id/tv_price"
android:layout_marginLeft="15dp"
android:layout_marginTop="18dp"
android:layout_marginRight="15dp"
android:background="#F0F0F0"/>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
>
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="18dp"
android:layout_marginRight="146dp"
android:ellipsize="end"
android:maxLines="1"
android:textSize="@dimen/sp_16"
android:textStyle="bold"
android:textColor="@color/platform_color_333333"
tools:text="你的心理足够成熟么你的心理足够成熟么"/>
<TextView
android:id="@+id/tvContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_title"
android:layout_marginLeft="15dp"
android:layout_marginTop="5dp"
android:layout_marginRight="146dp"
android:ellipsize="end"
android:maxLines="2"
android:textColor="#666"
android:textSize="12sp"
android:lineSpacingExtra="4dp"
android:minLines="2"
android:minHeight="24dp"
tools:text="这里是副标题,这里是副标题,这里是副标题,这里是副标题"/>
<TextView
android:id="@+id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/cv_recom"
android:layout_marginTop="@dimen/platform_dp_12"
android:layout_marginLeft="15dp"
android:background="@drawable/tests_testhome_recom_price_bg"
android:gravity="center"
android:paddingLeft="5dp"
android:paddingTop="2dp"
android:paddingRight="5dp"
android:paddingBottom="2dp"
android:textColor="#34CD65"
android:textSize="11dp"
tools:text="免费"/>
<TextView
android:id="@+id/tv_coupon_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/tests_bg_corner_border_orange"
android:textColor="#FF5A4C"
tools:text="券已抵扣5元"
android:layout_toRightOf="@id/tv_price"
android:layout_marginLeft="6dp"
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:paddingRight="4dp"
android:paddingLeft="4dp"
android:textSize="10sp"
android:gravity="center"
android:layout_alignBottom="@id/tv_price"
android:layout_marginBottom="2dp"
android:visibility="gone"
tools:visibility="visible"
/>
<android.support.v7.widget.CardView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/cv_recom"
android:layout_width="115dp"
android:layout_height="68dp"
android:layout_alignParentRight="true"
android:layout_marginTop="20dp"
android:layout_marginRight="15dp"
app:cardCornerRadius="6dp"
app:cardElevation="0px">
<ImageView
android:id="@+id/ivCover"
android:layout_width="115dp"
android:layout_height="68dp"
android:scaleType="centerCrop"/>
</android.support.v7.widget.CardView>
<LinearLayout
android:layout_alignBottom="@id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/cv_recom"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:gravity="bottom"
>
<TextView
android:id="@+id/tv_hits"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="bottom"
android:textColor="#333333"
android:textSize="10sp"
android:textStyle="bold"
tools:text="16w"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="bottom"
android:textColor="#666666"
android:textSize="10sp"
android:text="人气"/>
<TextView
android:id="@+id/tv_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:gravity="bottom"
android:textColor="#333333"
android:textSize="10sp"
android:textStyle="bold"
tools:text="14000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="bottom"
android:text="人已测"
android:textColor="#666666"
android:textSize="10sp"/>
</LinearLayout>
<View
android:id="@+id/s_bottom_line"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_below="@+id/tv_price"
android:layout_marginLeft="15dp"
android:layout_marginTop="18dp"
android:layout_marginRight="15dp"
android:background="#F0F0F0"/>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center"
android:orientation="horizontal"
android:background="@color/white"
>
<ProgressBar
android:id="@+id/circle_progress"
style="?android:attr/progressBarStyleSmallTitle"
android:layout_width="20dp"
android:layout_height="20dp"
android:padding="4dp"
android:visibility="gone"
tools:visibility="visible"/>
<ImageView
android:id="@+id/iv_no_more_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="4dp"
android:src="@drawable/icon_no_more_left"
android:visibility="gone"
/>
<TextView
android:id="@+id/tv_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="加载中"
android:textSize="10sp"
android:textColor="#BFBFBF"/>
<ImageView
android:id="@+id/iv_no_more_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:src="@drawable/icon_no_more_right"
android:visibility="gone"/>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center"
android:orientation="horizontal"
android:background="@color/white"
>
<ProgressBar
android:id="@+id/circle_progress"
style="?android:attr/progressBarStyleSmallTitle"
android:layout_width="20dp"
android:layout_height="20dp"
android:padding="4dp"
android:visibility="gone"
tools:visibility="visible"/>
<ImageView
android:id="@+id/iv_no_more_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="4dp"
android:src="@drawable/tests_icon_no_more_left"
android:visibility="gone"
/>
<TextView
android:id="@+id/tv_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="加载中"
android:textSize="10sp"
android:textColor="#BFBFBF"/>
<ImageView
android:id="@+id/iv_no_more_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:src="@drawable/tests_icon_no_more_right"
android:visibility="gone"/>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="testhome_line">#F0F0F0</color>
<color name="testhome_title">#666</color>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<item name="testhome_dailytitle" type="id"/>
<item name="testhome_dailyRight" type="id"/>
<item name="testhome_recommenTitle" type="id"/>
<item name="testhome_daily" type="id"/>
<item name="testhome_ll_tips" type="id"/>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="testhome_dailychange">换一换</string>
<string name="testhome_just">刚刚</string>
<string name="testhome_test">测试了</string>
<string name="testhome_hit">人气</string>
<string name="testhome_peopletest">人测过</string>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="color_grey_888888">#888888</color>
<color name="colorDivider">#ebebeb</color>
<color name="color_black_333333">#333333</color>
<color name="color_black_ff999999">#999999</color>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="tests_color_grey_888888">#888888</color>
<color name="tests_colorDivider">#ebebeb</color>
<color name="tests_color_black_333333">#333333</color>
<color name="tests_color_black_ff999999">#999999</color>
<color name="tests_testhome_line">#F0F0F0</color>
<color name="tests_testhome_title">#666</color>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<item name="tests_testhome_dailytitle" type="id"/>
<item name="tests_testhome_dailyRight" type="id"/>
<item name="tests_testhome_recommenTitle" type="id"/>
<item name="tests_testhome_daily" type="id"/>
<item name="tests_testhome_ll_tips" type="id"/>
</resources>
\ No newline at end of file
<resources>
<string name="app_name">tests</string>
<string name="start_test">立即测试</string>
<string name="test_result">测试结果</string>
<string name="test_again">重新测试</string>
<string name="send_to_expert">专家解读</string>
<string name="test_answer">测试回答</string>
<string name="introduction">说明</string>
<string name="last_question">上一题</string>
<string name="no_test_record_hint">还没有测试记录哦</string>
<string name="recommend_test">推荐测试</string>
<string name="test_count">%d人测过</string>
<string name="questions">%d个问题</string>
<string name="wrong_args">参数异常</string>
<string name="no_search_keyword_hint">请输入关键字</string>
<string name="gson_parse_error">解析错误</string>
<string name="test_either">我也要测试</string>
<string name="dialog_loading">加载中…</string>
<string name="load_end">没有更多了</string>
<string name="loading">正在加载中…</string>
<string name="search">搜索</string>
<string name="testdetail_tips">*温馨提示:测评报告生成后不可重复测试</string>
</resources>
<resources >
<string name="tests_app_name">tests</string>
<string name="tests_start_test" >立即测试</string>
<string name="tests_test_result">测试结果</string>
<string name="tests_test_again">重新测试</string>
<string name="tests_send_to_expert">专家解读</string>
<string name="tests_test_answer">测试回答</string>
<string name="tests_introduction">说明</string>
<string name="tests_last_question">上一题</string>
<string name="tests_no_test_record_hint">还没有测试记录哦</string>
<string name="tests_recommend_test">推荐测试</string>
<string name="tests_test_count">%d人测过</string>
<string name="tests_questions">%d个问题</string>
<string name="tests_wrong_args">参数异常</string>
<string name="tests_no_search_keyword_hint">请输入关键字</string>
<string name="tests_gson_parse_error">解析错误</string>
<string name="tests_test_either">我也要测试</string>
<string name="tests_dialog_loading">加载中…</string>
<string name="tests_load_end">没有更多了</string>
<string name="tests_loading">正在加载中…</string>
<string name="tests_search">搜索</string>
<string name="tests_testdetail_tips">*温馨提示:测评报告生成后不可重复测试</string>
<string name="tests_testhome_dailychange">换一换</string>
<string name="tests_testhome_just">刚刚</string>
<string name="tests_testhome_test">测试了</string>
<string name="tests_testhome_hit">人气</string>
<string name="tests_testhome_peopletest">人测过</string>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!---->
<style name="style_price_start">
<style name="tests_style_price_start">
<item name="android:textSize">16sp</item>
<item name="android:textColor">#FF5B05</item>
<item name="android:textStyle">bold</item>
</style>
<style name="style_price_end">
<style name="tests_style_price_end">
<item name="android:textSize">10sp</item>
<item name="android:textColor">#FF5B05</item>
</style>
<style name="FilterTextViewStyle">
<style name="tests_FilterTextViewStyle">
<item name="android:layout_height">40dp</item>
<item name="android:textSize">14sp</item>
<item name="android:background">?android:attr/selectableItemBackground</item>
......
......@@ -2,6 +2,13 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
//apply plugin: 'plugin.resTools' // 资源重命名插件
//
//// 配置资源重命名插件
//resConfig {
// new_prefix = 'user_' // 资源前缀
// old_prefix = '' // 老前缀,可为''空字符串
//}
kapt {
arguments {
......@@ -36,6 +43,11 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
//前缀的名字
// resourcePrefix "user_"
//Flavor 信息
publishNonDefault true
productFlavors {
ydl {}
......@@ -46,7 +58,6 @@ android {
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
res.srcDirs = [
'src/main/res/layouts',
'src/main/res'
]
}
......
### YDL - 音乐播放器功能组件
#### AudioPlayer
| 方法名 | 介绍 | 备注 |
| --------------------------- | ---------------------------- | ------------------------------------------------------------ |
| playMode | 设置播放模式,默认为列表循环 | //列表循环 LIST_LOOP(0) <br />//随机播放 SHUFFLE(1) <br />//单曲循环 SINGLE_LOOP(2) <br />//单曲播放 SINGLE(3) |
| autoSaveProgress | 是否自动保存播放进度 | Boolean |
| addOnPlayEventListener | 添加播放监听 | 见下介绍 |
| removeOnPlayEventListener | 移除播放监听 | |
| **addPlayList** | 添加播放列表 | |
| getMusicList | 获取播放列表 | |
| **playPause** | 暂停或者播放音乐 | |
| singlePlay | 单曲模式播放音乐 | |
| addAndPlay | 添加后自动播放 | |
| play(position: Int) | 加载指定索引的音乐 | |
| delete(position: Int)<br /> | 从列表里移除播放音乐 | |
| next | 下一首 | |
| prev | 上一首 | |
| seekTo | 跳转到指定的时间位置 | @param percent 百分比<br />@param position 时间点 |
| getDuration | 获取音乐时长 | |
#### OnPlayerEventListener
| 方法名 | 介绍 | 备注 |
| ----------------- | ------------ | ------------------------------------------------------- |
| onChange | 切换歌曲 | |
| onPlayerStart | 继续播放 | |
| onPlayerPause | 暂停播放 | |
| onPublish | 更新进度 | percent : 播放百分比<br />currentPosition:当前播放位置 |
| onBufferingUpdate | 缓冲百分比 | |
| onPrepared | 准备完成 | duration:音乐时长 |
| onComplete | 单曲播放完成 | |
......@@ -344,8 +344,8 @@ class AudioPlayer private constructor() {
if (isIdle) {
return
}
pausePlayer()
musicList.clear()
mediaPlayer!!.reset()
state = STATE_IDLE
}
......@@ -422,6 +422,9 @@ class AudioPlayer private constructor() {
return musicList
}
/**
* 获取音乐时长
*/
fun getDuration(): Long{
return if (isPlaying) mediaPlayer!!.duration else 0
}
......
......@@ -39,7 +39,7 @@ interface OnPlayerEventListener {
/**
* 准备完成
*
* duration:时长
* duration:音乐时长
*/
fun onPrepared(duration:Long)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment