I was wondering if there is any android wizard framework around which helps implementing a wizard like setup sequence. Surely it can be implemented from the ground with not too much pain (for example one discussion here) yes as this seems a quite standard need I hope there is already some support framework for this available.
Thanks buddies
martin
I can answer this - but not in the affirmative. There is nothing in the core API, neither is there anything in ActionBarSherlock, and I've failed to find anything remotely useful anywhere else.
I've ended up developing my own wizard framework on the back of ABS but at the moment its so heavily intertwined with my own app (and my other framework code) that it isn't in a state to put up as a public repo on github (which is my longer term plan).
If you decide to go your own way I recommend you start from ActionBarSherlock and use a tabbed view with fragments. Its easy to put together and the end user can use the tabs, or swiping, or buttons (if you provide them) to navigate from step to step. It may also be possible to hide the tabs if you don't want them visible (but they do give the user an idea of what is coming up which can be helpful). Have a look at the fragments sample app, specifically the "Tabs and Pager" sample. ViewPager and FragmentPagerAdaptor are your friends. You can download ABS and the samples from the Action Bar Sherlock site
Related
I'd like an example of a step-by-step implementation of this type of menu on Android Wear.
I can not understand the concept of this implementation
It can be in Xamarin or Java.
Documentation:
https://developer.android.com/training/wearables/ui/ui-nav-actions#java
Expectancy:
ndroid
Glad you are enjoying Xamarin!
There's multiple ways of navigating between fragments, regardless if it's a Watch. One of them is using ViewPagers. If you look into the Android documentation, you will find details of how to make it look really cool and fancy with small changes to the ViewPager code.
As far as examples to the Google Wear app that uses ViewPagers, you can take a look at this and some of the other examples of Android wear applications. Let me know if that helps. Btw, you might have more success simply implementing that code (layout/activity_main.xml, SimpleGridPagerAdapter.cs and MainActivity.cs) in your project, than making those projects works since they're old.
Since you are looking for the usage of the android.support.wear.widget.drawer.WearableDrawerLayout, you can take a look at this, particularly at the activity_main.xml. For implementing the WearableDrawerLayout, you have the following
WearableNavigationDrawerView that acts as the top navigation drawer
FrameLayout that contains your fragment
WearableActionDrawerView that acts as your bottom action drawer
PS: I noticed you are looking for Java examples too, this one seems very simple example to follow. You just have to check the Planets.java, MainActivity.java, and activity_main.xml files in that repo
I'm a long-time Windows developer who is now doing Android development.
I would like to use the exact functionality contained in the following officially documented example on tabs and swipe:
http://developer.android.com/training/implementing-navigation/lateral.html
Deprecated Functionality
However, the downloadable example contains methods & functionality which is deprecated.
I'm confused about why the Android official example which shows how to handle tabs and swiping ends up including code which is deprecated.
Is it not the most recent version?
What Functionality Am I Looking For?
I'll show you two screen shots which display tabs and allow the user to select the tabs to navigate among them or swipe left or right to move through them.
Looks like the following:
I want the user to be able to easily switch between the two tabs and I have a plan to indicate to the user that information on the other tab has been updated by displaying an icon on the current tab.
My Main Question
Is there a similar example which does not include these deprecated
methods?
Related Questions
If I choose to implement the code in my application -- because the solution is quite beautiful and looks easy to implement -- what will the consequences be?
Does it mean that some time in the future the application wouldn't even work properly?
Does it mean that it may not work on some devices (API versions)?
Here's some of the code which is deprecated:
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
mViewPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener()
actionBar.setSelectedNavigationItem(position);
actionBar.addTab();
actionBar.newTab();
It seems that the deprecated functionality is actually related to the ActionBar.
After quite a bit of searching, I found a better example of what I wanted -- sans ActionBar and sans deprecated functionality :
http://developer.android.com/samples/SlidingTabsBasic/index.html
When you get to that page, you will see that there is no documentation for the subject. It's odd. Look very closely in the upper right corner and you'll see a download link which will allow you to download a sample. It looks like:
The sliding tab solution is even more elegant and does not include any deprecated functionality.
Here's what it looks like:
The example is fantastic, because you can traverse through the tabs by swiping the bottom panel. Or you can click any of the tabs to move to the associated tab.
Also, the example gives you some more fucntionality above the tabs with the Show Log menu item which switches out the top portion.
Definitely worth a look and this answers my question.
Hope this helps someone else who is looking.
I'm confused about why the Android official example which shows how to handle tabs and swiping ends up including code which is deprecated.
Not all documentation gets updated. There has been stuff that has been out of date for years on the site, and despite filing issues, it does not get fixed. This is not unique to Android; it is reasonably commonplace in software development.
Is it not the most recent version?
It is the most recent version.
Is there a similar example which does not include these deprecated methods?
I do not know what qualifies as an "example". There are many, many implementations of tabs for ViewPager, both from Google (TabLayout) and from third parties (about half of the entries in the "View Pagers" category in the Android Arsenal). Some of those third-party libraries have sample projects as part of their repositories.
Does it mean that some time in the future the application wouldn't even work properly?
Quite possibly, particularly depending upon your definition of "work properly". We have no means of knowing exactly what will happen in the future (as we used up our last flux capacitor a week ago). Deprecated stuff usually keeps working, but it is at somewhat greater risk of bugs simply due to no longer being aggressively maintained. In the case of action bar tabs, the appcompat-v7 action bar backport does not support them at all.
I want to make a moving list appear from the left of the screen of the activity in the android app.
Something like the facebook app shown below :
,,
how can I make something like that in an android app.
Thanks.
This is a very popular UI pattern called a sliding menu / slider. You can search for open source libraries / projects which implement this for you.
Here is the first one I found on google.
This one is useful if you want to support old (pre holo) android devices too. It's an addon to the excellent holoeverywhere library.
And last but not least, take a look at this official pattern by google which also implements the same behavior. The code for creating it is available here.
The concept behind this is that you are taking a screen grab of the current activity and then loading in the menu. Your not actually sliding between activities, your moving the screen shot. Thats a very basic explanation of whats happening.
If you search for slide navigation on github I'm sure you'll find something.
I have been browsing the web for a while now and looking at different examples of how to implement a tab bar.
The problem I am having is deciding the correct approach to creating this feature. The option that seems most used is to have one main activity called MainActivity or something and using fragments as the tabs. This is all well and good and I have created an application like this fine.
The problem I am having is I am in two minds as to whether this is the right way to go about it as coming from an iOS development background it just doesn't seem right due to these tabs having different functions.
Any pointers would be great.
EDIT I have also looked into ActionBarSherlock but couldn't get to use it in a project as it kept coming up with errors and I couldn't find a thread that sorted the problems I was having out.
Disco
You should be using fragments, yes. There is an example of how to do it here: http://developer.android.com/guide/topics/ui/actionbar.html#Tabs
This "only" works with Tabs that are part of your Actionbar, though. Shouldn't be too much of a problem, because they usually should be part of your Actionbar. You can also manually move the tabs if you're not content with their location, or roll your own buttons that look like tabs.
Keep in mind that tabs in Android aren't quite the same beast as the tab bar is in iOS. They look similar and behave similar, but there are subtle conceptual differences in how they are supposed to be used. Don't use them for your basic app navigation, but rather for switching between similar "things".
If you want to employ this on device pre-3.0 though, you will have to use ActionBarSherlock. It does work fine and we're using it in several projects, so if you're having problems integrating it I suggest creating a new question for that, I'll be happy to help.
I cannot find either one of these two views in the source, but have seen them both in many apps. Can anyone please tell me what they are called?
Thanks
The second one is an options menu from the action bar. I think it is implemented as a ListPopupWindow.
The first one is not part of the Android SDK, though there are various implementations floating around. Here is an example of one designed for use with Google Maps, for example. Here is one designed for the "quick actions" pattern.
I'm going to assume that they're custom made ones, so you won't find them in the standard Android libraries.
The second one I think is just the way that the default menu looks in ICS (and honeycomb for that matter). If you build for 4.0 and include the code for an options menu I think you'll get that UI by default. If you are looking to customize it check out this page http://developer.android.com/guide/topics/ui/actionbar.html and pay close attention to the "Adding drop down navigation" section.
The first one is not a part of the android UI, that is something specific to the facebook app.