仿拉手团购App1--首页
2017-05-15 23:34
239 查看
![](https://images2015.cnblogs.com/blog/1044471/201705/1044471-20170515220507447-279436808.png)
一 fragment_home.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <include android:id="@+id/home_titlebar" layout="@layout/home_title_bar"/> <com.handmark.pulltorefresh.library.PullToRefreshListView android:id="@+id/home_pull_to_refresh_listView" android:layout_width="match_parent" android:layout_height="match_parent"/> </LinearLayout>
二 home_head_page.xml
<?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" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/head_page_paddingTB"> <include android:id="@+id/home_head_include_banner" layout="@layout/home_banner"/> <RelativeLayout android:layout_width="match_parent" android:layout_height="168dp"> <android.support.v4.view.ViewPager android:id="@+id/home_head_pager" android:layout_width="match_parent" android:layout_height="match_parent"> </android.support.v4.view.ViewPager> <com.myxh.coolshopping.ui.widget.Indicator android:id="@+id/home_head_indicator" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" app:indicator_number="2" app:indicator_radius="8" app:indicator_foreColor="@color/app_yellow" app:indicator_bgColor="@color/bg_common_gray"/> </RelativeLayout> <include android:id="@+id/home_head_include_film" layout="@layout/home_film" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/head_page_paddingTB"/> </LinearLayout>
banner 两页Bar标志 热门电影三个作为一体addHeaderView(headView) 进RefreshListView
三 GoodsListAdapter:
![](https://images2015.cnblogs.com/blog/1044471/201705/1044471-20170515231751744-1392109575.png)
mGoodsListAdapter = new GoodsListAdapter(getActivity(),mGoodlist,headerViewsCount); mRefreshListView.setAdapter(mGoodsListAdapter);
1.SimpleDraweeView实现圆角图片
2.免预约图片的显示
![](https://images2015.cnblogs.com/blog/1044471/201705/1044471-20170515231522291-1101312812.png)
<FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true"> <com.facebook.drawee.view.SimpleDraweeView android:id="@+id/good_photo" android:layout_width="@dimen/good_image_width" android:layout_height="@dimen/good_image_height" android:layerType="software" android:scaleType="centerCrop" fresco:placeholderImage="@mipmap/default_list_pic"/> <ImageView android:id="@+id/good_icon" android:layout_width="@dimen/good_image_width" android:layout_height="@dimen/good_image_height" android:layerType="software" android:scaleType="centerCrop" android:src="@mipmap/pic_b"/> <ImageView android:id="@+id/good_appointment_img" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layerType="software" android:scaleType="centerCrop" android:src="@mipmap/appointment_img"/> </FrameLayout>
Adapter中控制是否显示
if (mGoodlist.get(i).getIs_appointment() == 1) { holder.goodAppointmentImg.setVisibility(View.VISIBLE); } else { holder.goodAppointmentImg.setVisibility(View.GONE); }
3.原有价格添加删除线
holder.goodValue = (TextView) convertView.findViewById(R.id.good_tv_value); holder.goodValue.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG);//添加删除线
github地址:https://github.com/ganchuanpu/CoolShopping
相关文章推荐
- 仿拉手团购App8-- 更多模块
- 仿拉手团购App9-- 产品详情界面
- 仿拉手团购App4--我的模块
- 仿拉手团购App10-- 我的收藏界面
- 仿拉手团购App5--登录界面
- 仿拉手团购App3--周边模块
- 仿拉手团购App5--登录界面2
- 仿拉手团购App7--个人中心界面
- Mockplus教程:分分钟搞定APP首页原型设计
- Android 仿百合网超火爆社交app首页滑动效果
- 带你实现开发者头条APP(三) 首页实现
- 团购app
- APP首次启动:图片轮播3秒后进入首页或点击按钮进入首页(这里用的banner轮播)
- 如何由新特性跳转到App首页
- Android 仿百合网超火爆社交app首页滑动效果
- 如何设计电商APP首页
- Android手把手实战APP首页 下拉刷新 自动加载
- Android自定义控件----RadioGroup实现APP首页底部Tab的切换
- Android APP常见首页效果的实现