So I created a simple slide tab app using this reference via Android Studio: http://www.exoguru.com/android/material-design/navigation/android-sliding-tabs-with-material-design.html
The only difference between this and my app is that my app has more than 2 tabs (8). This is the link to my app via zip: https://www.dropbox.com/s/ipe4zz1u3r0lnqt/App.zip?dl=0
Anyway to the question. I am interested in implementing infinite scroll like this: ViewPager as a circular queue / wrapping
(The sliding tab continues after the end...|A|-->|B|-->|C|-->|A|-->|B|) So you can keep sliding right either in the page or in the tab.
However, I am not sure if or how it can be implemented as I am having a hard time understanding it. Any pointers/advice/clarification will be greatly appreciated as I am stuck.
Related
I'm trying to implement a navigation like in Play Store app or in the VLC app.
In the Play Store app, they use a navigation drawer where you can choose 'apps'. Then it is possible to swipe through 'views' (categories, home, top paid, ...) ( here is a picture to show what I'm talking about)
In the VLC app, they use a navigation drawer (?) in combination with a swipe view (?) for the audio section.
I was searching for a tutorial, but I couldn't find any suitable yet. Most of these tutorials use Fragment's - as far as I know, these aren't able to contain swipe views?
Could someone please give me a hint (in addition it would be nice to see some code) on how to get on with this? Thanks :)
Look into latest design support library, specifically for TabLayout, where you can specify fixed tabs (up to three usually), or swiping ones (many more).
http://android-developers.blogspot.co.uk/2015/05/android-design-support-library.html
There's also an awesome demo of it in an open source app called Cheesesquare.
https://github.com/chrisbanes/cheesesquare
A FrameLayout hosting a ViewPager could be used to achieve this. Just use a LinearLayout at the top of the layout to display your navigation buttons.
The ViewPager will allow the user to swipe through each fragment it contains, you can also set each button's onClick to have the ViewPager automatically swipe to the relevant fragment.
If you want to use TabLayout, look into Google I/O app on github. More specifically, take a look at SlidingTabLayout and SlidingTabStrip under iosched/android/src/main/java/com/google/samples/apps/iosched/ui/widget. Also take at look at this SO thread
In android, i want to move from current to previous activity by left to right swipe as in iOS. I want to be able to even hold while swiping such as both activities are visible at the same time.
I want to introduce transition/animation effect just like in Telegram app. So please help how can i do it.
Tutorials or example code will work for me.
Thanks in advance!
You better use the Swipe animation with multiple Fragments inside one Activity: Creating Swipe Views with Tabs
take a look at this tutorial : HOW TO IMPLEMENT HORIZONTAL VIEW SWIPING WITH TABS
If you're already using Google's NavComponent library, you should try a library that I wrote:
https://github.com/massivemadness/Fragula
It's fully integrated with NavComponent, which means the navigation API stays the same, you only need to make some changes in NavGraph and NavHost container.
Here's the result:
I've been using the SWReveal View Controller as the basis for my app in iOS, and I want to find an analog in Android. I'm hoping to keep the same drawer effect going left and right as appears in John LLuch's SWRevealViewController https://www.cocoacontrols.com/controls/swrevealviewcontroller.
I know you can use a navigation drawers controller to show the left, but that is a pop over. It's not like moving the center screen over to the right. I am also aware of there being the Fixed tabs controller, but those do not allow the center screen to be shown on top either. I am hoping somebody has mimicked a controller in android that allows you to move the three screens as if you were paging between them and still show your center screen at all times.
Please let me know if you guys know of one or know how to make the fixed tabs controller do this.
Google has a navigationDrawer that looks similar to the SWRevealController. However in all our projects we use https://github.com/adamrocker/simple-side-drawer/tree/master/SimpleSideDrawer as it seems easier to get used to it.
It is not exactly the same but you will get same results. We always make a Base Activity that all the menu activities extends in order to get the actions of the menu.
It is as having a FragmentActivity and on the onCreate method add these:
mNav = new SimpleSideDrawer(this);
mNav.setLeftBehindContentView(R.layout.menu_left);
mNav.setRightBehindContentView(R.layout.menu_right);
I hope that helps!
Hello Guys I am trying to implement tab dragging in one of my project that is supposed to run on android 2.2 or higher which is similar to Google chromium Desktop browser in dragging and swapping .
I have thought the following way to implement it which are as follow and
using the given logic http://jqfaq.com/how-to-drag-and-drop-replace-the-position/ with Linear Layout as vertical orientation and adding and removing element with gesture and animation
using Custom ViewPager and Fragments to achieve the same
Extending FrameLayout and adding and removing tab dynamically and when user press and start dragging then shuffle all the tab .. but this way in need to destroy and create all the visible tab again to give the same effects , with this way might work but mine progress and activity work will has to be recreated
Using Activity Group as Drag and Drop with view start from api level 11
i hope you guys got my problem and come up with suggestion and if have some ready made sample and best way to it
I'm trying to make application for tablet with Android 2.3 with this kind of design:
Screenshot http://techpcnews.com/wp-content/uploads/2011/11/System-Mechanic-Free-10.6.2.7-550x411.jpg
Left menu on the left to navigate between functionalities. But this left menu also must have some indicators dependent on what user made in some right site pages (e.g. how many searches he had or how many info he have).
I don't know how to make this. I thought about Tabs with content made of Views. But then ActivityTab has a lot of code inside and i don't thing this is good idea overall (but at the same time it's good because one page have easy connetion with another page).
You will want to use fragments to solve this. the left pane will be one fragment and the right pane another. Than you use the activity that the fragments reside in to send messages between the fragments. So the left pane will till the activity to till the right pane to load certain content.
Here is a great example:
http://developer.android.com/resources/samples/HoneycombGallery/index.html