android-recyclerview

Getting values from RecyclerView EditText?

痴心易碎 提交于 2019-12-06 04:14:34
问题 I am struck in recyclerView, Here the name and balance fields are coming from two different arrays. What I need is, here each row has an EditText field. I need to access each EditText on each row. And get values from it.. and a total is displayed on the Total textView. Is it possible? I tried a lot. I didn't get it. i am attaching my classes here. MainActivity public class GroupCollectionFragment extends Fragment { String[] nameArray = {"Akhil","Mohan","Anoop","Syam","Athul","Anish","Anand",

how to know the previous and new positions?

为君一笑 提交于 2019-12-06 03:54:24
I have a recyclerview with horizontal layout and only one view is visible at a time: mRecyclerView = findViewById(R.id.rvmain); mRecyclerView.setOnFlingListener(null); final SnapHelper snapHelper = new LinearSnapHelper(); snapHelper.attachToRecyclerView(mRecyclerView); mLayoutManager = new LinearLayoutManager(this,LinearLayoutManager.HORIZONTAL,false); mRecyclerView.setLayoutManager(mLayoutManager); mAdapter = new MainActivityRVAdapter(postsModels,MainActivity.this); mRecyclerView.setAdapter(mAdapter); using onScrolllistener, everytime I scroll I want to know the starting position and end

How to display latest post on top instead of bottom in recyclerview / cardlayout in firebase android?

最后都变了- 提交于 2019-12-06 03:47:50
I am totally new to Java and Firebase, working in a college project. Making something like an ecommerce app but not literally (somewhat similar). To the point, my newly inserted data are at bottom as default, I need to get them at the top. Tried every possible answers at stackoverflow. youtube and google results - in vain. To be honest, I'm totally a starter and have no knowledge where and how to integrate them together. Codes i'm working are posted with this question. Thanks in advance. Sorry I have no logs because I don't even know how to put (already answered) code together, far post them

Recycler View With Gridlayout Manager

孤街浪徒 提交于 2019-12-06 03:42:55
问题 I'm using RecyclerView with GridLayout manager to make seat booking layout like travels. My problem is how to auto detect spancount when my column is random? I know spanCount = recyclerViewWidth / singleItemWidth; , but the problem is singleItemWidth is different, as the seat width is different. This is the desired layout that I want: ... but I'm currently getting something like this: This is the code I'm using to arrange the seat layout: gridLayoutManager=new GridLayoutManager(this,totalRows

Recyclerview with scrolling background

你说的曾经没有我的故事 提交于 2019-12-06 03:38:39
问题 I'm trying to create a RecyclerView with scrolling background, like the one shown below. The idea is, as I scroll up/down the viewholders, the background (light-green) image should also move up/down in sync. Any clue as to how to accomplish this? Here is my basic RecyclerView configuration <android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/recycler_view" android:layout_width="match_parent" android:layout_height="match_parent"

Android Adapter “java.lang.IndexOutOfBoundsException: Invalid index 4, size is 4”

最后都变了- 提交于 2019-12-06 03:30:06
问题 I have problem with deleting item's from ArrayList and synchronising Adapter . I have my RecyclerView adapter with some ArrayList inside it called items . I download some list from the server and dispaly inside it. Whenever I click on some of list items I would like to delete it from server, from local ArrayList and notify the adapter about it. The problem is that when I delete everything from down to up from the list everything is ok, but when f.e. I delete 1st element from the list and then

Is there a way to share a same LayoutManager between multiple nested RecyclerViews

ⅰ亾dé卋堺 提交于 2019-12-06 03:29:26
问题 I'm developing an application that showing a game list, inside every game's itemView, i also have a video list to be showing. preview and structure are following. I deploy a RecyclerView as the window root view, and then for the videos, i used grid-style RecyclerView to display, so here we got a nested RecyclerView structure. But there is trouble because the number of videos is inconsistent between games, i don't want the RecyclerView of video list able to being scroll, so the best way is

Android RecyclerView adding pagination

旧巷老猫 提交于 2019-12-06 03:03:23
I created a RecyclerView for my application and trying to find a way to stop huge requests, I want to get the results 10 by 10 with a progress bar. My server will send the results 10 by 10 on every scrolldown to last item. public class ProfileActivityFriendsList extends AppCompatActivity { String[] names={"Ander Herera","David De Gea","Michael Carrick","Juan Mata","Diego Costa","Oscar"}; String[] positions={"Midfielder","GoalKeeper", "Midfielder","Playmaker","Striker","Playmaker"}; String[] urls={"Midfielder","GoalKeeper", "Midfielder","Playmaker","Striker","Playmaker"}; int[] images = {R

RecyclerView doesn't respect height=wrap_content?

独自空忆成欢 提交于 2019-12-06 03:00:59
问题 I have a chat screen which contains two views : a recycler view for displaying previous chat and a custom view which encapsulates an edit text, a send button, and another recycler view to let user select other things to send like photos, etc. This custom view is called "Panel". So, my chat activity has the following layout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" xmlns

Android: Recyclerview not resizing when softinput keyboard appears

北城以北 提交于 2019-12-06 02:49:42
问题 I have an activity that contains a fragment and the fragment contains a customview. The customview contains an edittext and directly below it a recyclerview with height of match_parent. When the user gets focus on the edittext a softinput keyboard appears.. unfortunately this keyboard hides half the recyclerview underneath it. I want the recyclerview to resize to the remaining visible height of the screen (under the edittext) so that items in the list aren't hidden by the keyboard. I've tried