I would like to create something like this in JavaFX:
The Panel with the song titles is expanded and collapsed by clicking on the album cover. The other albums are moved down when it's expanded and up again when collapsed.
What would be the most simple way to do this? I thought of using an Accordion, using the images as titles, but I'm not sure if it can be stylized in a way that it looks like this.
Since the icons should be realigned when the window size is increased, I'd like to use a Flow- or Tile Pane for the main layout. Animation would be nice-to-have, but is not absolutely necessary.
I'm grateful for any hint!
I cannot think of a simple way to have the albums in the second row to move down. However, if you want a grid of albums and a pop-over that appears when the user clicks on the album, the ControlsFX library’s GridView and PopOver control may help you. Although the GridView example in the link above shows only images, you can embed a whole scene graph (the image icon of the album, the title label, and the artist name label) in each cell.
Related
Fairly new to Android dev. I am trying to create a HorizontalScrollView that snaps and filters images based on the centered object selected in a list. In the picture below, notice how the letter in the center of the screen should perform a set of specific commands. For example, when I scroll to "C" a popup with the message "C" should pop up.
I have created the HorizontalScrollView and populated the view with buttons. I am trying to figure out how to make it snap and how to identify the letter in the center at any given moment.
I have taken a look at ViewPager, but I don't think it will be able to do what I have described because I would like to have a set of letters displayed at any moment. I understand I will probably have to create a custom class. Could you provide any guidance?
I want to do following things:
1-Create a grid(Size is depend on number of image series) of images on one screen
2-When clicked/chosen a image.
3-second grid (Size is depend on number of image series) of images will be on screen.
4-Horizontal Swipe the first screen to next one to display the other grid(i.e remaining images)
5-When clicked/chosen a image on last grid, an image or layout will be on screen.
Similar to the Grid we see in our android Phone's
Any answer truly Appreciated...
Assuming I understand this correctly, you are probably thinking of a GridView, which takes an adapter to populate the grid with images, just like an adapter for a ListView populates the list with Textviews (or whatever you have in your custom adapter layout).
As for the support to select an image to go to another grid (subdirectories of images?) and swiping between various grids, this would be done using Fragments. For the subdirectory stuff, I don't know if there is an API somewhere to help with this, but if not you would need to implement a recursive tree structure: the internal nodes would define a point that can be selected to navigate to the next level, and the external nodes would be the individual images. Selecting an internal node would enter that subdirectory, and selecting an external node would open a second Fragment with the larger view of the image.
This is all a bit vague, but hopefully it gives you a place to start looking around. Read the developer docs on GridViews and Fragments to see if they help at all.
I have attached a screenshot of my app with some junk data. The white that takes up the entire ListView is supposed to only be for each item, creating a card layout. I am new to Android, and cannot figure out where my code makes the incorrect reference.
The layout for the individual card is here: http://pastebin.com/mxjiDTLF
The layout for the activity is here: http://pastebin.com/kstW9PqV
The EventAdapter.java class that displays the Event objects in the listview is here: http://pastebin.com/vXkBnPq0
Also, in the below screenshot, you can see that the scrollbar does not appear right next to the left edge of the screen, but just inside the "white" of the massive card. What do I need to do so that it does not appear there?
Most layout parameters are ignored for ListViewItems. You should wrap the contents in the list view item inside another layout that has the correct margins, something like here (not tested): http://pastebin.com/bW7s27in
The fact that your scrollbar is not at the edge of the screen is caused by the margins of the ListView in your activity_events.xml file. You should set those to 0.
You should set the card background to each item.
In LibGDX, how can I create tabbed panel (screen areas) whose tabs switch visibility between multiple child panels?
Are there any ready-to-go frameworks?
or
How can I code a "TabbedPanel" class?
You could easily do this with a Table and Buttons inside a ButtonGroup
The first Row would be Buttons inside a ButtonGroup, so that minimum one Button and maximum one Button need to be checked.
The second Row would be the content. Here you can use a Pane or Table. Inside the ClickListener of the Buttons you add and remove the content (as Actor) dynamicly.
Use the UI Skin to create tab Buttons, that look like tabs.
I don't think libgdx has it and have never seen it, but i think a good way to go would be using a table inside a table.
the first cell of the first table would have a table made of buttons and the next row of the first table would have the the pane, making every button switch the pane that is in the second cell.
Just an idea though.
Take a look at the table and the scene2D stuff from libgdx
Table layout
scene2D
also take a look at the scene2d UI stuff
Scene2D.ui
Im having quite a difficult time setting up this GUI
As you can see in the picture i need to have several clickable items and i dont know how to do it. So i thought i could make one different VerticalFieldManager representing the white background. But it looks impossible to have more than two VerticalFieldManager over the main manager. So i thought i could use a LabelField and change the background color to white (it didnt work either) and on top of it put clickable labels and clickable textField but i dont get the background VerticalFieldManager to repeat it self and put itself under the previous one with a slight margin between them. Anyways, can you guys give me ideas on how to accomplish this GUI, what to use as background.
Thanks in advance and have a nice one.
I would suggest the following layout
Screen delegate should be VerticalFieldManager
Each item should be VerticalFieldManager as well
The body of the item itself should be RichTextField
The rest of the clickable elements you mentioned should be clickable Labels.
You will have to use HorizontalFieldManagers as well. One for the top panel and one for the bottom panel. Check the JustifiedHorizontalFieldManager from the advanced UI libarary.
As for clickable label - it is easy to implement one. Search SO for "[blackberry] clickable label". You can also check the BaseButtonField and BitmapButtonField provided in BlackBerry advanced UI library and available here.