Get all elements details from android RecyclerView - appium

I am working on Android application automation, in that I am facing issue with the recycler view data handling.
All data are appearing into Recycler view in List Format.
I have stored all items in List but at a time I am able to get only presented items on UI.
I need all items into List??

Add initial data into your List, then perform some action to show another data (scroll, refresh or whatever, it based on application logic) and append these data to your list. Keep doing it until you collect all data. What is the actual issue you faced with?

Related

Should I use queries in firebase or the observe functions?

I am building out an iOS app that requires getting lists of users at different parts of the app(finding users nearby, find users that have similar interest etc) I'm displaying the list of users in collection views/table views.
I have a user structure that contains all of the user data(name, photo, list of interest, location, preferences..etc)
My question is, when I'm getting the list of users from the database, is it more cost effective to use the query function or to use the observe functions? In the list I only need to display the users photo and username. If the user wants to find out more then clicking on the cell will get more data from the larger user data table.
My options
using a query to get the users that meet the criteria for that list(say all users nearby). Then when the user clicks on the cell that interests them, get a snapshot from the database for that specific users.
My thought process is its less costly than pulling back the whole snapshot using the observe functions.
using the observe functions, getting all users snapshot data and only displaying the photo and username. If the user selects a cell send the data to the detail view.
creating a special display structure that contains only items necessary for the collection view/ table view and if the user clicks on a cell call the database again getting all of that users data.
If anyone has a point of view they could share that would be great!
Thanks
Observing in Firebase needed for making instant update, like in chats, when new message appear you need to update message list. So here, for getting list of users that fit your request, better to use queries

Swift - Refresh UITableView but keep current position in table

I'm trying to create a planning app with Swift 2, which pulls the data from a remote server via an API. The data of the API is ordered by time. The app shows the data in the exact same order as the API returns.
Now, however, I have created a UITableView which can be pulled to refresh the data. I also have added the possibility to rearrange the data to the likings of the user. When the user refreshes the table however, the data will all be restored to the order of the returned API data.
My question is: how can I still refresh the data, but let the data keep the current position in the table?
You control the order in which data is displayed by how you implement cellForRowAtIndexPath. The API doesn't control your UI.
If you choose to display the data in the order returned by the API, then yes, user will lose their custom arrangement when the table is reloaded.
If you want the user to control the order data is displayed, you will need to persist some information about the order so that you can keep that order when the table is reloaded.
In the simplest case, you could provide some default sort options that make sense for the kind of data you have. You might have a type or category value that makes sense to sort on. You would then only need to persist the sort options the user has chosen and sort your data when reloading the table.
If you want the user to have complete control over the order, then you need to persist that order and reapply it when the table is reloaded. This is considerably more challenging. Some options, from easiest to hardest:
1. You could persist the order locally using just an identifier that uniquely identifies each item.
2. You could persist all the data and the order locally.
3. You could persist the order on the server.

Ideas to store an TableView for different Users on Parse

I have an application where the user needs to sign in first. Now in my application there is an table view which can be filled with different events for example: a user adds an Title for a new event and an yellow icon. Now the Title and the yellow icon appears in the tableview.
Now i want the app to sync with Parse so that this user can see it's Title and it's yellow icon on every device he's logged in.
I'm sorry that i need to ask, i hope you can help me :/
Actually there is already a lot of content regarding your question and the Parse SDK is very well documented.
For example have a look at this: Save App Data to Parse Backend
You should do the following steps:
Create an App on Parse
Create User Table
Create AppData Table
Reference the User with the AppData entry via column type : "Pointer"
Whenever a entry was added to your tableview or whenever the app is closed save the current data to your parse backend
Whenever the tableview is shown or whenever your application starts retrieve the information from your Parse backend and show them in your tableview accordingly
I hope the link I gave you can give you some insight, however nobody knows whether you are coding in Swift or Objective-C because you added both tags.
If you need more information on how to design your backend in order to retrieve the right entries for the specific user I recommend reading this:
find-all-objects-belonging-to-a-user-with-objectid
or reading about relational queries in the Parse SDK.

What is the most effective workflow for this iOS app?

I have an app that requires internet for syncing a webservice to a local core data db. Then a local db fetch is used to populate different objects for a MapView and a TableView in a tabbarcontroller. Im looking at these 2 scenarios:
The main advantage of "A" is that I dont have to preload the app with a database, although its a small db (about 100 records). The problem is that it gets convoluted. If there is no internet connection, in MapView, the user sees a map but the refreshButton is disabled. So thats not a problem. But the user can still go to the tableview and he will see an empty table.
The main advantage of "B" is that with a preloaded db, the app will always have a data source ready for plotting and listing. I dont really know how to preload the app with a db though.
I kind of want to go the first route, "A". My main question is, since right now I disabled the refreshButton on MapView so that it only works once the data is gotten from the web...that sortedArray is empty on launch. So if the user goes to the TableVC it will be empty. As it stands, the user must first tap the refresh button before going to the tableview.
What is the most effective way to deal with this?
If the 100 records are static enough that you can ship a default set of records with the app, that would be the best solution. The user, with or without internet, gets a populated tableview.
Ship your records as a plist in your app's bundle. On first launch, open the plist and add each entry as a new object into core data. This type of "seeding" happens very quickly. Just create a collection (array, dictionary) for the plist, then enumerate through, mapping it to your managedObject's attributes.
There's code that shows you how to do this in the WWDC 2012 video iCloud and Core Data (just ignore the iCloud part).
Then if there's a connection after the seeding, you can sync data, which would update/replace/etc the pre-populated data.

Updating DBGrids in Master-Detail views when updating Cells in Delphi

I am using TADOConn and TADODataSet units pulling data and connected to TDataSources and TDBGrids. I have my DBGrids displaying information properly and editing information in the detail view accurately reflects in the backing database.
What I would like to do is have it so that an update to a field in the detail DBGrid causes a refresh on both data sets so that the most up-to-date data is always displayed.
I have tried putting the refresh calls in several event handlers at various levels of DB access but they all seem to have a similar (but different) issue of reentry.
The best I've been able to come up with so far is getting the Master view updated by calling refresh on the details DBGrid.onColExit event.
If I leave the refresh calls out all together the updated information isn't displayed until the next time the application is run.
Any ideas of how to achieve this? Am I going about it the wrong why? Thanks in advance.
You imply that the changes you make in the DBGrid are posted to the database but are not displayed in the grid or maintained in its dataset and that you must get them back from the database. All the dataset components I have used maintain its copy of the data including all the changes that passed through it to the database. If you expect the data to be changed by triggers or another process, you may need to refresh the data. Then you will have to deal with the possibility that the current record position is lost, i.e. the current record was deleted in the database.
I would try using the Dataset.AfterPost event to initiate the refresh. And I would consider using a Timer to delay the refresh if strange things happen.

Resources