hey guys Im starting developing android aplications however this is my problem.
I need to create a list like this:
http://i.imgur.com/TKRr9aE.jpg
as you can see I need the picture, title, description, finally a cursor that leads me to the complete imformation about the selected option.
searching I found tools like linear or table layouts, but Im not sure if that will be the good way to do this.
my database have just that 3 columns: image(path of the picture), name and description
so my question is ¿what will be the best way to display this? Maybe is something really basic, but again... Im starting with android and I love it! is really interesting I need to get in in this world.
Anyway Hope you guys can help me. thx
What you want is a listView here is a good starting point.
http://developer.android.com/guide/topics/ui/layout/listview.html
Now as far as getting the picture included as well you would probably need to create a custom class that extends listView and then make the appropriate changes.
You can use a list view with a custom adapter. The adapter should extend the CursorAdapter class for managing data from database.
http://www.mysamplecode.com/2012/07/android-listview-cursoradapter-sqlite.html
Related
I need to implement this (Material checkboxes) type of activity, with dynamic tree layout.
Sorry but I'm little newbie on Android platform, so please explain to me what I need to get an activity like this from scratch.
Thanks in advance.
Bye
EDIT: Fixed URL that now point to correct image.
You must be more specific...
But if all what you want e implement a checkbox, you'll need:
XML layout with the widgets
Activity to handle events and values from the widgets
You could get a simple tutorial easily seaching the web..
My question is how can I put a lot of data in android application,or what is the best way to solve my problem ?
I'm building an app that will contain about 43 lessons,every lesson will be accessed through cardview and every lesson will have a lot of text,images and maybe some other things.
Is the best way to solve this to do every lesson manually,or there is another way that I could solve this.
This is how lessons should look like in cardview (similar)
And when i click on cardview needs to display me a lesson.
My problem is only text,image and other things in that lesson.
You need to store all your data in a database and populate your contents in a recycler list. With this you can click on each item to view a particular lesson.
You will eliminate the need to create multiple activities for each lesson.
You will have a small app size
I have a project in github that might help you https://github.com/mbobiosio/SqliteDatabaseAssets and this is the Kotlin version https://github.com/mbobiosio/WordCup18Team
I'm sorry. I'm being very vague on my question, but I'm not sure what to search to accomplish the layout I want to. Here's a sketch of what I'm wanting to do:
Basically, what I'm trying to do is recreate a standard booking app, and I'd like to know how can I recreate the part showing each room. I'd like some help how to create the layout to show 1 room and how to repeat that layout multiple times.
Use ListView or RecyclerView
Here is an example
https://uniqsofts.com/android-tutorials/android-listview-example
I am trying to make an app where you scroll(up and down) threw a list of game cheats and you can select a cheat and when you do it goes to a page in the app where you can see what the cheat code is with info about it. How do I do this? I am a complete noob.
I would suggest using a listView and populate it with "cheat" objects that have text, maybe an image, and some other properties of the class. Then in the onListItemClick start a new activity and implement more detailed information about the "cheat"
There are lots of good tutorials for this stuff here:
this is a really good one: http://www.vogella.com/tutorials/AndroidListView/article.html
Good luck!
I am writing an android application that has a spinner being populated with a string array with 5 items. Under certain conditions I would like several of these items to be un-selectable or disabled (greyed out and un-clickable). I found this article on google groups:
http://groups.google.com/group/android-developers/browse_thread/thread/f6951f3340a6075a
this article explains how to create a PatchedSpinner class to accomplish this, but it does not explain how to use the class after it has been created. I am struggling with how I can create a spinner widget using this class. I would really appreciate any help on how to use this class, or any assistance on how I should go about accomplishing this task.
http://groups.google.com/group/android-developers/browse_thread/thread/f6951f3340a6075a?pli=1
Not sure about the greyed out thing but these guys seemed to have found how to disable the spinner or at least being able to select the items.