JavaFX Find index values of items currently in view - java

I am working on a project in JavaFX 2 and I am using a ListView to display a list of messages. The list is very long and so not all of it fits on screen. Is there any way to programmatically identify which items are currently in the view? I've searched everywhere online and I can't find any examples of a way to do this, nor does the API appear to have any notion of which items are on screen. Any help would be greatly appreciated, I've been working on this problem for quite some time.

Related

How to increase the height of list row using fragments?

I am working with fragments and created simple basis list and everything is working fine. But there is one thing that I can't do my self. I want to increase the height of the each row to cover the most of screen of any device. I know how to do in activities but I am not familiar with fragments. Any one can find a way for me?

Creating layouts with scroll down

Im kind of new to android programming with java, and theres a small thing which i want to clarify, i have no idea what this is called either and the Question topic name might not match to what im asking here so sorry about that :P
I want to dynamically create panels which will get filled with a text, and a button when the user clicks the small plus sign (ref image)
Can anyone point me to a tutorial becouse i dont know what this is called, and any small examples would help as well
]1
For something really simple based off your design, I might recommend using a ListView as the learning curve is easier. However, the RecyclerView is optimized for performance and can be easier to build a lot more crazy scrollable layouts such as Instagram.
Recyclerview Tutorial in Kotlin by Ray Wanderlich -
https://www.raywenderlich.com/170075/android-recyclerview-tutorial-kotlin
Android Documentation - Recyclerview -
https://developer.android.com/reference/android/support/v7/widget/RecyclerView.html
https://developer.android.com/guide/topics/ui/layout/recyclerview.html
Android Documentation - Listview -
https://developer.android.com/reference/android/widget/ListView.html
https://developer.android.com/guide/topics/ui/layout/listview.html
Vogell ListView Tutorial -
http://www.vogella.com/tutorials/AndroidListView/article.html

Replicate Contact details on Android

I am trying to use this method of viewing details of a list item in my own development, but I cannot seem to figure out the right words to Google. I was hoping to get some help on replicating this behaviour.
My current idea is to have a fragment with a higher z than the list and put a swipe listener in the fragment. Then when it reaches a certain height make it a full screen fragment, but I'm not sure if this is the proper​way

Bundling in Recyclerview- Android

I want to create a simple view like this. (red circle)
I searched on internet for Bundling in Recyclerview but I could not find any resources.
Can anyone tell me the name of this view or share any tutorial resources.
Can someone share an example of how to do it. Or any Tutorials on how to get this view . - Bounty question
In recyclerview you can do this with item decoration.
An ItemDecoration allows the application to add a special drawing and
layout offset to specific item views from the adapter's data set. This
can be useful for drawing dividers between items, highlights, visual
grouping boundaries and more.
All ItemDecorations are drawn in the order they were added, before the
item views (in onDraw()) and after the items (in onDrawOver(Canvas,
RecyclerView, RecyclerView.State).
refer here
or
you can design a custom layout and inflate it using getViewByType in
viewholder
I think you better to follow this videos, i am sure my side this videos gives you a perfect idea on Android Recyclerview and also provide a solution for problem.
Please follow this youtube link: https://www.youtube.com/watch?v=XhbsNO2_oDI
ItemDecorator from example below doesn't suite you. Try to use Expandable Listview, which helps you to adjust list, when user tap on image below list item, and expand size for another item, for example, chat messages in your image.
Use This Example!

Implementing a list that is both vertically & horizontally scrollable

I have a question related to Android app UI implementation. The UI I want to implement is very similar to the Slideshare app UI, which I've attached below:
Apologies for the size of the image. But basically I want to implement a vertical list, and each item within the list is another horizontal list of sub-items.
My current plan of approach is implementing a vertical RecyclerView, and then implementing each item of the list as a horizontal RecyclerView (basically a 2-Dimensional RecyclerView).
Am I on the right track here? I apologise I cannot provide any code because I am still in the design phase. I do not want any code solutions but rather a guide or small tips as to how to approach implementing such UI.
Thank you for your time reading this question. Any tips would be highly appreciated!
You can use TwoWayView library to implement this scenario for bot horizontal and vertical listviews or you can use RecyclerView.
TwoWayView Library: https://github.com/lucasr/twoway-view/
TwoWayView Samples: https://github.com/lucasr/twoway-view/tree/master/sample
You can read a great tutorial about how to implement this on on this Github page.
You can take a look at VerticalHorizontalListView and twoway-view
and of course this link might be a help, which explains how to implement Dynamic Shelfview in Android.
I found this answer on SO :
Horizontal ScrollView in List View Item Android which explains the issue prefectly, you can take a look at that too. I hope this links help you ;)

Categories