pockethub源码说明----repositorier fragment说明

使用的是RelativeLayout布局器的,共有3个同级别标签。

第一个:LinearLayout控件,主要用来显示英文字母的,每个分类的第一个item要显示这个字母的,主要用在分类上

第二个:OcticonTextView,显示一个16进制的文本背景图标

第三个:LinearLayout控件里面放的是具体的repos内容,主要包括name、description、

第四个:View背景的分割线,主要用在最后的item显示的是一个结束的分割线。主要是用来分割内部的item之间的线

 

OcticonTextView类是一个特殊的textview,直接用来显示icon的,通过属性设置显示的图标,android:text="@string/icon_fork" 

 

typeface.xml中定义好的资源,共有8种的图标资源,如下图所以,显示的图标很小,显示的效果不是太好

<resources>

<string name="icon_pull_request" translatable="false">\uf20E</string>
<string name="icon_comment" translatable="false">\uf04f</string>
<string name="icon_file" translatable="false">\uf011</string>
<string name="icon_tag" translatable="false">\uf215</string>
<string name="icon_folder" translatable="false">\uf216</string>
<string name="icon_folders" translatable="false">\uf217</string>
<string name="icon_star" translatable="false">\uf02a</string>
<string name="icon_fork" translatable="false">\uf020</string>

</resources>

 

/**
* Private repository icon
*/
public static final String ICON_PRIVATE = "\uf26a";

/**
* Public repository icon
*/
public static final String ICON_PUBLIC = "\uf201";

/**
* Fork icon
*/
public static final String ICON_FORK = "\uf202";

/**
* Create icon
*/
public static final String ICON_CREATE = "\uf203";

/**
* Delete icon
*/
public static final String ICON_DELETE = "\uf204";

/**
* Push icon
*/
public static final String ICON_PUSH = "\uf205";

/**
* Wiki icon
*/
public static final String ICON_WIKI = "\uf207";

/**
* Upload icon
*/
public static final String ICON_UPLOAD = "\uf20C";

/**
* Gist icon
*/
public static final String ICON_GIST = "\uf20E";

/**
* Add member icon
*/
public static final String ICON_ADD_MEMBER = "\uf21A";

/**
* Public mirror repository icon
*/
public static final String ICON_MIRROR_PUBLIC = "\uf224";

/**
* Public mirror repository icon
*/
public static final String ICON_MIRROR_PRIVATE = "\uf225";

/**
* Follow icon
*/
public static final String ICON_FOLLOW = "\uf21C";

/**
* Star icon
*/
public static final String ICON_STAR = "\uf02A";

/**
* Pull request icon
*/
public static final String ICON_PULL_REQUEST = "\uf222";

/**
* Issue open icon
*/
public static final String ICON_ISSUE_OPEN = "\uf226";

/**
* Issue reopen icon
*/
public static final String ICON_ISSUE_REOPEN = "\uf227";

/**
* Issue close icon
*/
public static final String ICON_ISSUE_CLOSE = "\uf228";

/**
* Issue comment icon
*/
public static final String ICON_ISSUE_COMMENT = "\uf229";

/**
* Comment icon
*/
public static final String ICON_COMMENT = "\uf22b";

/**
* News icon
*/
public static final String ICON_NEWS = "\uf234";

/**
* Watch icon
*/
public static final String ICON_WATCH = "\uf04e";

/**
* Team icon
*/
public static final String ICON_TEAM = "\uf019";

/**
* Code icon
*/
public static final String ICON_CODE = "\uf010";

/**
* Tag icon
*/
public static final String ICON_TAG = "\uf015";

/**
* Commit icon
*/
public static final String ICON_COMMIT = "\uf01f";

/**
* Merge icon
*/
public static final String ICON_MERGE = "\uf023";

/**
* Key icon
*/
public static final String ICON_KEY = "\uf049";

/**
* Lock icon
*/
public static final String ICON_LOCK = "\uf06a";

/**
* Milestone icon
*/
public static final String ICON_MILESTONE = "\uf075";

/**
* Bookmark icon
*/
public static final String ICON_BOOKMARK = "\uf07b";

/**
* Person icon
*/
public static final String ICON_PERSON = "\uf218";

/**
* Add icon
*/
public static final String ICON_ADD = "\uf05d";

/**
* Broadcast icon
*/
public static final String ICON_BROADCAST = "\uf030";

/**
* Edit icon
*/
public static final String ICON_EDIT = "\uf058";

/**
* Read/check icon
*/
public static final String ICON_READ = "\uf03a";
posted on 2017-10-20 09:58  tistar  阅读(298)  评论(0编辑  收藏  举报