How do I scroll to a certain widget in a QScrollArea?

Where can I read more about UI architecture and how GUI are rendered on the screen?

  • Hello, I am a Android mobile developer, designer gives me the design and i do my best to mimic what they want.  So frequently, I realize they are not happy with Android native views, meaning there is something they want but the native views just don't support.  For an example, Gallery widget has center-locked mechanism, we don't want that.  I am not here to discuss Gallery and its alternative, but just for an example. so to satisfy their need, i need to look for something else or use something else, but that usually has technical/performance obstacles, so continue with the example above, i can technically use a HorizontalScrollView, but the problem is it does not have adapter support (which views cannot be reused) so i am sometimes very frustated: 1. say i stick with Gallery, i have no idea how to modify Gallery in  a way so that  it won't centered locked. 2. i can write my custom view so that it can be scrolled horizontally and uses adapter, but i do not hav the knowledge how. 3. it seems all the cool apps and designers want, require all sort of custom views, which i do not have the knowledge to do anything. again, this is not a question about Gallery or HorizontalScrollView, i am just trying to demonstrate my problem here. my question is the following: 1. where  can i learn about how UI/Widgets/GUI are drawn in general (either android specific or more general)? 2 how can i know  about how scrolling are implemented, how the little scroll bars are drawn and animiated based on its position etc. 3. how can i be like Romain Guy, or anyone who writes Android framework, where can i gain such UI drawing knowledge? 4. how to detect if a view is off the screen, or partially off the screen, i don't know if there is a specific field/area/class for this, but i feel i don't have enough background to draw my own custom views, or solving the problems i mentioned above. please don't refer me to android 'custom view' article, yes it helps, but it doesn't tell you, say, how scroll bars are animated, how scrolling actually moves the items to the left or right. i have just started some android source code, but again...i feel there must be something that Romain Guy or any UI guy from Swing or SWT that they need to know about basic GUI drawing before they start devloping those frameworks please help

  • Answer:

    The specific field you're looking for is computer graphics. It's a broad field, and more complex than typical CRUD app development, but not rocket science. You could start with a basic course like this one: https://www.khanacademy.org/computing/computer-programming/programming It is based on JavaScript instead of Java, but looks like it contains some of the basic concepts of how graphics are manipulated in a computer. Books like this might help too: http://www.amazon.com/gp/aw/d/0321886739/ I know you said not to just reference the custom control docs, but there is a nice tutorial for custom views on this page: https://developer.android.com/training/best-ui.html Have you tried going through the custom control tutorial on that page? The interfaces it describes are crucial to understand, whether or not you want to dismiss them. Other related topics include Object Oriented User Interface Design, and Design Patterns, specifically the Observer Pattern. I'll leave Googling the last references as an exercise for the reader. Good luck.

Tim Mensch at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.