{"action":"created","issue":{"url":"https://api.github.com/repos/hawkular/android-client/issues/6","labels_url":"https://api.github.com/repos/hawkular/android-client/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/hawkular/android-client/issues/6/comments","events_url":"https://api.github.com/repos/hawkular/android-client/issues/6/events","html_url":"https://github.com/hawkular/android-client/pull/6","id":84729126,"number":6,"title":"Resource types screen","user":{"login":"ming13","id":200401,"avatar_url":"https://avatars.githubusercontent.com/u/200401?v=3","gravatar_id":"","url":"https://api.github.com/users/ming13","html_url":"https://github.com/ming13","followers_url":"https://api.github.com/users/ming13/followers","following_url":"https://api.github.com/users/ming13/following{/other_user}","gists_url":"https://api.github.com/users/ming13/gists{/gist_id}","starred_url":"https://api.github.com/users/ming13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ming13/subscriptions","organizations_url":"https://api.github.com/users/ming13/orgs","repos_url":"https://api.github.com/users/ming13/repos","events_url":"https://api.github.com/users/ming13/events{/privacy}","received_events_url":"https://api.github.com/users/ming13/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-03T19:15:41Z","updated_at":"2015-06-03T19:59:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hawkular/android-client/pulls/6","html_url":"https://github.com/hawkular/android-client/pull/6","diff_url":"https://github.com/hawkular/android-client/pull/6.diff","patch_url":"https://github.com/hawkular/android-client/pull/6.patch"},"body":"I tried `RecyclerView` and it remains totally gross regarding simple things — there is no simple ability to add list dividers or just set an item click listener.\r\n\r\nNot sure if `BackendClient` should be a singleton really — AeroGear components handle most of the state: `PipeManager`, `AuthorizationManager`. All these `ReadFilter`-related things are potentially not very nice — I had a plan to declare all paths at one place but probably it is not possible. I’ll think about it."},"comment":{"url":"https://api.github.com/repos/hawkular/android-client/issues/comments/108596829","html_url":"https://github.com/hawkular/android-client/pull/6#issuecomment-108596829","issue_url":"https://api.github.com/repos/hawkular/android-client/issues/6","id":108596829,"user":{"login":"ming13","id":200401,"avatar_url":"https://avatars.githubusercontent.com/u/200401?v=3","gravatar_id":"","url":"https://api.github.com/users/ming13","html_url":"https://github.com/ming13","followers_url":"https://api.github.com/users/ming13/followers","following_url":"https://api.github.com/users/ming13/following{/other_user}","gists_url":"https://api.github.com/users/ming13/gists{/gist_id}","starred_url":"https://api.github.com/users/ming13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ming13/subscriptions","organizations_url":"https://api.github.com/users/ming13/orgs","repos_url":"https://api.github.com/users/ming13/repos","events_url":"https://api.github.com/users/ming13/events{/privacy}","received_events_url":"https://api.github.com/users/ming13/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T19:59:00Z","updated_at":"2015-06-03T19:59:00Z","body":"> Yes, there is. We can create a `RecyclerView.OnItemTouchListener` to do the same what `ListView.OnItemClickListener` do.\r\n\r\nThanks, but I know it is possible, it is just not justified to abandon `ListView`, especially when no benefits of `RecyclerView` will be used (probably).\r\n\r\n> I'm not following you here. What it means? What do you need in `ReadFilter`?\r\n\r\nWell, I thought about putting all paths into the `BackendPipes.Paths` class. But Hawkular paths require variable components, i. e. `/inventory/{tenantId}/resourceTypes`. It is not a great idea to create a new pipe for every one of them, i. e. `/inventory/xxxx-xxxx/resourceTypes` and `/inventory/yyyy-yyyy/resourceTypes`. `ReadFilter` comes in play, but it blocks my idea about all paths in one place. Maybe I should workaround using another way.\r\n\r\n* Register pipes with a common path via `PipeManager.config`. For example, tenants, resources and metrics are placed under `https://server.link/hawkular/inventory`, so it will be used with `PipeManager.config` for tenants, resources and metrics as well.\r\n* Fetch pipes using `ReadFilter`. For example, tenants — `tenant/`, resource types — `{tenantId}/resourceTypes`, metrics — `{tenantId}/resourceTypes/{resourceType}`.\r\n\r\nWhat do you think?\r\n\r\n> I think you can create/store all Pipes, Auths you need in `Application.onCreate` instead of use `BackendClient,` but let's do it step by step.\r\n\r\nNot exactly — the endpoint should be able to change at runtime, so some sort of re-registration should be available."}}