1.仿美团评论布局,效果图,其中引用了

compile 'com.github.ome450901:SimpleRatingBar:1.3.5'

2.listview_pingjia_item.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:background="#ffffff"android:layout_width="match_parent"android:layout_height="match_parent"><LinearLayoutandroid:padding="5dp"android:orientation="vertical"android:layout_width="match_parent"android:layout_height="wrap_content"><LinearLayoutandroid:orientation="horizontal"android:layout_width="match_parent"android:layout_height="wrap_content"><ImageViewandroid:id="@+id/iv_userpic"android:layout_width="30dp"android:layout_height="30dp"android:src="@mipmap/ic_launcher" /><LinearLayoutandroid:layout_weight="1"android:layout_marginLeft="10dp"android:orientation="vertical"android:layout_width="wrap_content"android:layout_height="30dp"><TextViewandroid:id="@+id/tv_username"android:textSize="12sp"android:gravity="center_vertical"android:text="隔壁老王"android:layout_width="wrap_content"android:layout_height="15dp" /><com.willy.ratingbar.ScaleRatingBarandroid:id="@+id/simpleRatingBar"android:layout_width="wrap_content"android:layout_height="wrap_content"app:srb_numStars="5"app:srb_rating="3"app:srb_starWidth="15dp"app:srb_starHeight="15dp"app:srb_stepSize="0.5"app:srb_isIndicator="true"app:srb_clickable="true"app:srb_scrollable="true"app:srb_clearRatingEnabled="true"app:srb_drawableEmpty="@mipmap/icon_star_gray"app:srb_drawableFilled="@mipmap/icon_star_yellow"></com.willy.ratingbar.ScaleRatingBar></LinearLayout><TextViewandroid:id="@+id/tv_pingluntime"android:textSize="12sp"android:layout_marginRight="10dp"android:text="2017.11.30"android:layout_width="wrap_content"android:layout_height="wrap_content" /></LinearLayout><TextViewandroid:id="@+id/tv_pingluncontent"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginLeft="40dp"android:layout_marginTop="10dp"android:text="此用户没有评价,72小时后默认好评。" /></LinearLayout>
</LinearLayout>

3.activity_pingjia.xml

<?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="match_parent"android:orientation="vertical"><LinearLayoutandroid:paddingLeft="10dp"android:layout_width="match_parent"android:layout_height="40dp"android:background="#ffffff"android:orientation="horizontal"><TextViewandroid:layout_marginLeft="10dp"android:id="@+id/tv_titletop"android:layout_width="wrap_content"android:layout_height="match_parent"android:layout_weight="1"android:gravity="center_vertical"android:text="动态" /></LinearLayout><ListViewandroid:divider="#ffffff"android:dividerHeight="0dp"android:id="@+id/lv_dongtai"android:layout_width="match_parent"android:layout_height="wrap_content"></ListView></LinearLayout>

4.Myadapter

package com.example.mama.testdemo;import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;/*** Created by dingkangkang on 2017/12/1.*/public class Myadapter extends BaseAdapter{Context context;public Myadapter(Context contexts){context=contexts;}@Overridepublic int getCount() {return 30;}@Overridepublic Object getItem(int position) {return null;}@Overridepublic long getItemId(int position) {return 0;}@Overridepublic View getView(int position, View convertView, ViewGroup parent) {convertView = LayoutInflater.from(context).inflate(R.layout.listview_pingjia_item,null);return convertView;}}





5.MainActivity

package com.example.mama.testdemo;import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ListView;public class MainActivity extends AppCompatActivity {private ListView lv_dongtai;private Myadapter myadapter;@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_pingjia);lv_dongtai = (ListView) findViewById(R.id.lv_dongtai);myadapter = new Myadapter(this);lv_dongtai.setAdapter(myadapter);}
}

源码



												

