Commit 439ce884 authored by 王雪伟's avatar 王雪伟

[提交人]:王雪伟

[提交简述] :小象省钱
[实现方案] :
parent ddb653e1
......@@ -54,11 +54,15 @@
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
<activity android:name=".activity.MainActivity">
<activity
android:name=".activity.MainActivity"
android:launchMode="singleTop">
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="main"
android:scheme="xxsq" />
</intent-filter>
</activity>
......@@ -87,16 +91,16 @@
android:authorities="${applicationId}.TTMultiProvider"
android:exported="false" />
<!-- <uses-library-->
<!-- android:name="org.apache.http.legacy"-->
<!-- android:required="false" />-->
<!-- <uses-library-->
<!-- android:name="org.apache.http.legacy"-->
<!-- android:required="false" />-->
<!-- <meta-data-->
<!-- android:name="design_width_in_dp"-->
<!-- android:value="420"/>-->
<!-- <meta-data-->
<!-- android:name="design_height_in_dp"-->
<!-- android:value="740"/>-->
<!-- <meta-data-->
<!-- android:name="design_width_in_dp"-->
<!-- android:value="420"/>-->
<!-- <meta-data-->
<!-- android:name="design_height_in_dp"-->
<!-- android:value="740"/>-->
</application>
......
......@@ -27,10 +27,12 @@ import com.zxhl.cms.net.callback.BaseObserver;
import com.zxhl.cms.net.model.uc.UserInfo;
import com.zxhl.cms.utils.AdDataSupport;
import com.zxhl.cms.utils.EventUtils;
import com.zxhl.cms.utils.JumpUtils;
import com.zxhl.cms.utils.RxBus;
import com.zxhl.cms.utils.UserDataUtils;
import com.zxhl.cms.utils.Utils;
import com.zxhl.cms.widget.LoadingDialog;
import java.util.ArrayList;
import java.util.List;
......@@ -84,7 +86,7 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
mRestartLoginObservable.observeOn(AndroidSchedulers.mainThread()).subscribe(new Consumer<String>() {
@Override
public void accept(String s) throws Exception {
//deviceLogin();
JumpUtils.loginJump();
}
}, new Consumer<Throwable>() {
@Override
......@@ -150,12 +152,12 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
@Override
public void onNavigationClick(int vId) {
if (vId == com.zxbw.modulemain.R.id.id_activity_member_user) {
switchFragment(1);
EventUtils.INSTANCE.onEvent("tab_imp", "user");
} else if (vId == com.zxbw.modulemain.R.id.id_view_navigation_bottom_box) {
if (vId == com.zxbw.modulemain.R.id.id_view_navigation_bottom_box) {
switchFragment(0);
EventUtils.INSTANCE.onEvent("tab_imp", "home");
} else if (vId == com.zxbw.modulemain.R.id.id_view_navigation_bottom_user) {
switchFragment(1);
EventUtils.INSTANCE.onEvent("tab_imp", "user");
}
}
......
......@@ -35,15 +35,10 @@ public abstract class BaseObserver<T> implements Observer<Response<T>> {
}
} else if (TextUtils.equals(result.getStatus(), "101")) {
String token = SettingPreference.getUserToken();
if (!TextUtils.isEmpty(token)) {
SettingPreference.saveToken("");
SettingPreference.saveUserInfo(null);
RxBus.get().post(Constant.REFRESH_LOGIN_STATS,1);
// Intent intent = Constant.Param.isLocal ? RounterBus.getRounter(RounterApi.class).getIntentActivityLocalLogin() : RounterBus.getRounter(RounterApi.class).getIntentActivityLogin();
// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// AppContext.get().startActivity(intent);
Utils.showToast(AppContext.get(), "登录失效,请重新登录");
}
SettingPreference.saveToken("");
SettingPreference.saveUserInfo(null);
RxBus.get().post(Constant.REFRESH_LOGIN_STATS,1);
Utils.showToast(AppContext.get(), "登录失效,请重新登录");
} else if (TextUtils.equals(result.getStatus(), "160")) {
RxBus.get().post(Constant.UPDATEDEFILE, true);
// Utils.showToast(Appli.getContext(), "请重试");
......
package com.zxbw.modulemain.adapter
import android.app.Activity
import android.content.Context
import android.text.TextUtils
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.RelativeLayout
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
import com.zxbw.modulemain.R
import com.zxhl.cms.AppContext
import com.zxhl.cms.common.base.BaseRecyclerAdapter
import com.zxhl.cms.net.model.box.AddressEntity
import com.zxhl.cms.net.model.box.LotteryEntity
import com.zxhl.cms.utils.OnRecycleItemClickListener
import com.zxhl.cms.widget.RecycleImageView
class GoodsListAdapter : BaseRecyclerAdapter<Any, GoodsListAdapter.ViewHolder> {
private var mContext: Activity? = null
private val listener: OnRecycleItemClickListener<Any>
constructor(
content: Activity?,
listener: OnRecycleItemClickListener<Any>
) : super() {
mContext = content
this.listener = listener
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
holder.id_rl_goods_item_view?.setOnClickListener {
listener.onItemClick(it, position, null)
}
}
override fun getItemCount(): Int {
return 23
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
return ViewHolder(
LayoutInflater.from(AppContext.get())
.inflate(R.layout.item_layout_goods_view, parent, false)
)
}
class ViewHolder : RecyclerView.ViewHolder {
var id_rl_goods_item_view: RelativeLayout?
var id_item_goods_img: RecycleImageView?
var id_tv_goods_name: TextView?
var id_tv_yhq_value: TextView?
var id_tv_manjian_value: TextView?
var id_tv_tb_price_value: TextView?
var id_tv_goods_price: TextView?
constructor(
itemView: View
) : super(itemView) {
id_rl_goods_item_view =
itemView.findViewById<RelativeLayout>(R.id.id_rl_goods_item_view)
id_item_goods_img = itemView.findViewById<RecycleImageView>(R.id.id_item_goods_img)
id_tv_goods_name = itemView.findViewById<TextView>(R.id.id_tv_goods_name)
id_tv_yhq_value = itemView.findViewById<TextView>(R.id.id_tv_yhq_value)
id_tv_manjian_value = itemView.findViewById<TextView>(R.id.id_tv_manjian_value)
id_tv_tb_price_value = itemView.findViewById<TextView>(R.id.id_tv_tb_price_value)
id_tv_goods_price = itemView.findViewById<TextView>(R.id.id_tv_goods_price)
}
}
}
\ No newline at end of file
package com.zxbw.modulemain.adapter
import android.app.Activity
import android.content.Context
import android.text.TextUtils
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
import com.zxbw.modulemain.R
import com.zxhl.cms.AppContext
import com.zxhl.cms.common.base.BaseRecyclerAdapter
import com.zxhl.cms.net.model.box.AddressEntity
import com.zxhl.cms.net.model.box.LotteryEntity
import com.zxhl.cms.utils.OnRecycleItemClickListener
import com.zxhl.cms.widget.RecycleImageView
class JgqQyAdapter : BaseRecyclerAdapter<Any, JgqQyAdapter.ViewHolder> {
private var mContext: Activity? = null
private val listener: OnRecycleItemClickListener<Any>
constructor(
content: Activity?,
listener: OnRecycleItemClickListener<Any>
) : super() {
mContext = content
this.listener = listener
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
Glide.with(mContext!!).load("https://t10.baidu.com/it/u=3105518379,1723849651&fm=58").into(holder?.id_icon!!)
holder.id_name?.text = "爱奇艺"
holder.id_ll_qy_item_view?.setOnClickListener {
listener.onItemClick(it, position, null)
}
}
override fun getItemCount(): Int {
return 23
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
return ViewHolder(
LayoutInflater.from(AppContext.get())
.inflate(R.layout.item_layout_jgq_qy_view, parent, false)
)
}
class ViewHolder : RecyclerView.ViewHolder {
var id_ll_qy_item_view: LinearLayout?
var id_icon: ImageView?
var id_name: TextView?
constructor(
itemView: View
) : super(itemView) {
id_ll_qy_item_view = itemView.findViewById<LinearLayout>(R.id.id_ll_qy_item_view)
id_icon =
itemView.findViewById<ImageView>(R.id.id_img_qy_icon)
id_name =
itemView.findViewById<TextView>(R.id.id_img_qy_name)
}
}
}
\ No newline at end of file
package com.zxbw.modulemain.contract
/**
* Created by gaoleichao on 2018/6/20.
*/
class HomeRecommendContract {
interface View {
fun setQyCardList()
}
interface Presenter {
fun getQyCardList()
}
}
\ No newline at end of file
......@@ -10,6 +10,7 @@ import com.zxhl.cms.net.RxSchedulers
import com.zxhl.cms.net.callback.BaseObserver
import com.zxhl.cms.net.model.box.TabEntity
import kotlinx.android.synthetic.main.fragment_layout_home.*
import me.jessyan.autosize.utils.ScreenUtils
/**
......@@ -31,7 +32,15 @@ class HomeFragment : BaseFragment() {
}
override fun init(view: View?) {
var statusBarHeight = ScreenUtils.getStatusBarHeight()
if (statusBarHeight<=0){
statusBarHeight = 40;
}
id_title_sys_bar_view.layoutParams.height = statusBarHeight
getTabList()
id_rl_search_view.setOnClickListener {
showToast("搜索")
}
}
companion object {
......@@ -43,35 +52,39 @@ class HomeFragment : BaseFragment() {
ApiClient.homeApi.getBoxTab().compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<List<TabEntity>>() {
override fun onSuccess(result: List<TabEntity>?) {
if (result != null) {
initViewPager(result)
}
// if (result != null) {
// initViewPager(result)
// }
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
Log.e("wxw", "ERROR" + code + errorMsg)
val createTitles = ArrayList<TabEntity>().apply {
add(TabEntity())
add(TabEntity())
add(TabEntity())
add(TabEntity())
add(TabEntity())
}
initViewPager(createTitles)
}
})
val createTitles = ArrayList<TabEntity>().apply {
add(TabEntity())
add(TabEntity())
add(TabEntity())
add(TabEntity())
add(TabEntity())
add(TabEntity())
add(TabEntity())
add(TabEntity())
}
initViewPager(createTitles)
}
private fun initViewPager(result: List<TabEntity>) {
Log.d("wxw", "result" +result.size)
private fun initViewPager(result: List<TabEntity>) {
Log.d("wxw", "result" + result.size)
val adapter = FragmentAdapter(childFragmentManager)
for (i in 0 until (result?.size ?: 0)) {
val title = result[i].name ?: ""
adapter.addFrag(RecommendFragment.newInstance(title), title)
}
for (i in 0 until (result?.size ?: 0)) {
val title = result[i].name ?: ""
adapter.addFrag(RecommendFragment.newInstance(title), title)
}
viewPager?.adapter = adapter
id_fragment_home_tab?.setViewPager(viewPager)
id_fragment_home_tab?.overScrollMode = View.OVER_SCROLL_NEVER
id_fragment_home_tab?.overScrollMode = View.OVER_SCROLL_NEVER
}
......
package com.zxbw.modulemain.fragment
import android.view.View
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import com.zxbw.modulemain.R
import com.zxbw.modulemain.adapter.GoodsListAdapter
import com.zxbw.modulemain.adapter.JgqQyAdapter
import com.zxbw.modulemain.contract.HomeRecommendContract
import com.zxbw.modulemain.presenter.HomeRecommendPresenter
import com.zxhl.cms.common.base.BaseFragment
import com.zxhl.cms.utils.OnRecycleItemClickListener
import kotlinx.android.synthetic.main.fragment_layout_recommend.*
/**
* @author (wangXuewei)
* @datetime 2022-05-20 19:01 GMT+8
* @detail : 首页推荐
*/
class RecommendFragment : BaseFragment {
class RecommendFragment : BaseFragment, HomeRecommendContract.View {
private val title: String
private var mPresenter: HomeRecommendPresenter? = null
private var mJgqQyAdapter: JgqQyAdapter? = null;
private var mGoodsAdapter: GoodsListAdapter? = null;
override fun layoutID(): Int {
return R.layout.fragment_layout_recommend
}
override fun init(view: View?) {
mPresenter = HomeRecommendPresenter(this)
mJgqQyAdapter = JgqQyAdapter(activity,
OnRecycleItemClickListener<Any> { view, position, data ->
showToast("postion" + position)
})
mGoodsAdapter = GoodsListAdapter(activity,
OnRecycleItemClickListener<Any> { view, position, data ->
showToast("postion" + position)
})
//金刚区
val gridLayoutManager = GridLayoutManager(activity, 3)
gridLayoutManager.orientation = LinearLayoutManager.HORIZONTAL
id_rcl_jgq_qy_list?.layoutManager = gridLayoutManager
id_rcl_jgq_qy_list.adapter = mJgqQyAdapter
//底部商品列表
id_rcl_goods_list?.layoutManager = LinearLayoutManager(activity)
id_rcl_goods_list.adapter = mGoodsAdapter
mPresenter?.getQyCardList()
}
companion object {
......@@ -35,4 +67,8 @@ class RecommendFragment : BaseFragment {
this.title = ""
}
override fun setQyCardList() {
}
}
\ No newline at end of file
package com.zxbw.modulemain.presenter
import android.content.Context
import android.text.TextUtils
import android.util.Log
import com.zxbw.modulemain.contract.HomeRecommendContract
import com.zxbw.modulemain.contract.LoginContract
import com.zxhl.cms.net.ApiClient
import com.zxhl.cms.net.RxSchedulers
import com.zxhl.cms.net.SettingPreference
import com.zxhl.cms.net.callback.BaseObserver
import com.zxhl.cms.net.model.uc.UserInfo
import com.zxhl.cms.utils.EventUtils
import com.zxhl.cms.utils.UserDataUtils
/**
* Created by gaoleichao on 2018/6/20.
*/
class HomeRecommendPresenter:HomeRecommendContract.Presenter {
private val mView: HomeRecommendContract.View
constructor(mView: HomeRecommendContract.View) {
this.mView = mView
}
override fun getQyCardList() {
ApiClient.homeApi.getQyJgqCardList().compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<List<Any>>() {
override fun onSuccess(result: List<Any>?) {
mView.setQyCardList()
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
}
})
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#D52A03" />
<corners android:radius="5dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#EB3625" />
<corners android:radius="15dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FCC27D" />
<corners android:radius="5dp" />
</shape>
\ No newline at end of file
......@@ -2,10 +2,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffffffff" />
<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
<corners android:radius="10dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffffffff" />
<corners android:radius="20dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffffffff" />
<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>
\ No newline at end of file
......@@ -63,7 +63,7 @@
android:layout_height="match_parent"
android:layout_below="@+id/id_bg_top"
android:layout_marginTop="-16dp"
android:background="@drawable/shape_ffffff_r10"
android:background="@drawable/shape_ffffff_r20_half"
android:visibility="visible">
<TextView
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tl="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F6F6F6">
<com.flyco.tablayout.SlidingTabLayout
android:id="@+id/id_fragment_home_tab"
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar_layout"
android:layout_width="match_parent"
android:layout_height="48dp"
android:paddingLeft="5dp"
android:background=""
android:paddingRight="5dp"
tl:tl_textSelectColor="@color/white"
tl:tl_indicator_color="@color/white"
tl:tl_indicator_corner_radius="5dp"
tl:tl_indicator_margin_left="2dp"
tl:tl_indicator_margin_right="2dp"
tl:tl_indicator_style="NORMAL" />
android:layout_height="wrap_content"
android:background="@color/transparent"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
tl:elevation="0dp">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/toolbar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ED2E28"
tl:contentScrim="#ED2E28"
tl:layout_scrollFlags="scroll|exitUntilCollapsed"
tl:titleEnabled="false">
<ImageView
android:id="@+id/id_img_banner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="@drawable/img_banner_ms_bg" />
<androidx.appcompat.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="0dp"
tl:contentInsetEnd="0dp"
tl:contentInsetStart="0dp"
tl:layout_collapseMode="pin">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<View
android:id="@+id/id_title_sys_bar_view"
android:layout_width="match_parent"
android:layout_height="40dp" />
<RelativeLayout
android:id="@+id/id_rl_search_view"
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_below="@+id/id_title_sys_bar_view"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:background="@drawable/shape_ffffff_r20">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:drawableLeft="@drawable/icon_search"
android:drawablePadding="4dp"
android:text="搜索商品"
android:textColor="@color/color_000000"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_margin="3dp"
android:background="@drawable/shape_eb3625_r15"
android:gravity="center"
android:paddingLeft="14dp"
android:paddingRight="14dp"
android:text="搜索"
android:textColor="@color/white"
android:textSize="14sp" />
</RelativeLayout>
<com.flyco.tablayout.SlidingTabLayout
android:id="@+id/id_fragment_home_tab"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_below="@+id/id_rl_search_view"
android:layout_marginTop="17dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
tl:tl_indicator_color="@color/white"
tl:tl_indicator_corner_radius="1dp"
tl:tl_indicator_height="2dp"
tl:tl_indicator_style="NORMAL"
tl:tl_indicator_width="14dp"
tl:tl_tab_padding="5dp"
tl:tl_tab_space_equal="true"
tl:tl_textBold="SELECT"
tl:tl_textSelectColor="@color/white"
tl:tl_textUnselectColor="#FCFFFFFF"
tl:tl_textsize="14sp" />
</RelativeLayout>
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.viewpager.widget.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/id_fragment_home_tab" />
tl:layout_behavior="@string/appbar_scrolling_view_behavior" />
</RelativeLayout>
\ No newline at end of file
</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
......@@ -3,14 +3,35 @@
xmlns:tl="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F6F6F6">
android:background="#F8F8F8">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="ssssssssssssss" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/id_rcl_jgq_qy_list"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/id_rcl_goods_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</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:id="@+id/id_rl_goods_item_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginBottom="10dp"
android:background="@drawable/shape_ffffff_r10"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:padding="10dp">
<com.zxhl.cms.widget.RecycleImageView
android:id="@+id/id_item_goods_img"
android:layout_width="124dp"
android:layout_height="118dp"
android:layout_gravity="center"
android:layout_marginEnd="10dp"
android:adjustViewBounds="true" />
<TextView
android:id="@+id/id_tv_goods_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toEndOf="@id/id_item_goods_img"
android:ellipsize="end"
android:maxLines="2"
android:text="商品名称商品名称品名称商品名称商品名称品名称商"
android:textColor="@color/color_333333"
android:textSize="14dp"
android:textStyle="bold" />
<TextView
android:id="@+id/id_tv_yhq_value"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_below="@id/id_tv_goods_name"
android:layout_marginTop="8dp"
android:layout_marginRight="8dp"
android:layout_toEndOf="@id/id_item_goods_img"
android:background="@drawable/shape_d52a03_r5"
android:gravity="center"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:text="1元券"
android:textColor="@color/white"
android:textSize="10sp" />
<TextView
android:id="@+id/id_tv_manjian_value"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_below="@id/id_tv_goods_name"
android:layout_marginTop="8dp"
android:layout_toEndOf="@id/id_tv_yhq_value"
android:background="@drawable/shape_fcc27d_r5"
android:gravity="center"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:text="1元券"
android:textColor="@color/white"
android:textSize="10sp" />
<TextView
android:id="@+id/id_tv_tb_price_value"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_below="@id/id_tv_goods_name"
android:layout_marginTop="34dp"
android:layout_toEndOf="@id/id_item_goods_img"
android:gravity="center"
android:text="淘宝商城价 : ¥20"
android:textColor="@color/color_999999"
android:textSize="12sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/id_tv_tb_price_value"
android:layout_marginTop="6dp"
android:layout_toEndOf="@id/id_item_goods_img"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="4dp"
android:text="¥"
android:textColor="#D81D00"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/id_tv_goods_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="8dp"
android:text="0"
android:textColor="#D81D00"
android:textSize="20sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/img_vip_price_bg"
android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/icon_vip_price"
android:drawablePadding="3dp"
android:text="会员到手价"
android:textColor="#F8E8CC"
android:textSize="10sp" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/id_ll_qy_item_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="10dp"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:id="@+id/id_img_qy_icon"
android:layout_width="40dp"
android:layout_height="40dp" />
<TextView
android:id="@+id/id_img_qy_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text=""
android:textColor="@color/color_333333"
android:textSize="14sp" />
</LinearLayout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment