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.
Related
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.
I am developing a mobile app using xamarin forms. I have to store few paragraphs to display on multiple pages.
I was wondering which is a better option LocalDb or files.
Depends how many paragraphs and how much time you want to spend.
The easy way is to use files. You just hardcode them and you read and edit their contents (page1p1, page1p2.. etc).
Local database is the better way to go because you can easily expand the number of pages and paragraphs and you it's easier to keep track of them. BUT there is more code to write... so it's not worth it for a small number of pages
Local files is a good solution in this case. You have a simple data structure and there is no reason to use additional memory and recourses when using a database.
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.
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
I'm just setting out in android development. I want to make a kind of card based game. I'm just looking for suggestions really on how I might start it.
I know I have to make the menu layout and view, then use an Intent from that to get to the main game view. My sticking points are:
There's going to be a deck of cards. It's going to be a set number so I was thinking I could just have each card defined as a button in the layout. I don't know if that is the right way to do it though.
Storage of card details. I'm thinking of using an xml file to store these.
You could try to check out this project:
http://code.google.com/p/bestcardgameever-android/
And a post of the author about this (there is a second post in the same blog):
http://developreality.blogspot.com/2009/05/overcoming-absolutelayout-deprecation.html