{"action":"created","issue":{"url":"https://api.github.com/repos/ISchwarz23/SortableTableView/issues/129","repository_url":"https://api.github.com/repos/ISchwarz23/SortableTableView","labels_url":"https://api.github.com/repos/ISchwarz23/SortableTableView/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/ISchwarz23/SortableTableView/issues/129/comments","events_url":"https://api.github.com/repos/ISchwarz23/SortableTableView/issues/129/events","html_url":"https://github.com/ISchwarz23/SortableTableView/issues/129","id":278709622,"number":129,"title":"How to add view when click on row?","user":{"login":"nikolabozicbg","id":26407689,"avatar_url":"https://avatars1.githubusercontent.com/u/26407689?v=4","gravatar_id":"","url":"https://api.github.com/users/nikolabozicbg","html_url":"https://github.com/nikolabozicbg","followers_url":"https://api.github.com/users/nikolabozicbg/followers","following_url":"https://api.github.com/users/nikolabozicbg/following{/other_user}","gists_url":"https://api.github.com/users/nikolabozicbg/gists{/gist_id}","starred_url":"https://api.github.com/users/nikolabozicbg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikolabozicbg/subscriptions","organizations_url":"https://api.github.com/users/nikolabozicbg/orgs","repos_url":"https://api.github.com/users/nikolabozicbg/repos","events_url":"https://api.github.com/users/nikolabozicbg/events{/privacy}","received_events_url":"https://api.github.com/users/nikolabozicbg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-02T19:16:13Z","updated_at":"2017-12-02T21:34:09Z","closed_at":null,"author_association":"NONE","body":" Hello. Thank you for great library, It is very helpful, and i intent to donate I have one problem if you can help me please. What i want is when user click on one row of the table to pop up 2 buttons(in position where row is) for edit and delete of selected row. Can you help me how to do that.\r\n\r\nHere is my code:\r\n @Override\r\n    public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n                             Bundle savedInstanceState) { \r\n        DataBaseHelper helper = new DataBaseHelper(getActivity());\r\n        allUsers = helper.getAllUsers();\r\n\r\n        v =  inflater.inflate(R.layout.fragment_fragment_add_user, container, false);\r\n\r\n        TableView tableView = (TableView<String[]>) v.findViewById(R.id.tableView);\r\n        tableView.setColumnCount(2);\r\n        tableView.setDataAdapter(new UserTableDataAdapter(getActivity(), allUsers));\r\n        SimpleTableHeaderAdapter simpleHeader = new SimpleTableHeaderAdapter(getActivity(),   TABLE_HEADERS);\r\n        simpleHeader.setTextColor(Color.WHITE);\r\n        simpleHeader.setPaddingTop(8);\r\n        simpleHeader.setPaddingBottom(8);\r\n\r\n        tableView.setHeaderAdapter(simpleHeader);\r\n        tableView.setHeaderElevation(5);\r\n        int colorEvenRows = getResources().getColor(R.color.white);\r\n        int colorOddRows = getResources().getColor(R.color.et_grey);\r\n        tableView.setDataRowBackgroundProvider(TableDataRowBackgroundProviders.alternatingRowColors(colorEvenRows, colorOddRows));\r\n        tableView.addDataClickListener(new UserClickListener());\r\n        return  v;\r\n    }\r\n   \r\n    private class UserClickListener implements TableDataClickListener<User> {\r\n\r\n        @Override\r\n        public void onDataClicked(int rowIndex, User clickedData) {\r\n            String clickedCarString = clickedData.getName() + \" \" + clickedData.getSurname();           ;\r\n        }\r\n    }\r\n\r\nclass UserTableDataAdapter extends TableDataAdapter<User> {\r\n\r\n\r\n    public UserTableDataAdapter(Context context, List<User> data) {\r\n        super(context, data);\r\n    }\r\n\r\n    @Override\r\n    public View getCellView(int rowIndex, int columnIndex, ViewGroup parentView) {\r\n        User user = getRowData(rowIndex);\r\n        View renderedView = null;\r\n\r\n        switch (columnIndex) {\r\n            case 0:\r\n                renderedView = renderUserName(user);\r\n                break;\r\n            case 1:\r\n                renderedView = renderSurName(user);\r\n        }\r\n        return renderedView;\r\n    }\r\n\r\n    private View renderUserName(final User user) {\r\n        return renderString(user.getName());\r\n    }\r\n\r\n    private View renderSurName(final User user) {\r\n        return renderString(user.getSurname());\r\n    }\r\n\r\n    private View renderString(final String value) {\r\n        final TextView textView = new TextView(getContext());\r\n        textView.setText(value);\r\n        textView.setTextColor(Color.BLACK);\r\n        textView.setPadding(20, 10, 20, 10);\r\n\r\n        textView.setTextSize(14);\r\n\r\n        return textView;\r\n    }\r\n}\r\n"},"comment":{"url":"https://api.github.com/repos/ISchwarz23/SortableTableView/issues/comments/348721800","html_url":"https://github.com/ISchwarz23/SortableTableView/issues/129#issuecomment-348721800","issue_url":"https://api.github.com/repos/ISchwarz23/SortableTableView/issues/129","id":348721800,"user":{"login":"nikolabozicbg","id":26407689,"avatar_url":"https://avatars1.githubusercontent.com/u/26407689?v=4","gravatar_id":"","url":"https://api.github.com/users/nikolabozicbg","html_url":"https://github.com/nikolabozicbg","followers_url":"https://api.github.com/users/nikolabozicbg/followers","following_url":"https://api.github.com/users/nikolabozicbg/following{/other_user}","gists_url":"https://api.github.com/users/nikolabozicbg/gists{/gist_id}","starred_url":"https://api.github.com/users/nikolabozicbg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikolabozicbg/subscriptions","organizations_url":"https://api.github.com/users/nikolabozicbg/orgs","repos_url":"https://api.github.com/users/nikolabozicbg/repos","events_url":"https://api.github.com/users/nikolabozicbg/events{/privacy}","received_events_url":"https://api.github.com/users/nikolabozicbg/received_events","type":"User","site_admin":false},"created_at":"2017-12-02T21:34:09Z","updated_at":"2017-12-02T21:34:09Z","author_association":"NONE","body":"Or how to inflate view from xml inprivate View renderString(final String value)?"}}
{"actor":{"display_login":"nikolabozicbg"}}