Questions tagged [tabview]

Any visual layout that incorporates selectable tabs as an organizational element.

770 questions
10
votes
8 answers

Active Index of tabview not getting updated automatically

Active Index is not getting updated automatically. ReaD in a few posts that by placing the tabView on a form it works. Or by including in the tabview it works. But nothing seems to work xhtml Sample 1 : automatic…
Shikha Dhawan
  • 1,414
  • 8
  • 27
  • 44
10
votes
2 answers

SwiftUI - detecting Long Press while keeping TabView swipable

I'm trying to detect a Long Press gesture on TabView that's swipable. The issue is that it disables TabView's swipable behavior at the moment. Applying the gesture on individual VStacks didn't work either - the long press doesn't get detected if I…
Kirill
  • 738
  • 10
  • 26
10
votes
1 answer

Tabview index not working on white background

I am trying to play a little with the iOS14 feature named TabView. I am trying to create a carousel aspect. Everything is ok except that the index indicator is not showing(those 3 dots from the image). On a background different than white the dots…
10
votes
1 answer

How do i set the active tab in Primefaces tabView?

I have a menubar in which two items on a submenu, both calling the same page:
Horacio González
  • 135
  • 1
  • 4
  • 9
9
votes
1 answer

How to tease adjacent pages in PageTabView?

I am working with SwiftUI 2 and using a TabView with PageTabViewStyle. Now, I am searching for a way to "tease" the pages adjacent to the current page like so: Is it possible to achieve this effect with TabView and PageTabViewStyle? I already tried…
Paul
  • 848
  • 12
  • 33
9
votes
1 answer

Keyboard Calls OnAppear of Other Views in TabBar SwiftUI 2.0

I am using UITabBarController in SwiftUI 2.0 and Xcode 12 but seems like Keyboard cases some unexpected behavior. As you can see from the below GIF, OnAppear of the other 2 tab's view called when the keyboard appears in the first tab. That is…
Malav Soni
  • 2,739
  • 1
  • 23
  • 52
9
votes
3 answers

primefaces tabView activeIndex issue

I have Primefaces TabView with two Tab like:
Roberto de Santis
  • 868
  • 5
  • 15
  • 26
8
votes
0 answers

SwiftUI TabView Rearrange Tab Order Preservation

It looks like Apple's TabView supports rearrangements automatically, but it quickly loses a rearrangement after you click on a tab. Here's my playground code. import SwiftUI import PlaygroundSupport struct ContentView: View { @State var arr =…
joehinkle11
  • 491
  • 1
  • 4
  • 9
8
votes
3 answers

How can I vertically center text-only TabBar buttons in SwiftUI?

I'm making some TabView buttons in SwiftUI (Xcode 11.1, Swift 5.1, and iOS 13.1.3). For my TabView, I don't want any images -- just text. This code accomplishes that nicely: import SwiftUI struct ContentView: View { var body: some View { …
drewster
  • 5,460
  • 5
  • 40
  • 50
8
votes
1 answer

NavigationView doesn't display correctly when using TabView in SwiftUI

Hello everyone. I'm developing a simple SwiftUI application that displays some tweets. It has a tab view with two views: the main page that will display the tweets and a secondary view. The problem is that the main page has a NavigationView. If I…
amodrono
  • 1,900
  • 4
  • 24
  • 45
7
votes
1 answer

SwiftUI onAppear called twice when NavigationView inside TabView

So I have a TabView where each of the tabs is embedded in a NavigationView. On first appear of each tab I get the following lifecycle calls onAppear(), onDisappear(), onAppear(). So it looks like onAppear gets called twice. This only happens the…
andrei
  • 1,353
  • 15
  • 24
7
votes
2 answers

TabView selection resets to first tab on sheet presentation

Update: Thanks to Harshil & Sumit for pointing me out that I was simply too dumb to realize that I was using id() instead of tag(). If there is anything you can learn from this question, it is this: When you work alone on a project, you tend to go…
orschaef
  • 1,287
  • 10
  • 27
7
votes
3 answers

SwiftUI: Custom Tab View for macOS & iOS

Is there a simple way to get a more customizable tab bar view using SwiftUI? I'm mainly asking from the perspective of macOS (though one that works on any system would be ideal), because the macOS implementation of the standard one has various…
TheNeil
  • 3,321
  • 2
  • 27
  • 52
7
votes
2 answers

How to show a badge number on a tabItem of a TabView in SwiftUI?

I'm working on a side project with SwiftUI, and I have a scenario where I need to show a badge number on one of the tabItems of my TabView. I have everything set with my models, and binding and so on. But I have been looking for 2 days now to find a…
JihadiOS
  • 381
  • 2
  • 13
6
votes
4 answers

How to save and restore ListView position in Android

I have tabView, displaying list in each tab. When I scroll in one tab, switch to another tab and return to previous tab, position is returned to the top instead of displaying previous scrolled position. How do I achieve this ? Need to know how do I…
avinashashetti
  • 103
  • 1
  • 1
  • 5
1
2
3
51 52