{"id":13818783,"url":"https://github.com/thiagolocatelli/android-uitableview","last_synced_at":"2026-03-14T17:12:28.418Z","repository":{"id":1687556,"uuid":"2415498","full_name":"thiagolocatelli/android-uitableview","owner":"thiagolocatelli","description":"Library and example project on how to use the UITableView component","archived":false,"fork":false,"pushed_at":"2015-02-24T22:11:55.000Z","size":324,"stargazers_count":676,"open_issues_count":5,"forks_count":340,"subscribers_count":86,"default_branch":"master","last_synced_at":"2024-08-04T08:01:14.863Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/thiagolocatelli.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":"2011-09-19T13:47:13.000Z","updated_at":"2023-11-29T22:57:41.000Z","dependencies_parsed_at":"2022-09-03T12:13:22.839Z","dependency_job_id":null,"html_url":"https://github.com/thiagolocatelli/android-uitableview","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/thiagolocatelli%2Fandroid-uitableview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagolocatelli%2Fandroid-uitableview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagolocatelli%2Fandroid-uitableview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagolocatelli%2Fandroid-uitableview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thiagolocatelli","download_url":"https://codeload.github.com/thiagolocatelli/android-uitableview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225405404,"owners_count":17469335,"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-04T08:00:30.350Z","updated_at":"2025-12-17T19:32:12.884Z","avatar_url":"https://github.com/thiagolocatelli.png","language":"Java","readme":"# UITableView for Android\n\n![UITableView](http://thiago.grem.io/img/github/uitable-view.png \"UITableView\")\n![UITableView](http://thiago.grem.io/img/github/uitable-view3.png \"UITableView\")\n![UITableView](http://thiago.grem.io/img/github/uitable-view4.png \"UITableView\")\n\n## Usage\n\n### Installation\n\n#### Android Studio\n\n1. Paste or clone this library into the `/libs` folder, in the root directory of your project. Create a new folder: `/libs` if not already present.  (This step is not required - only for keeping cleaner project structure)\n\n2. Edit `settings.gradle` by adding the library. You have also define a project directory for the library. Your `settings.gradle` should look like below:\n\n    ```\n    include ':app', ':UITableView'\n    project(':UITableView').projectDir = new File('libs/UITableView')\n    ```\n\n3. In `app/build.gradle` add the UITableView library as a dependency:\n\n    ```\n    dependencies {\n        compile fileTree(dir: 'libs', include: ['*.jar'])\n        compile 'com.android.support:appcompat-v7:21.0.3'\n        compile project(\":UITableView\")\n    }\n    ```\n\n4. Sync project, clean and build. You can use the UITableView as part of your project now.\n\n#### Eclipse\n\nBefore you can add a `UITableView` to your application, you must first add a library reference:\n\n1. Clone or download a copy of the library\n2. Import the library into Eclipse: File menu -\u003e Import -\u003e Existing Project into Workspace\n3. Open your application's project properties and [add a library reference][ref] to \"UITableView\"\n\n[ref]: https://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject\n\n### Using UITableView in your project\n\n#### Defining your layout\n\n    \u003cbr.com.dina.ui.widget.UITableView \n        android:id=\"@+id/tableView\" \n        style=\"@style/UITableView\" /\u003e\n\n#### Working on your activity\n\n\tpublic class Example1Activity extends Activity {    \n\t\tUITableView tableView;\n\n\t    @Override\n\t    public void onCreate(Bundle savedInstanceState) {\n\t        super.onCreate(savedInstanceState);\n\t        setContentView(R.layout.main);        \n\t        tableView = (UITableView) findViewById(R.id.tableView);        \n\t        createList();        \n\t        Log.d(\"Example1Activity\", \"total items: \" + tableView.getCount());        \n\t        tableView.commit();\n\t    }\n\n\t    private void createList() {\n\t    \tCustomClickListener listener = new CustomClickListener();\n\t    \ttableView.setClickListener(listener);\n\t    \ttableView.addBasicItem(\"Example 1\", \"Summary text 1\");\n\t    \ttableView.addBasicItem(\"Example 2\", \"Summary text 2\");\n\t    \ttableView.addBasicItem(\"Example 3\", \"Summary text 3\");\n\t    \ttableView.addBasicItem(\"Example 4\", \"Summary text 4\");\n\t    }\n\n\t    private class CustomClickListener implements ClickListener {\n\t\t\t@Override\n\t\t\tpublic void onClick(int index) {\n\t\t\t\tToast.makeText(Example1Activity.this, \"item clicked: \" + index, Toast.LENGTH_SHORT).show();\n\t\t\t}    \t\n\t    }    \n\t}\n\n### UITableViewActivity\n\nIn order to use the default list you can extend the [UITableViewActivity](https://github.com/thiagolocatelli/android-uitableview/blob/master/android-uitableview/src/br/com/dina/ui/activity/UITableViewActivity.java), a simple example can be found in the source code below:\n\n\tpublic class ExampleActivity extends UITableViewActivity {\t\n\n\t    @Override\n\t    public void onCreate(Bundle savedInstanceState) {\n\t        super.onCreate(savedInstanceState);\n\t        CustomClickListener listener = new CustomClickListener();\n\t        getUITableView().setClickListener(listener);\n\t    }\n\n\t    private class CustomClickListener implements ClickListener {\t\n\t\t\t@Override\n\t\t\tpublic void onClick(int index) {\n\t\t\t\tToast.makeText(ExampleActivity.this, \"item clicked: \" + index, Toast.LENGTH_SHORT).show();\n\t\t\t}\t    \t\n\t    }\n\n\t\t@Override\n\t\tprotected void populateList() {\n\t\t\tgetUITableView().addItem(\"Example 1\", \"Summary text 1\");\n\t\t\tgetUITableView().addItem(\"Example 2\", \"Summary text 2\");\n\t\t\tgetUITableView().addItem(\"Example 3\", \"Summary text 3\");\n\t\t\tgetUITableView().addItem(\"Example 4\", \"Summary text 4\");\n\t\t\tgetUITableView().addItem(\"Example 5\", \"Summary text 5\");\t\t\n\t\t}\t    \n\t}\n\nIn this example you don't even need to care about the xml since the  [UITableViewActivity](https://github.com/thiagolocatelli/android-uitableview/blob/master/android-uitableview/src/br/com/dina/ui/activity/UITableViewActivity.java) is using a default layout template the only displays the list in the screen. It is pretty mych the same list you are seeing in the screenshot provided at the beginning of this explanation.\n\n### UIButton\n\n\t\u003cLinearLayout\n\t\tandroid:orientation=\"vertical\"\n\t\tandroid:layout_width=\"fill_parent\"  \n\t\tandroid:layout_height=\"fill_parent\"\u003e\t\n\n\t\t\t\u003cbr.com.dina.ui.widget.UIButton\n\t\t\t\tandroid:layout_width=\"fill_parent\"  \n\t\t\t\tandroid:layout_height=\"fill_parent\"\n\t\t\t\tandroid:padding=\"10dip\"\n\t\t\t\tui:title=\"some title one\"/\u003e\n\n\t\t\t\u003cbr.com.dina.ui.widget.UIButton\n\t\t\t\tandroid:layout_width=\"fill_parent\"  \n\t\t\t\tandroid:layout_height=\"fill_parent\"\n\t\t\t\tui:title=\"some title two\"\n\t\t\t\tui:subtitle=\"some subtitle two\"\n\t\t\t\tandroid:padding=\"10dip\" /\u003e\t\n\n\t\t\t\u003cbr.com.dina.ui.widget.UIButton\n\t\t\t\tandroid:layout_width=\"fill_parent\"  \n\t\t\t\tandroid:layout_height=\"fill_parent\"\n\t\t\t\tui:title=\"some title three\"\n\t\t\t\tui:subtitle=\"with image\"\n\t\t\t\tui:image=\"@drawable/search_image\"\n\t\t\t\tandroid:padding=\"10dip\"/\u003e    \t\t\t    \t\t\n\t\u003c/LinearLayout\u003e\n\n### Customization\nUITableView is an Android Library Project and all its resources will be merged into the referring project. So, in order tu customize the colors of the UITableView and its elements, you need to create the same resources on your own project and this resources will be before the default values provided by the library project.\n\nIf you don't like the default colors that is defined in the [colors.xml](https://github.com/thiagolocatelli/android-uitableview/blob/master/android-uitableview/res/values/colors.xml) file simply override the default values in the main projects colors.xml file. These are the keys you need to work on to have your customized UITableView working.\n\n    \u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n    \u003cresources\u003e\t\n        \u003c!-- LIST BORDER COLOR --\u003e\n        \u003ccolor name=\"rounded_container_border\"\u003e#ffb7babb\u003c/color\u003e\n\n        \u003c!-- ITEM BACKGROUND COLOR - STATE - DEFAULT --\u003e\n        \u003ccolor name=\"base_start_color_default\"\u003e#FFFFFF\u003c/color\u003e\n        \u003ccolor name=\"base_end_color_default\"\u003e#FFFFFF\u003c/color\u003e\n\n        \u003c!-- ITEM BACKGROUND COLOR - STATE - PRESSED --\u003e\n        \u003ccolor name=\"base_start_color_pressed\"\u003e#ff3590c4\u003c/color\u003e\n        \u003ccolor name=\"base_end_color_pressed\"\u003e#ff2570ba\u003c/color\u003e\n\n        \u003c!-- ITEM TEXT COLORS - STATES - PRESSED AND DEFAULT --\u003e\n        \u003ccolor name=\"text_color_default\"\u003e#000000\u003c/color\u003e\n        \u003ccolor name=\"text_color_pressed\"\u003e#ffffff\u003c/color\u003e\t\t\t\n    \u003c/resources\u003e \n\n#### Example\t\n\n![UITableView](http://thiago.grem.io/img/github/uitable-view2.png \"UITableView\")\n![UITableView](http://thiago.grem.io/img/github/uitable-view5.png \"UITableView\")\n\nThe theme above was created using the following set of colors:\n\n\t\u003cresources\u003e\n\t\t\u003ccolor name=\"rounded_container_border\"\u003e#50b7babb\u003c/color\u003e\n\t\t\u003ccolor name=\"base_start_color_default\"\u003e#B0FFFFFF\u003c/color\u003e\n\t    \u003ccolor name=\"base_end_color_default\"\u003e#B0FFFFFF\u003c/color\u003e\n\t\t\u003ccolor name=\"base_start_color_pressed\"\u003e#B03590c4\u003c/color\u003e\n\t    \u003ccolor name=\"base_end_color_pressed\"\u003e#B02570ba\u003c/color\u003e\n\t    \u003ccolor name=\"text_color_default\"\u003e#000000\u003c/color\u003e\n\t    \u003ccolor name=\"text_color_pressed\"\u003e#ffffff\u003c/color\u003e   \n\t\u003c/resources\u003e\n\n## Android applications using it\t\n\n## Contributions\n\nFunctionallity improvements and performance enhancements are always welcome. Feel free to fork and apply your changes.\n\n### TODO list\n\n* Hability to let the user define the custom layout for the item\n* Hability to create Items that expand/collapse a set of items\n\n## Other Android Libraries\n\nUse these libraries also to get a better UI for your android application\n\n* [Android ActionBar](https://github.com/johannilsson/android-actionbar) by [Johan Nilsson](https://github.com/johannilsson)\n* [Android Pull to Refresh](https://github.com/johannilsson/android-pulltorefresh) by [Johan Nilsson](https://github.com/johannilsson)\n* [SwipeView](https://github.com/fry15/uk.co.jasonfry.android.tools) by [Jason Fry](https://github.com/fry15)\n* [Facebook Integration](https://github.com/lorensiuswlt/AndroidFacebook) by [Lorensius](https://github.com/lorensiuswlt)\n* [Twitter Integration](https://github.com/lorensiuswlt/AndroidTwitter) by [Lorensius](https://github.com/lorensiuswlt)\n* [Quick Actions](https://github.com/lorensiuswlt/NewQuickAction) by [Lorensius](https://github.com/lorensiuswlt)\n\n\n\n## License\nCopyright (c) 2011 [Thiago Locatelli] - \"thiago:locatelli$gmail:com\".replace(':','.').replace('$','@')\n\nLicensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)\n","funding_links":[],"categories":["Java","Libs","etc"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiagolocatelli%2Fandroid-uitableview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthiagolocatelli%2Fandroid-uitableview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiagolocatelli%2Fandroid-uitableview/lists"}