Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determine how to find out when an entry's row in the presets has been clicked #8

Closed
dgets opened this issue Jan 26, 2019 · 4 comments
Closed
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@dgets
Copy link
Owner

dgets commented Jan 26, 2019

This may actually require shifting the layout to contain a different sort of element than the TableRow that they're currently within. I have no idea if this has an _onClick method, or anything similar, but I'll be digging through the methods soon here.

Either way, we need to figure out when a user has clicked one of the entries, no matter what thread it requires us to follow.

@dgets dgets added enhancement New feature or request help wanted Extra attention is needed labels Jan 26, 2019
@dgets dgets added this to the alpha milestone Jan 26, 2019
@dgets dgets self-assigned this Jan 26, 2019
@dgets
Copy link
Owner Author

dgets commented Jan 26, 2019

Well, despite the fact that it looks like a useful view, I'm definitely going to have to find out a different way to implement the clickable rows for each preset. TableLayout with RecyclerView (see also: TableLayout with RecyclerView was suggested on #android-dev on freenode).

Reason being for this is that the TableLayout is not being populated with multiple subsequent TextViews, but all of the contents are having linefeeds appended and are going into the same TextView, making them indistinguishable from each other.

So let's do the research on RecyclerView and decide upon a course of action for this issue.

@dgets
Copy link
Owner Author

dgets commented Jan 30, 2019

Got quite a way into implementing RecyclerView with this tutorial (note it's a YouTube video one). Having some problems with the RecyclerView not scrolling yet, being constrained or anchored properly yet, and other various layout errata, but all in all it's looking a lot better than it was before. Shouldn't take much from here to get things working properly, I don't think.

@dgets
Copy link
Owner Author

dgets commented Jan 31, 2019

This example should provide the information necessary information to be able to determine what CardView has been clicked from within the RecyclerView. Note that handling this from the xml's onClick attribute for the layout element is not the way to do things when they're getting this complex, certainly not if they're any moreso than this...

@dgets
Copy link
Owner Author

dgets commented Feb 9, 2019

Due to the issues with implementing all of that with RecyclerView containing CardViews, I've switched [again] to a LinearLayout holding TextViews. It didn't take long after implementing this to be able to programmatically add whatever I need to there, and even to register the onClick() handlers with support for recognizing which particular TextView had taken the click. We're going to be sticking with this route for now.

@dgets dgets closed this as completed in 388a0d9 Feb 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant