登录 立即注册
安币:

EasyLikeArea仿Qzone点赞

来自: MrlLee 分类: Android精品源码 上传时间: 2016-4-15 14:08:26
Tag:EasyLikeArea 仿Qzone 点赞

项目介绍:

Permalink
Failed to load latest commit information.
app v1.4
easylikearea v1.4
gradle/wrapper v1.4
.gitignore Update .gitignore
LICENSE Initial commit
README.md Update md
build.gradle v1.4
gradle.properties Initialize project
gradlew Initialize project
gradlew.bat Initialize project
settings.gradle Easy implementation

EasyLikeArea


仿Qzoen点赞的圈圈!




Introduction



EasyViewProxy高速缓存管理器。view默认缓存的数量为17。
建议:使用滑翔渲染图像,然后加入到EaseLikeArea。

Gradle



dependencies {
compile 'com.camnter.easylikearea:easylikearea:1.4'
}


Attributes



<declare-styleable name="EasyCountDownTextureView">
<attr name="easyLikeAreaLikeSpacing" format="dimension" />
<attr name="easyLikeAreaOmitSpacing" format="dimension" />
<attr name="easyLikeAreaOmitCenter" format="boolean" />
declare-styleable>


Easy to use



More details, we can see the demo.



<com.camnter.easylikearea.EasyLikeArea
android:id="@+id/topic_ela"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/topic_content_bottom_v"
android:background="@color/white"
android:paddingBottom="10dp"
android:paddingLeft="12.5dp"
app:easyLikeAreaOmitCenter="true"
app:easyLikeAreaLikeSpacing="5dp"
app:easyLikeAreaOmitSpacing="8dp"
android:paddingRight="12.5dp"
android:paddingTop="10dp"/>


Attention: You must addView(...) after EasyLikeArea.setOmitView(View view) .



private void initLikeArea() {
this.setOmitView(Constant.AVATARS.length);
for (int idRes : Constant.AVATARS) {
EasyLikeImageView iv = this.createEasyLikeImageView();
GlideUtils.displayNative(iv, idRes);
this.topicEla.addView(iv);
}
}


public void setOmitView(int count) {
View omitView = LayoutInflater.from(this).inflate(R.layout.view_omit_style_topic, null);
this.omitTv = (TextView) omitView.findViewById(R.id.topic_omit_tv);
this.omitTv.setText(this.getString(this.getOmitVieStringFormatId(), count));
this.topicEla.setOmitView(omitView);
}


And you can use the EasyLikeImageView



private EasyLikeImageView createEasyLikeImageView() {
EasyLikeImageView iv = new EasyLikeImageView(this);
iv.setLayoutParams(new ViewGroup.LayoutParams(this.dp2px(36), this.dp2px(36)));
return iv;
}


EasyLikeImageView Attributes



<declare-styleable name="EasyLikeImageView">
<attr name="easyLikeImageType">
<enum name="round" value="2601" />
<enum name="circle" value="2602" />
attr>
<attr name="easyLikeImageBorderRadius" format="dimension" />
declare-styleable>


ScreenShot

















Scene Qzone Style


Compare resolution















Resolution 480x800 720x1280




相关源码推荐:

我来说两句
*滑动验证:
所有评论(3)
Android2号 2016-4-15 15:58:05
楼主威武啊,安卓巴士有你更给力!
回复
灵魂深处 2016-4-17 08:31:36
学习学习!
回复
gumi 2016-4-18 09:19:16
https://github.com/CaMnter/EasyLikeArea
感谢分享,安卓巴士有你更精彩:)
回复
ljh_ 2016-4-20 15:52:32
淡定,淡定,淡定……
回复
王伟desire 2016-4-20 17:05:39
虽不明,但觉厉!
回复
阳光部落 2016-4-23 11:36:30
很给力,安卓巴士有你更精彩!
回复
兜里有块糖 2016-4-25 21:35:06
精华内容,楼主V5!
回复
提取码:  下载次数:7 状态:已购或VIP 售价:10(原价:10)金钱 下载权限:限制会员 
227 0 7
代码贡献英雄榜
用户名 下载数

联系我们
关闭
合作电话:
13802416937
Email:
[email protected]
商务市场合作/投稿
问题反馈及帮助
联系我们

广告投放| Github|申请友链|手机版|站点统计|安卓巴士 ( 粤ICP备15117877号 )  

快速回复 返回顶部 返回列表