How to make a detailed table with lots of entries? - android

I need to create tables that will hold lots of entries (its a bus schedule).
I will need to be able to set the color of certain individual cells. And I would obviously want it to play nice with all kind of phone screen sizes.
So the questions are:
How do I go about creating this table?
What is the best approach for my need?
This is one the tables with the data that I need to make:

I suggest to use a ListView for this. Here is a nice tutorial: http://www.vogella.com/articles/AndroidListView/article.html

I ended up creating and styling the tables in Excel and exporting them as HTMLs. Then I just loaded them in a webview.

Related

SQLITE DATABASE for multiple access

I would like to ask if any of you out there uses android studio and sqlite for apps that require multiple users to access the database? I have been looking for source codes and examples online, but haven't seen any. I understand that other database might be better but I only have enough time to use sqlite as I am alr using it now. Could anyone help me with example source codes?
viewComment.setText(name+comment);
replace with below code
viewComment.append("\n"+name+comment);
Update -
limit number comments - use counter , after certain number of hits stop appending to text view.
U can make scrollable too.
for above both please check your requirements or UI/UX teams.
You will have to work with RecyclerView here. Add a different layout resource file in your layout folder and bind it to the RecyclerView and all your comments must be stored somewhere, like in a database. You will then achieve your desired structure.

xamarin android best practises to tables with multiple columns

Maybe its a easy question but i cant figure out how to do tables with multiple columns and rows.. Order data in this table will be get via wcf service and next present in table. In this table i need of course scrolling and filtering. Every row will link in to details about order.
I thinking about using table layout and put in lists but this not resolved my problem with scrolling.. So should i do this? Which is best practise in this case topics?
I attach picture with this table.
Thanks for help.
I think i found solution of this problem on xamarin forum.
If samebody have better idea it will be pleasure to hear it.. :)
XamarinForum

How do the Note Apps create and save a note you wrote

I am working on an app and I basically want to implement some type of function like the note apps do. Basically I have a listview set up that has a link to different xml files. I want the user to have a create new option where they can add some text to an edit text and be able to save the text and add it to the listview I have set up.
My question is how do apps like the Note Pads and Memos ect. do this. Do I need to set up some type of database or?
I have googled it quickly and did a quick search on stack but I don't know if I'm even searching for the right thing. I am just looking for a step in the right direction please!
Thanks!
They all save their data in a database. For android you should use an SQLite database because it is included in the SDK. There are a lot of great tutorials for SQLite out there, but I think that this is the best one
http://www.vogella.com/articles/AndroidSQLite/article.html
It is possible to do this using SharedPrefernces, but I would not recommend it, for efficiency and simplicity

Android App Development: Databases

Hi I am fairly new to Android development and am hoping someone can help me out with this.
Basically, the app I am designing needs to contain a large list of makes, models, and years for various cars. The user can then select the make/model/year they want and add this car to their personal list of favorites. What I have tried so far is to make a database with two tables: one listing every car, and one listing the cars the user has chosen as favorites. When a user selects a car from the table listing every car, ideally that data would just be copied to the second table.
This has been fairly difficult for me at my novice level and I am having some problems getting it to work at all. So i guess my question is: is there a simpler way I should do this (with multiple arrays or something)? Or should I man up and just keep going at it until it works?
I would stick with the database - it will serve you well for more advanced android development, and many other applications. Sounds like you need to get a book on SQL or fundamental database concepts - if the database is as you've described it you can just use one table and update the "Favourite" flag whenever that changes.
Using alternative structures can have it's own learning curve and be at the cost of performance, particularly if you've got a large number of records. Is there anything specifically you're stuck on?
You have to make two tables CarlistTable & favouriteTable . Add a Column favorite to carlist & make each entry 0 to this column & while mark it as favourite do two things 1.Update the perticular entry as 1 & save that entry to Favourite Table. Thats all.
I would suggest you to stick with the database because having arrays and hardcoding it will make your program bigger and needs more memory (even in RAM) which is limited in cell phones.
To get you thing done, I would suggest you to use flags as the folks have said
plus,
to ease your programming, use a dbHelper and make a function for copying data from one table to another, I think that is fairly simple.

Are there any spreadsheet widgets for Android?

I have an Excel file that I want to use in my application. Using jexcel I read and write an Excel file in the application, but I don't know how to set up the view for that file in my application. Are there any spreadsheet widgets available for Android to show an Excel file?
Why not use a TableLayout widget and programatically fill in the rows and columns while looping through the excel data? TableLayout supports rows and columns.
Usage example:
http://developer.android.com/resources/tutorials/views/hello-tablelayout.html
I think it'd be best to just use a GridView. Make a custom Adapter which fills a textview from the cell content, tie that to a GridView and there you go.
The best next thing to writing your own from the ground up:
If android-spreadsheet hasn't helped enough,
the work done with Calligra on Android is the furthest along.
or waiting to see if the LibreOffice Android port will be of any help.
Calligra will at least be some assistance to the problem.
I'd also add, the suggestion #Vincent offered in the comments isn't too terrible. Most phones/tablets come with a stock Office Suite for viewing (not editing) purposes. I understandably see the pitfalls in that solution though, but it would be much easier, albeit lazier.

Categories

Resources