android仿美团评论相关推荐

  1. android 美团下拉菜单,Android仿美团分类下拉菜单实例代码

    本文实例为大家分享了Android仿美团下拉菜单的实现代码,分类进行选择,供大家参考,具体内容如下 效果图 操作平台 AS2.0 第三方框架:butterknife build.gradle depe ...

  2. [Android精品源码] Android 仿美团网,探索ListView的A-Z字母排序功能实现选择城市

    Material Design中文版Code4APPPHP100UI4APP 开启辅助访问设为首页收藏本站快捷导航切换到宽版切换风格 石刚 | |我的 |签到打卡 |设置 |消息 |提醒(2) |退出 ...

  3. Android 仿美团网,探索使用ViewPager+GridView实现左右滑动查看更多分类的功能

    不记得什么时候,我留意到到美团网首页有使用ViewPager+GridView实现左右滑动查看更多分类的一个功能,感觉它很有趣,于是想着自己动手也实现这样一个功能,和往常一样,主要是想总结一下我在学习 ...

  4. Android 仿美团选择城市、微信通讯录、饿了么点餐列表的导航悬停分组索引列表

    SuspensionIndexBar 项目地址:mcxtzhang/SuspensionIndexBar 简介:快速实现分组悬停.右侧索引导航联动 列表. 如 美团选择城市界面,微信通讯录界面.饿了么 ...

  5. android仿美团论文,毕业设计(论文)-基于Android的仿美团系统.docx

    全套设计加扣 3012250582 PAGE \* MERGEFORMAT- 1 - 全套设计加扣 3012250582 湖南软件职业学院 毕业设计 毕业选题 : 基于Android的仿美团系统 指导 ...

  6. Android仿美团外卖点菜联动列表

    Android高仿美团外卖点菜联动列表效果 最近项目中有一个添加购物车的需求,需要做成美团外卖点菜联动ListView的效果,可能有的朋友觉得这很简单,不就是2个Listview点击事件联动处理机制吗 ...

  7. android 仿微博评论编辑框_Android 仿微博的点赞功能的实现原理(持续点赞再取消)...

    产品需求,实现类似微博的持续点赞再取消功能,因为自己也偶尔刷微博,对这功能有一定的使用上的了解, 至于微博点赞的具体实现我并不知道,微博点赞在断网的情况下依然能点赞,不会提示网络异常,等有网络之后 重 ...

  8. Android仿美团切换城市

    转载请注明出处:http://blog.csdn.net/dmk877/article/details/49757731 最近一直关注一些比较有名的app,像美团.58.赶集网.淘宝等等.主要目的就是 ...

  9. Android仿美团加载数据、小人奔跑进度动画对话框(附顺丰快递员奔跑效果)

    我们都知道在Android中,常见的动画模式有两种:一种是帧动画(Frame Animation),一种是补间动画(Tween Animation).帧动画是提供了一种逐帧播放图片的动画方式,播放事先 ...

最新文章

  1. 字节跳动获CVPR2021 细粒度图像竞赛双料冠军
  2. JavaScript onerror事件
  3. glide 下载golang.org包问题
  4. mysql 服务无法启动 没有报告任何错误_My SQL学习之路(一)
  5. flac格式转换mp3格式_MP3,FLAC和其他音频格式之间有什么区别?
  6. 计算机存储数字,计算机是如何存储数字的
  7. 网络操作系统 第四章 磁盘管理
  8. java如何读取文本,Java:如何读取文本文件
  9. MySql Odbc等驱动下载地址分享下
  10. java程序设计颜志军_信息管理系统设计方案.doc
  11. 用美图秀秀换证件照背景颜色
  12. 卸载不了mysql2008_你还在为无法完美卸载SQL Server 2008 R2而烦恼吗?
  13. 双碳目标下综合能源系统低碳运行优化调度Matlab程序
  14. 火柴棍能组成的最大数字
  15. Linkerd实战(2)示例详解
  16. 淘宝/天猫API:item_search_coupon-优惠券查询
  17. Redis 如何做内存优化?
  18. php 实现保留两位小数
  19. 关于LINUX系统netterm终端登陆乱码问题。
  20. springboot实现高并发红包系统(java 全网最全包括语音口令 文字口令 普通 拼手气)

热门文章

  1. 信用评分模型中的滚动率分析
  2. 大数据智能营销系统的作用
  3. 关于固态硬盘闪存芯片研究资料收集
  4. 如何查看自己电脑显卡对应的cuda版本
  5. CentOS 7安装并启动Google浏览器
  6. 转换xml格式的短信记录
  7. python爬取公众号历史文章
  8. 嵌入式设备和固件中的自动漏洞检测(二):动态分析与符号执行技术
  9. 学生证选课系统c语言大作业,学生选课管理系统c语言程序
  10. keep-alive 是什么?