Code Monkey home page Code Monkey logo

weibolayout's Introduction

WeiBoLayout

仿微博、微信QQ,包含展示动态(Feed)图片,不同数量不同布局的GridView和识别包含超链接、#字话题、@人的文本效果。

###WeiBoLayout中的FeedGridView是根据显示子View的个数,使其填充满屏幕宽度的View,WeiBoLayout可识别文本中的超链接、#字话题、@人,适用于社交软件Feed的展示。

FeedGridView XML:

<com.zheblog.weibogridview.view.FeedGridView
        android:id="@+id/gv_photo"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/zhe_dp10"
        android:horizontalSpacing="@dimen/zhe_dp10"
        android:listSelector="@color/zhe_transparent"
        android:scrollbars="none"
        android:stretchMode="none"
        android:verticalSpacing="@dimen/zhe_dp10" />

FeedGridView 使用代码:

gvPhoto.setPhotoAdapter(item.getPhotoModels());

动态效果图:

FeedGridView

识别文本中的超链接、#字话题、@人的文本

tvContent.setText(TimeLineUtility.convertNormalStringToSpannableString(item.getContent(), TimeLineUtility.TimeLineStatus.FEED));
tvContent.setOnTouchListener(new ClickableTextViewMentionLinkOnTouchListener());
//LINK单一识别超链接
//FEED识别超链接、#字话题、@人
public enum TimeLineStatus {
        LINK, FEED
    }

动态效果图:

识别文本

###GitHub代码下载

###最后

如果对您有帮助请Star,有问题随时联系我,谢谢.

###关于我 QQ交流群: 496946393

邮箱: [email protected]

简书

个人博客

weibolayout's People

Contributors

zhe525069676 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.