I am pretty new at all this android java development to create apps but after a series of tutorial I feel more confident.
I have ideas for an app in which the layout would be like the phone app in android 4.0.3.
Let me explain : my app would.consist in three or four tabs where the user could switch between on to the other by swiping the finger left or right. The top of the layout would display the title of each tab and underline in blue the name current tab (same as the phone app does).
Does anyone have some hints or places where I could find some sample code ? Or even the code of the androidphone app ?
Thank you very much for your help.
David
http://www.pushing-pixels.org/2011/08/11/android-tips-and-tricks-swipey-tabs.html
http://blog.stylingandroid.com/archives/537
Is this what You are refering to ?
Your best bet would be to use ViewPager and TitlePageIndicator.
The ViewPager you can find on the compatibility package or on the ActionBarSherlock library (strongly recommend the last one which can be found here http://actionbarsherlock.com/) and TitlePageIndicator, found here https://github.com/JakeWharton/Android-ViewPagerIndicator)
Plus, by using the ViewPager you will learn a bit about Fragments which is very nice :)
Related
I am new at Android Development, working in a personal application.
I want to implement a gallery-style widget in my app, something like the following facebook app screenshot (not enough reputation to upload images here) i. e. a swipeable and clickeable bunch of elements.
http://imgur.com/YeesrTw
I want every element of this gallery-like widget to be a composite layout (distinct instance of a fragment) with textView and imageView (I think I can figure how to do that) instead of a simple image.
I have a navigation drawer im my application and I'm using a "single activity-multiple fragment architecture", so I want to add this gallery-like widget in one of those fragments.
Please, If you could guide me or give me some suggestion about the Android layout elements I can use to accomplish that, I would be very happy :D
I'm aiming from API Level 15 to API Level 19, only.
Thanks in advance!
So, after hours of reading several android tutorials, I realize the Widget I was looking for is the ViewPager
:D
What is complete replacement of iOS Tabs Replacement in Android.
I Know that Android is Android and we don't Imitate other platforms on Android. I have Studied Pure Android
But All I want to have the replacment of iOS tabs in Android with following features.
1.) Stores Navigation flow for each tab, As in iOS there is navigation controller for each tab and we can have the previous state for each tab while switching from tab to tab.
2.) Desirable but not necessary- Double click on tab button will refresh the view with the root view as per in iOS.
3.) The animation while switching from tab to tab or with in Tab does not swipe the complete Tabs(including the TAB Bar). It means only the content of each Tab should be replaceable with separate Activity or something like this.
4.) In short User Experience must be similar to iOS Tab Bar.
What I have Tried so far.
1.) Added Tabs with TabHost on bottom of screen.But I Haven't got the stack navigation for each Tab separately.
(Something like: https://github.com/AdilSoomro/Iphone-Tab-in-Android)
2.) Also I have an idea of Using Stack (Java Collection Framework.) But that will be a headache to maintain all the stack by my self.
So, Guys In short:
Do you have any ideas of any Third Party Library, that I can use in my project without much problem to achieve all the features mentioned above?
Any help would be appreciated.
Thanks.
This one is best to implement iOS like tabs in Android
Like this:
You can use the native tabs and style it to seem like iOS ones.
Use Fragments, and store/reload the "Natigation flow" at the onPause/onRestore methods in each Fragment or in the FragmentActivity when you change form one fragment to an other.
BTW, please don't do that. If you studied Pure Android, what's the point do you want to achieve? Android is Android and iOS is iOS, do not mix them please.
UPDATE: 3 September 2017
An other, and imho better, approach to do so is make use of the Bottom Navigation. Take a look to materialdocs to learn how to use it.
Does anybody know how the article layout in the Google Currents Android app is built? I'd like to use some very similar layout for my app.
Example:
The first thing which came to my mind was to build up an the layout with a WebView with multicolumn stlye (http://www.w3.org/TR/css3-multicol/). Am I on the right way or is my suspicion completely wrong.
How do I get the page flip through the swipe/fling gesture and how to get the corresponding page indicator at the bottom?
Thanks in advance! :-)
You must use native views android and not webView because it is not efficient. But if you begun on Android you can actually use a webView is a good learning.
However, if you're interreses the layout android http://developer.android.com/ the website is a very good teaching technique. And what is the view of pourfaire text scroll from right to left, I encourage you to use the library ViewPagerIndicator.
I hope I have helped you!
What I try to do
Hello Guys, I'm creating an app, and I want that it looks nice and simple to control. In my app I got a Tabhost with 3 Tabs. Every Tab is a fragment with diffrent content. Now its the problem, when I switch the tab. I have to do this over a click on the tabhost.
But if you take a look at the Youtube-App on Android 4.0 its possible to switch the tab over a swipe gesture. And exactly here I stuck, how is that possible.
I searched the web, took a look into the Android Documentation, but I didn't really find anything about this topic. So how is that possible to create something like that?
Question
What do I need to do, that I can switch in my tabhost like its done in the Youtube-App. If you have some great tutorials, code snippets or any other tipps, please post them.
Thx for your help in advance.
safari
Pictures
Here you find some pictures to explain better what I'd like to create. They are ordered chronologically.
They are using a ViewPager for that.
ActionBarSherlock samples contains great examples of ViewPager+Fragments tabs:
http://goo.gl/GpbY4
Im learning android layouts and Ive noticed a particular button widget in some android apps that I would like to add to my own apps, Im just not entirely sure what its called, In some cases this button widget even will include a dropdown list here are a few examples of what Im talking about.
in the first image you will notice that the checkmark, the camera and the pencil are all sitting inside of the button widget i'm after, and in the youtube app you will notice the thumbs up, thumbs down and more buttons
That's ActionBar. Native support for 3.0+ devices, and some work to do in pre 3.0-devices. You can find example in new api 14 samples(called "ActionBarCompat").
Please see my answer here which gives some good links on how to implement the "dashboard" pattern, and use the "quickaction" bar. I think this should put you on the right path. Also there is a link on how to implement the "action bar."
EDIT: According to Mighter, if you use API 1.6 - 2.3 there should be official Google samples for this now. Please see this.