項(xiàng)目地址:https://github.com/razerdp/FriendCircle
一起擼個(gè)朋友圈吧這是本文所處文集,所有更新都會(huì)在這個(gè)文集里面哦,歡迎關(guān)注
上篇鏈接:http://www.itdecent.cn/p/3d0cc6882e1a
下篇鏈接:http://www.itdecent.cn/p/15a9fe8f917f
這篇非常簡(jiǎn)單,頁(yè)面分享時(shí)也就兩個(gè)控件,一個(gè)imageView,一個(gè)textview,分別對(duì)應(yīng)網(wǎng)頁(yè)的縮略圖和標(biāo)題。
我們的content布局如下:
<RelativeLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="74dp"
android:layout_marginRight="@dimen/item_padding"
android:padding="8dp"
android:background="#f1f1f1">
<razerdp.friendcircle.widget.SuperImageView
android:id="@+id/web_thumb"
android:layout_width="45dp"
android:layout_height="45dp"
android:scaleType="centerCrop"
tools:src="@drawable/test_avatar"/>
<TextView
android:id="@+id/web_title"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_toRightOf="@id/web_thumb"
android:layout_marginLeft="5dp"
android:gravity="left|center_vertical"
android:textColor="@color/normal_font_color"
android:textSize="@dimen/normal_font"
android:maxLines="2"
android:ellipsize="end"
tools:text="啦啦啦啦啦啦~啦啦啦啦啦啦~啦啦啦啦啦啦~"/>
</RelativeLayout>
預(yù)覽效果如下:

預(yù)覽圖
在代碼中,我們做的,僅僅是Find以及設(shè)置一下就好了

java
因?yàn)楸酒珶o(wú)聊,僅僅為了完整性而實(shí)現(xiàn)。。。。
下一篇,將會(huì)開(kāi)始實(shí)現(xiàn)各種點(diǎn)擊事件,歡迎關(guān)注-V-

preview