I am building an Android application and would like to include a help component in it. The Help module would have a structure as shown below :
HELP
FAQs
Features
Placing Orders
Online Ordering
Mobile Application based Ordering
Phone Ordering
Managing my Loyalty Account
Signup
Points Catalog
Loyalty Status Tracking
Points Redemption
Accessing Order History
Purchase History
Insights
Reports
Setting Reminders
Helpline
As far as i could find, there are two ways of doing this kind of structure.
The first way would be to use a Multi-level ListView. The problem with this is that the code is quite complicated and that usually ListViews have equal number of child nodes. For example :- in the above mentioned layout "Features" has several children whereas "FAQs" has none. How would that work in a List View?
The Second Method is to use Buttons for all the first-level options and then create individual activity pages for each of the corresponding children. So the first page called "Help" would have 3 buttons as shown :-
HELP
FAQs
Features
Helpline
Upon clicking any one, a new page would open with either more buttons or some text; depending on what the user clicks.
My question is, which of the above two methods is better suited to my application? If there is another way to do this than the two i've mentioned I'd be happy to hear about that as well. I thank you for your time and patience in helping me.
Or you can use this open source project to create a TreeListView:
https://code.google.com/p/tree-view-list-android/
I can suggest the following structure:
The HELP Activity will contain 3 tabs
FAQ can contain the ListView of questions.
Features can contain the ListView with Section Deviders: Placing Orders, Managing my Loyalty Account etc.
Helpline can contain e.g. text and image.
This structure can be created using Eclipse Activities templates: Tabs or Tabs + Swipe or Swipe Views + Title Strip.
Related
I have existed code for two activities(ActivityA and ActivityB).
Now I need to have a another activity, which will act as my first and only screen of my application. This activity will be having two tabs on its header part and I need to display each of my Activity when user press on each tab.
I have done some search on this and found TabAcivity will be suitable choice, but it is deprecated now.
I saw many posts which are suggesting Fragments. But I dont want to change my existing code. Can any one suggest me easy method to incorporate this.
you can use Android Tab Layout with Swipeable Views
here i give Link in this link step by step information given. so i think you can get batter idea from that.
Tab Layout with Swipeable Views
you can also download code from this site and also see video in given sit
I would want to know that how Instagram application listing/showing feed page?
Here is a screenshot: (I found it via Google and resized via tinypic.com. Here is the original file: http://www.digitaltrends.com/wp-content/uploads/2012/04/screenshotsjvc.jpg)
I am talking about 1st and 2nd screens.
As you know, when you go your feed (2nd screen) you can slide down and view other shares.
Every share has these:
Owner picture and username, shared time, a photo and a few things.
How to wrap all these datas in one control/layout in order to multiply?
Which control(s) (LinearLayout, Fragment, TableLayout and its TableRow(s)) are relevant for this kind of application?
I am not an expert Android application developer, that's why I want to know. I have confusion about that.
Thanks in advance.
As per my understanding screen 1 and screen 2 probably different fragments (take a look about fragments here). 1st fragment contains GridView (or some similar control) and 2nd one contains ListView.
I would suggest to begin with ListView. Basically, You will need to develop layout for single item (I think single RelativeLayout might be appropriate here) and then use it as item in the adapter.
I'm new to Android programming and I'm working on my first application "FunFacts" where
there should be more than 100 cool things to learn about nature, science etc.
My question is: How can I switch from one page to another using two buttons "left" and "right"? which method should I use? I don't think that a horizontal scrollview is the solution.
So if I have 2 different layouts, page one and page two, how can I switch from one to other in my application?
Thank you!
It sounds like you might want a ViewPager. Below is a link to the Android tutorial. This creates a slideshow type effect which sounds like what you're going for. You said you will have different layouts which this will use one layout but you can customize the content and I would think you would want one so it all looks relatively the same
Docs
Update
No, you don't have to create 100 layouts or activities. Just one of each. Following will be a link to a post that explains it a little better. That post explains how it is like a listview in that you add the different pages to your view adapter as you would with a list. You can use the same layout for all and just add new data to it (like a list). Probably store them in an ArrayList or possibly a DB if you have that many and want to have a lot of data attached to them. I hope this makes sense and helps a little. I would suggest starting one with just a couple pages to see how it works, following these examples, and if you get stuck then post a more specific question as to what you can't get to work.
Link
I have a technical problem about my architecture. I explain my goal with this project.
I want to create a modular application. So I have created several modules; some have a UI and others do not.
My UI application is divided in three parts:
one part, is the header, which display hours and some technical information
another part is a list view where we can select the module to display.
the final part is the content of the module or the default screen.
So I tried to explore fragment where each item of my listview is a fragment. According to user's click, I load and display the view of the module in the content.
Each module do its treatment when it receives a intent from a broadcast.
An other idea, is to create, one view per module and attach this view to my current view (not create dynamically but with an xml).
I am so confused with the type of architecture to use.
If anyone has suggestions.
This sounds like an ideal use for fragments. The guide topic on fragments explains the general approach and also discusses FragmentLayout.java, which is part of the API Demos sample project.
I'm trying to create and Android application which requires a number of search criteria which will eventually form an SQL query and run against a database.
The first set of criteria I'd like to present as a 3-tier list where the choices are dependent on the prior choice but there is only one final choice. So you could navigate to commadore via Car > Holden > Commadore. But you may only want to navigate to Car (and see a list of all cars) or Holden and see a list of all holdens.
Car
Holden
Commadore
Berina
Renault
Megan
van
van 1
Van 1 type 1
Van 1 type 2
etc
etc
There will also be other criteria such as colour, place and a free text search, I'd like to present these on a different tab or separate them somehow. I've looked at a tabbed layout but it appears that each tab uses a different activity and I believe that it is complicated for separate activities to talk to each other.
I'd appreciate any thoughts on this as I don't have time to discover all the shortfalls with this that others may have already experienced. Thanks for your help.
Much appreciated.
M
You can create Views instead of activities for the content of each Tab. The Activity which contains your TabHost will then be able to use the values selected from each of the views.
As for the lists, and sublists you can start to look in to the ExpandableListView, however that only provides a two level list, so you would need to look at extending it to allow n-levels I guess.
Alternatively you can have n-number of ListViews and transition between them IF the user makes a selection.