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
Related
I want to create an app that uses a tab layout with sliding views (something like this):
Here's the issue:
I searched all over the web for a guide that could explain how to do this kind of thing but all I tried didn't work for me. I read somewhere that tabs layout is deprecated with Lollipop, so I tried to find an alternative way to do what I wanted to do, but nothing. Every tab layout app I try to create ends up with a crash while testing and I think it's due to something about the ActionBar, always because of the ActionBar Tabs are deprecated in Lollipop. I'm not going to post any code because I created so many projects that I lost their count, and also because they are quite the same.
So, anyone could please link me a guide or explain a working method that allows to do what I explained?
All I can say is that the app has to be used on Lollipop, so I'd like to know the compile settings to put in the gradle files.
Another important thing is that i use Android Studio, even if most of the tutorials i find on web are about Eclipse.
I hope to have explained in detail my problem and what i want to do and i thank you all in advance.
Here is a detailled description of how to use the SlidingTabLayout like Google uses it in the Store:
https://github.com/codepath/android_guides/wiki/Google-Play-Style-Tabs-using-SlidingTabLayout
Like Hugo already mentioned: it works with viewpager
In the new Google Docs Android App, the app has an intro slider view in which it shows the different steps of how to use the app - I like it and want to do something similar for my app.
Are there beautiful looking open source libraries to do this? I can think of the following approaches only:
ShowcaseView
I guess I could do it using Tabs, and adjust the look and feel accordingly.
Any other (beautiful) alternatives?
(This question is slightly old, but here goes:)
Another open source Android library that I found that does exactly this (and fairly easily) is AppIntro.
It enables creation of intro sliders that look identical to Google's more recent intro sliders:
vs
Their wiki and their readme nicely describe exactly how to use it.
You can achieve this by using ViewPager.
For each click on "next" button you can change the page in ViewPager.
http://www.edumobile.org/android/android-beginner-tutorials/view-pager-example-in-android-development/
I got stuck with Jake Wharton ViewPagerIndicator.
The problem is that when I try to make a Tab indicator - the result I'm getting is extremely different from what I need and I can't get to style it or make it behave as it should.
So, what I ask for is two things:
1) Am I right when I say that TabIndicator is Foursquare-like ViewPagerIndicator? (when all tabs are shown on screen)
2) Can anyone provide me links to some tutorials or samples of using this type of ViewPagerIndicator, cause samples from JWs' site don't want to get working.
Thanks a lot for your attention!
Jake Wharton provides a lot of examples. Have you checked it?
https://github.com/JakeWharton/Android-ViewPagerIndicator
And you can take a preview installing this apk:
https://play.google.com/store/apps/details?id=com.viewpagerindicator.sample&hl=es
moskis is right on about ViewPagerIndicator. Installing that APK helped me a lot when I first started working with it and it is a great library.
However, to answer the first part of your question and what I think you are asking in general, I think ViewPagerIndicator isn't what you need to solve this specific problem. Foursquare's tabs at the top are the standard Android tabs as shown in http://developer.android.com/design/building-blocks/tabs.html.
Standard Android tabs are implemented using a TabHost and TabWidget. There is an official tutorial about creating a tabbed interface at http://developer.android.com/guide/topics/ui/layout/tabs.html
Foursquare achieves a custom look by providing state-list drawables for the tabs and you will probably want to provide your own to get the style that you want for your app.
Note that I don't have access to the Foursquare implementation, but am going off of what I observe whiel using the app. However, I have implemented a tabbed interface for Android in past projects.
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.
The new Youtube app, and the newer version of JuiceDefender, contains a sliding tabbed layout similar to those seen in Windows 7 Phone. This is a UI feature I would like to include in an app I'm am designing but I cannot find any information or tutorials online. Has anyone seen a tutorial on this?
I believe it's implemented as a HorizontalScrollView containing a TabWidget with custom, fixed-width, tab indicator views.
Now, getting the tab content views to be paged horizontally is less easy, and that requires something like adapting Workspace.java in the Launcher.git project in AOSP.
I have found the answer to this question. The Sliding layout I described is a ViewPager, available from the Android Compatibility Package v4, which is available from the SDK installer.
A tutorial for this can be found here :http://mobile.tutsplus.com/tutorials/android/android-user-interface-design-horizontal-view-paging/
Edit
An improvement over the Android Compatibility package is the http://actionbarsherlock.com/ an improvement over the support package that adds more Jelly bean style stuff.
I haven't seen a tutorial like this, but you won't be able to do something like this with just the native widgets as they are. You're really looking at implementing your own custom widgets and views, or at the very least wrapping the included widgets with your own code. Maybe a future api will have such features built in, but at this point you're forced to do everything yourself if you want such an interface.