{"id":13644239,"url":"https://github.com/qapqap/TimelineView","last_synced_at":"2025-04-21T07:30:35.026Z","repository":{"id":45768434,"uuid":"77600213","full_name":"qapqap/TimelineView","owner":"qapqap","description":"Customzable TimelineView for Android","archived":false,"fork":false,"pushed_at":"2020-05-17T23:33:06.000Z","size":354,"stargazers_count":507,"open_issues_count":4,"forks_count":73,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-11-09T16:44:07.211Z","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/qapqap.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}},"created_at":"2016-12-29T09:21:29.000Z","updated_at":"2024-11-02T04:49:01.000Z","dependencies_parsed_at":"2022-08-30T23:21:35.399Z","dependency_job_id":null,"html_url":"https://github.com/qapqap/TimelineView","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qapqap%2FTimelineView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qapqap%2FTimelineView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qapqap%2FTimelineView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qapqap%2FTimelineView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qapqap","download_url":"https://codeload.github.com/qapqap/TimelineView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250014545,"owners_count":21360969,"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.594Z","updated_at":"2025-04-21T07:30:34.397Z","avatar_url":"https://github.com/qapqap.png","language":"Java","funding_links":[],"categories":["时间轴"],"sub_categories":[],"readme":"# Customizable Timeline View for Android\nCustomizable Timeline View for Android, Create a simple timeline list with few lines of code. You can adjust the image, image size, line color, line size, background to the image and the background size.\n\n![](Screenshot.png)\n\n# Download\nAdd it in your root `build.gradle` at the end of repositories:\n\n``` groovy\nallprojects {\n\trepositories {\n\t\t...\n\t\tmaven { url 'https://jitpack.io' }\n\t}\n}\n```\nAdd the dependency:\n\n``` groovy\ndependencies {\n    compile 'com.github.qapqap:TimelineView:v1.6'\n}\n```\n\n# Usage\n\nIn your activity java class:\n``` java\n// Create Timeline rows List\nArrayList\u003cTimelineRow\u003e timelineRowsList = new ArrayList\u003c\u003e();\n\n// Create new timeline row (Row Id)\nTimelineRow myRow = new TimelineRow(0);\n\n// To set the row Date (optional)\nmyRow.setDate(new Date());\n// To set the row Title (optional)\nmyRow.setTitle(\"Title\");\n// To set the row Description (optional)\nmyRow.setDescription(\"Description\");\n// To set the row bitmap image (optional)\nmyRow.setImage(BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher));\n// To set row Below Line Color (optional)\nmyRow.setBellowLineColor(Color.argb(255, 0, 0, 0));\n// To set row Below Line Size in dp (optional)\nmyRow.setBellowLineSize(6);\n// To set row Image Size in dp (optional)\nmyRow.setImageSize(40);\n// To set background color of the row image (optional)\nmyRow.setBackgroundColor(Color.argb(255, 0, 0, 0));\n// To set the Background Size of the row image in dp (optional)\nmyRow.setBackgroundSize(60);\n// To set row Date text color (optional)\nmyRow.setDateColor(Color.argb(255, 0, 0, 0));\n// To set row Title text color (optional)\nmyRow.setTitleColor(Color.argb(255, 0, 0, 0));\n// To set row Description text color (optional)\nmyRow.setDescriptionColor(Color.argb(255, 0, 0, 0));\n\n// Add the new row to the list\ntimelineRowsList.add(myRow);\n\n// Create the Timeline Adapter\nArrayAdapter\u003cTimelineRow\u003e myAdapter = new TimelineViewAdapter(this, 0, timelineRowsList,\n\t//if true, list will be sorted by date\n\tfalse);\n\n// Get the ListView and Bind it with the Timeline Adapter\nListView myListView = (ListView) findViewById(R.id.timeline_listView);\nmyListView.setAdapter(myAdapter);\n```\n\nIn your activity layout xml\n``` xml\n\u003cListView\n    android:id=\"@+id/timeline_listView\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:divider=\"@null\"\n    android:dividerHeight=\"0dp\" /\u003e\n```\n\nLicense\n--------\n\n    Copyright 2016 Abdullah Alsulaiman.\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqapqap%2FTimelineView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqapqap%2FTimelineView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqapqap%2FTimelineView/lists"}