tabs

md-tabs: setting variable for md-selected not working when calling function from inside ui-router

本秂侑毒 提交于 2019-12-10 11:50:05
问题 I have a ui-router template containing md-tabs from which some tabs are static, others are created dynamically using ng-repeat iterating through a given array of the data model. Inside those dynamically created tabs there are three buttons to do the following move tab left by one position move tab right by one position The move tab buttons call a function inside the same controller. The $index value of the currently shown tabs as well as the desired direction ( -1 for moving left, 1 for

macOS Swift Safari-like tabs

好久不见. 提交于 2019-12-10 11:34:21
问题 I want to add the tabbing mechanism that you can see e.g. in Safari, the Console or the Finder (http://dailymactips.com/working-with-finder-tabs-on-your-mac/). I have already searched a lot, but I can not find a good guide for this. Ideally, I want to be able to push an alert-dialog before a new tab is created by the user. 回答1: NSWindow has native tabs for a couple of years now. The "Whats new in Cocoa" session from WWDC 2016 is the best place to start, since the documentation is quite thin

one more time about: Error: Attempting to use a disconnected port object, how to?

帅比萌擦擦* 提交于 2019-12-10 10:49:16
问题 here is my setup background.js var port = null; function setPort() { chrome.tabs.query({active: true, currentWindow: true}, function (tabs) { port = chrome.tabs.connect(tabs[0].id, {name: "CONTENTSCRIPT"}); }); } // when i click on something, get the port and send a message function clickHandler(e) { setPort(); if (port) { port.postMessage({key: 'message', value: true}); } } contentscript.js chrome.runtime.onConnect.addListener(function (port) { if (port.name == "CONTENTSCRIPT") { port

Hide Tab Buttons in NativeScript TabView

こ雲淡風輕ζ 提交于 2019-12-10 10:45:50
问题 I'm using Nativescript with Typescript/Angular and, for both iOS and Android, I'd like to hide the navigation tab buttons completely without losing the swipe functionality between the tabs. Said another way: I want the tab content, but not the buttons. I'm open to other suggestions to gain the same functionality without the tab navigation menu. The closest answer I could find was this: NativeScript How to hide tab buttons from TabView However, this answer didn't work. It caused the entire

Access controls from a Usercontrol that is programmatically added more than once?

非 Y 不嫁゛ 提交于 2019-12-10 10:39:33
问题 Well I've search a lot, and can't find help anywhere. I have a form with tabs. When I click a button, a new tab is added, and a usercontrol is added to the new tab. I cannot figure out how to access the controls on the second + tabs. I can access the user controls just fine from the first tab.. just not the others. Here is the code I had so far. private void button1_Click(object sender, EventArgs e) { string title = "tabPage " + (tabControl1.TabCount + 1).ToString(); TabPage newPage = new

Why does the first tab activity in Android live forever?

二次信任 提交于 2019-12-10 10:32:47
问题 I've created a simple TabActivity which builds tabs at runtime reading some JSON data. At the moment I'm initializing an empty ListActivity with dummy random items for each tab just to see that changing from tab to tab works and the content doesn't disappear. The actual content for the tabs is stored in a singleton class, so when the tab activities get re-created due to a screen orientation change, they just pull the correct dummy items from the respective list according to an identifier

Handling multiple tabs during landscape and portrait in android

徘徊边缘 提交于 2019-12-10 09:47:07
问题 I have specified different layouts for landscape and portrait using layout and layout-land, my application have multiple tabs. Each time when changing from portrait to landscape or landscape to portrait screen changes to 1st tab even selected tab is different one. How can we solve this problem. 回答1: You can use onRetainNonConfigurationInstance() to solve this issue. public void onCreate(Bundle savedInstanceState) { .... lastTab = (Integer) getLastNonConfigurationInstance(); ..... if(lastTab !

Selecting Native Tabs while Espresso testing

╄→гoц情女王★ 提交于 2019-12-10 09:27:53
问题 I have a viewpager which utilizes the native actionbar Tabs as the indicator. I would like to navigate to different tabs, but Tab component is not a view therefore, onView, or withText does not work properly with perform clicks. Is there a specific way I can do to navigate through the Tab navigation? 回答1: You could use swiping to navigate between your tabs: onView(withId(R.id.viewpager)).perform(swipeLeft()); onView(withId(R.id.viewpager)).perform(swipeRight()); 回答2: Assuming there is text on

error to startActivity(intent), whats going wrong?

亡梦爱人 提交于 2019-12-10 09:23:49
问题 Below here in code startActivity(intent) gives me an error Here's my code: public class MyWebViewClient3 extends WebViewClient { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { if (Uri.parse(url).getHost().equals("www.facebook.com")) { // This is my web site, so do not override; let my WebView load the page return false; } // Otherwise, the link is not for a page on my site, so launch another Activity that handles URLs Intent intent = new Intent(Intent.ACTION

How to hide other tabs's content and display only the selected tab's content

不羁的心 提交于 2019-12-10 09:22:30
问题 When I click on a particular tab the other tabs's content should be hidden but it is not hiding. This is all the code I have. function showStuff(id) { if (document.getElementById(id).style.display === "block") { document.getElementById(id).style.display = "none"; } else { document.getElementById(id).style.display = "block"; } } <ul class="side bar tabs"> <li id="tabs1" onclick="showStuff('tabs-1')">City</li> <li id="tabs2" onclick="showStuff('tabs-2')">Country</li> <li id="tabs3" onclick=