Xamarin Android menu/submenu items - best practice - android

I have an an Android app that requires that i give the user options to turn on or off certain brand names within specific categories.
So for example, I need to display categories such as Fashion, Music, Film etc (about 10-15 categories in total). Then the user needs to be able to click on a category and be presented with specific brands relating to that category which they can turn on and off, using perhaps a radio button or switch, depending on if they like that brand or not.
Can anybody advise as to a good way to display this kind of layout and what controls / layout to use. I'm currently thinking of using a grid layout for the categories, then submenu items or popup menu for the brands, but i'm not sure if they is a better way to go.
Also, i may need to include the brands actual logo so i need to allow for that to be possible in whatever view control i choose.

I think a great way to show that kind of thing would be using a Card View.
Xamarin has an example on how to use it available here: http://developer.xamarin.com/samples/CardViewSample/
To use it you must add the nuget package for it to your project: https://www.nuget.org/packages/Xamarin.Android.Support.v7.CardView/

Related

creating android text-based game

I am thinking about creating a text-based game (similar to gamebooks) for android device. In this moment only theoretically. Do you have some advice please, which way to go?
You probably know how gamebooks works, but the gamebook I want, will be very easy, should work like this:
User has shown some image, text and 3 options (questions), he decides which option to click, then a new page is showing (according to the clicked option) with another image, text and another 3 options. Then again, the user clicks one option, another page opens, etc.
My question is not how to do it programmatically, but how to start with this in Android Studio, what system to use for such game on android or which way to go.
Because I think it has no sense to create intents after each click, as there might be hundreds of clickable options.
I have already created such game on my website with php/html/js, but I want to create it also offline for android.
Intents implies one activity per page - unmaintainable.
You should work with a database and load based on user interaction. So you'll need to learn about Databases and Asynchronicity (working in the background while updating the UI so the user knows)

Theoretical inquiry about listviews and multiple activities in android studio

New developer here, for a personal project I want to develop a shop like app. I was wondering if it's possible to have one listview, and upon clicking each entry bring up another listview for each entry, and then upon clicking that it will bring up a page for each product.
Do I need separate activities for each product and listview I want to make? Or is it possible to make a few listviews and have the listview grab the string[]?
Technically, it is possible to have several ListViews and one activity. However, you should think about if the UX you want to achieve will be intuitive and familiar for your users, and preferably following Material Design guidelines. For example, take a look at the approach Google Play Store app took with with tabs, chips, and lists / grids.

Android spinner-like selectors

I am wanting to have option selectors like the AutoTrader app. The way it works, the user must first select a car make from a list and after a make is selected, the user must select a car model under the selected make. I was thinking of implementing a spinner but I like how they have it on their app better. I am not sure how I would implement this. I was thinking about TextViews that would open an AlertDialog but on the AutoTrader app, you can't choose a model without first choosing a make. I am not sure how I would do this with TextViews. Does anyone have any other idea on how I could implement this? Thank you. I provided an image of the AutoTrader app just in case some people aren't familiar with it.

How to implement this kind of list

My app is a client for a freeware PC-based PVR application which allows the user to view a TV Guide and select TV shows to record and send a request to their own PC to schedule the recording (or cancel a previously scheduled recording).
One of my users has requested a feature to show all shows / all channels in a vertical list with shows divided by a 'timeslot' indicator / divider. They provided an example image as below...
My problem is I can't work out what sort of list that would be using. It seems in theory I can do this with a standard ListView and a custom adapter but I'm also wondering about ExpandableListView as those timeslot indicators / dividers could perhaps be implemented as group dividers.
I've never worked with ExpandableListView however so I'm not sure if that's how it works and it suggests all groups will need to be expanded by default.
I've done a lot of reading on both classes and looked at a variety of sample code on the Android developer web site but I still can't work out what approach to take. I'm sure I've seen a similar question on SO but can't find it to see what the answer was. Any pointers gratefully received.
I would bet for ExpandableListView; though it could be a regular ListView with two types of view, one for the separators and one for regular items.

Tutorials for simple Android search & what's necessary

I have a ListView, as well as a refreshListFromDB(String searchKeywords) method which updates the adapter.
I'd like to implement search, where pressing the search key on my device will pop up the standard search box (and on-screen keyboard if required), and pass the result (onKeyDown) to refreshListFromDB() - or is this considered bad UI design?
Search is a complex beast, so can anyone recommend any bare-bones examples? I don't want to use global QSB, as it's not relavent for my type of app. Do I really need to get into Intents, searchable XML, new activities, content providers etc?
I'd like to implement search, where
pressing the search key on my device
will pop up the standard search box
(and on-screen keyboard if required),
and pass the result (onKeyDown) to
refreshListFromDB() - or is this
considered bad UI design?
I don't know about "bad UI design", but the standard search box doesn't do what you say you want it to do.
Search is a complex beast, so can
anyone recommend any bare-bones
examples?
I used to have a bare-bones example, but that was before QSB, which added another pile of bones on top of the bones I had. You can still look at the larger pile of bones here, and the pieces you seek are described in (ahem) a book.
Do I really need to get into Intents,
searchable XML, new activities,
content providers etc?
To use the "standard search box", you need the first two in your list, and possibly the third depending on how you want to do it. I have both reused existing activities and created new ones in my search experiments. You will not need a content provider, though.
You could also have a look at the Searchable Dictionary Sample Application that comes with the SDK, although I think this does integrate with the Quick Search Box.

Categories

Resources