{"id":13644244,"url":"https://github.com/razerdp/UnderLineLinearLayout","last_synced_at":"2025-04-21T07:30:40.605Z","repository":{"id":152927072,"uuid":"50096761","full_name":"razerdp/UnderLineLinearLayout","owner":"razerdp","description":"// 这是一个简单的时间轴实现(LinearLayout)","archived":false,"fork":false,"pushed_at":"2017-05-03T02:33:52.000Z","size":5036,"stargazers_count":459,"open_issues_count":1,"forks_count":106,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-06T01:09:53.957Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/razerdp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-01-21T09:29:24.000Z","updated_at":"2024-10-28T10:19:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"eb030f93-85ff-4678-b5e9-6837e1254c46","html_url":"https://github.com/razerdp/UnderLineLinearLayout","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razerdp%2FUnderLineLinearLayout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razerdp%2FUnderLineLinearLayout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razerdp%2FUnderLineLinearLayout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razerdp%2FUnderLineLinearLayout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/razerdp","download_url":"https://codeload.github.com/razerdp/UnderLineLinearLayout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250014548,"owners_count":21360970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T01:01:59.673Z","updated_at":"2025-04-21T07:30:36.327Z","avatar_url":"https://github.com/razerdp.png","language":"Java","readme":"# UnderLineLinearLayout\n// 这是一个简单的时间轴实现(LinearLayout)\u003c/br\u003e\n\n\n\n## 效果图:\u003c/br\u003e\n![image](https://github.com/razerdp/UnderLineLinearLayout/blob/master/img/underlinelayout.gif)\n![image](https://github.com/razerdp/UnderLineLinearLayout/blob/master/img/underlinelayout_horizontal.gif)\n\u003c/br\u003e\n\n----------\n\n\n# 更新日志：\n### 2016-02-26:添加 `setWillNotDraw(false);`\ndemo由于设置了颜色，所以ViewGroup会调用onDraw方法，在没有颜色的情况下，如果linearlayout的divider为空，是不会执行onDraw方法的，这里把它设定为执行。\n\n----------\n\n### 2016-01-26:在忙完一天的工作后，忽然想起了这个东东，于是这次一并做了\n\n这次更新了一个前面说过的目标：lineGravity，这一次我们可以通过line_gravity属性来定义我们时间轴的位置了-V-，喜欢哪里点哪里\u003c/br\u003e\n\n**不过因为针对LinearLayout，所以有一定的限定：**\n\n - 当方向为vertical的时候，我们只能定义时间轴的位置在Left/Middle/Right，至于具体在什么位置，请设置**line_margin_side**属性\n - 当方向为horizontal的时候，我们只能定义时间轴的位置在Top/Middle/Bottom，至于具体在什么位置，请设置**line_margin_side**属性\n - 其余情况，比如vertical的方向，但我们设置了时间轴为top，这豪无意义对吧，那么其余非法情况我将其默认为0，也就是垂直方向默认为left，水平方向默认为top。\n\n### 效果图：\u003c/br\u003e\n![image](https://github.com/razerdp/UnderLineLinearLayout/blob/master/img/underlinearlayout_with_gravity.gif)\n\n----------\n\n\n### 2016-01-25\n增加了水平方向的timeLine，期望后面有时间可以做上gravity，也就是可以定义timeLine所处方向，最终目标是继承viewGroup，期望可以针对任何布局。\n\n\n----------\n\n\n## 使用方法：\u003c/br\u003e\n 因为继承的LinearLayout，所以请直接addView吧-V-\u003c/br\u003e\n### 各属性值：\n attrs.xml:\u003c/br\u003e\n```html\n    \u003cdeclare-styleable name=\"UnderLineLinearLayout\"\u003e\n        \u003c!--时间轴偏移值--\u003e\n        \u003cattr name=\"line_margin_side\" format=\"dimension\"/\u003e\n        \u003c!--时间轴动态调整值--\u003e\n        \u003cattr name=\"line_dynamic_dimen\" format=\"dimension\"/\u003e\n        \u003c!--线宽--\u003e\n        \u003cattr name=\"line_stroke_width\" format=\"dimension\"/\u003e\n        \u003c!--线的颜色--\u003e\n        \u003cattr name=\"line_color\" format=\"color\"/\u003e\n        \u003c!--点的大小--\u003e\n        \u003cattr name=\"point_size\" format=\"dimension\"/\u003e\n        \u003c!--点的颜色--\u003e\n        \u003cattr name=\"point_color\" format=\"color\"/\u003e\n        \u003c!--图标--\u003e\n        \u003cattr name=\"icon_src\" format=\"reference\"/\u003e\n           \u003c!--时间轴的gravity--\u003e\n                \u003c!--the gravity of the timeline--\u003e\n                \u003cattr name=\"line_gravity\"\u003e\n                    \u003cenum name=\"Left\" value=\"2\"/\u003e\n                    \u003cenum name=\"Right\" value=\"4\"/\u003e\n                    \u003cenum name=\"Middle\" value=\"0\"/\u003e\n                    \u003cenum name=\"Top\" value=\"1\"/\u003e\n                    \u003cenum name=\"Bottom\" value=\"3\"/\u003e\n                \u003c/attr\u003e\n    \u003c/declare-styleable\u003e\n```\n## 解析博文：\u003c/br\u003e\nhttp://blog.csdn.net/mkfrank/article/details/50557221 \u003c/br\u003e\nor\u003c/br\u003e\nhttp://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2016/0121/3902.html\n### 最后打个小广告：这是我另一个正在维护的项目，一个方便使用popupWindow的顶级抽象类，期望可以方便的实现popupWindow的各种效果，欢迎fork和star以及提出意见或建议\nhttps://github.com/razerdp/BasePopup\n## LICENSE\n许可？？？。。。。。。。纯属交流，请随便用吧- -\n \n","funding_links":[],"categories":["时间轴"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazerdp%2FUnderLineLinearLayout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frazerdp%2FUnderLineLinearLayout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazerdp%2FUnderLineLinearLayout/lists"}