{"action":"closed","issue":{"url":"https://api.github.com/repos/mikepenz/FastAdapter/issues/144","repository_url":"https://api.github.com/repos/mikepenz/FastAdapter","labels_url":"https://api.github.com/repos/mikepenz/FastAdapter/issues/144/labels{/name}","comments_url":"https://api.github.com/repos/mikepenz/FastAdapter/issues/144/comments","events_url":"https://api.github.com/repos/mikepenz/FastAdapter/issues/144/events","html_url":"https://github.com/mikepenz/FastAdapter/issues/144","id":161524998,"number":144,"title":"ViewHolder not setting the string as text of a TextView. Please see details.","user":{"login":"HammadNasir","id":15244089,"avatar_url":"https://avatars.githubusercontent.com/u/15244089?v=3","gravatar_id":"","url":"https://api.github.com/users/HammadNasir","html_url":"https://github.com/HammadNasir","followers_url":"https://api.github.com/users/HammadNasir/followers","following_url":"https://api.github.com/users/HammadNasir/following{/other_user}","gists_url":"https://api.github.com/users/HammadNasir/gists{/gist_id}","starred_url":"https://api.github.com/users/HammadNasir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HammadNasir/subscriptions","organizations_url":"https://api.github.com/users/HammadNasir/orgs","repos_url":"https://api.github.com/users/HammadNasir/repos","events_url":"https://api.github.com/users/HammadNasir/events{/privacy}","received_events_url":"https://api.github.com/users/HammadNasir/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mikepenz/FastAdapter/labels/invalid","name":"invalid","color":"e6e6e6"}],"state":"closed","locked":false,"assignee":{"login":"mikepenz","id":1476232,"avatar_url":"https://avatars.githubusercontent.com/u/1476232?v=3","gravatar_id":"","url":"https://api.github.com/users/mikepenz","html_url":"https://github.com/mikepenz","followers_url":"https://api.github.com/users/mikepenz/followers","following_url":"https://api.github.com/users/mikepenz/following{/other_user}","gists_url":"https://api.github.com/users/mikepenz/gists{/gist_id}","starred_url":"https://api.github.com/users/mikepenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikepenz/subscriptions","organizations_url":"https://api.github.com/users/mikepenz/orgs","repos_url":"https://api.github.com/users/mikepenz/repos","events_url":"https://api.github.com/users/mikepenz/events{/privacy}","received_events_url":"https://api.github.com/users/mikepenz/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-06-21T19:55:47Z","updated_at":"2016-06-22T06:41:39Z","closed_at":"2016-06-22T06:41:39Z","body":"I am using FastAdapter in my android project.\r\n\r\nThis is how I am using it:\r\n\r\n```\r\n    public class HRequest extends AbstractItem<HRequest, HRequest.ViewHolder> {\r\n\r\n        public String imageURL;\r\n\r\n        public HRequest() {\r\n\r\n        }\r\n\r\n        public HRequest(String imageURL) {\r\n            this.imageURL = imageURL;\r\n        }\r\n\r\n        // Fast Adapter methods\r\n        @Override\r\n        public int getType() {\r\n            return R.id.recycler_view;\r\n        }\r\n        @Override\r\n        public int getLayoutRes() {\r\n            return R.layout.h_request_list_row;\r\n        }\r\n        @Override\r\n        public void bindView(ViewHolder holder) {\r\n            super.bindView(holder);\r\n\r\n            holder.imageURL.setText(imageURL);\r\n\r\n        }\r\n        // Manually create the ViewHolder class\r\n        protected static class ViewHolder extends RecyclerView.ViewHolder {\r\n\r\n            TextView imageURL;\r\n\r\n            public ViewHolder(View itemView) {\r\n                super(itemView);\r\n                imageURL = (TextView)itemView.findViewById(R.id.imageURL);\r\n\r\nif (!imageURL.getText().toString().isEmpty()) {\r\n\r\n                Toast.makeText(itemView.getContext(), imageUID.getText().toString(), Toast.LENGTH_SHORT).show();\r\n\r\nif (imageURL.getText().toString().startsWith(\"https://firebasestorage.googleapis.com/\") || imageURL.getText().toString().startsWith(\"content://\")) {\r\n                    Picasso.with(itemView.getContext())\r\n                            .load(imageURL.getText().toString())\r\n                            .into(homelessImage);\r\n                } else {\r\n                    Toast.makeText(itemView.getContext(), \"some problem\", Toast.LENGTH_SHORT).show();\r\n                }\r\n\r\n            } else {\r\n                Toast.makeText(itemView.getContext(), \"no imageUID found\", Toast.LENGTH_SHORT).show();\r\n            }\r\n\r\n            }\r\n        }\r\n\r\n    }\r\n```\r\nHere is R.layout.h_request_list_row:\r\n\r\n```\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n              xmlns:app=\"http://schemas.android.com/apk/res-auto\"\r\n              android:layout_width=\"match_parent\"\r\n              android:layout_height=\"match_parent\"\r\n              xmlns:ads=\"http://schemas.android.com/apk/res-auto\"\r\n              android:orientation=\"vertical\"\r\n              xmlns:tools=\"http://schemas.android.com/tools\">\r\n\r\n            <TextView\r\n                android:id=\"@+id/imageURL\"\r\n                android:text=\"imageURL\"\r\n                android:layout_width=\"wrap_content\"\r\n                android:layout_height=\"wrap_content\"/>\r\n\r\n</LinearLayout>\r\n```\r\nThe problem here is that imageURLis not getting set as the imageURL retrieved from the database but as imageURL defined in the layout file and thus no image is getting downloaded. I followed this gist: https://gist.github.com/puf/f49a1b07e92952b44f2dc36d9af04e3c\r\n\r\nI am sure that String imageURL here:\r\n\r\n```\r\npublic HRequest(String imageURL) {\r\n            this.imageURL = imageURL;\r\n        }\r\n```\r\nhas successfully fetched the urls retrieved from Firebase database.\r\n\r\nPlease let me know what's going wrong here.\r\n\r\n"}}
{"actor":{"display_login":"mikepenz"}}