Is there a way to add input field in nav element using React FluentUI (#fluentui/react)? - office-ui-fabric-react

The examples on website show many examples of navbars with links.
Image of navbar demo as shown on website.
I want to implement a search bar inside the nav element like this. Is there a way to do it?

I would try with OnRenderLink or linkAs methods.
onRenderLink:
Used to customize how content inside the link tag is rendered
linkAs: Render a custom link in place of
the normal one. This replaces the entire button rather than simply
button content
Source: INavProps interface https://developer.microsoft.com/en-us/fluentui#/controls/web/nav

Related

How can I customize partstack header in rcp application

I am trying to customize PartStack header of a view in rcp application. My goal is to customize the coloring of the header and to add date and time to it and hide minimize and maximize buttons. Buttons can be hidden using css but other goals give me hard time. At the moment I am looking to use a custom renderer by overriding some methods in StackRenderer class. Is that a right approach or is there another renderer that I shoud use?
If you don't want the min/max buttons then do not include MinMaxAddon in the Add On list in the Application.e4xmi.
Using a custom renderer for StackRenderer is useful for changing the text of the part tabs items. If you want to put text elsewhere on the part stack line you will probably need to look at the MinMaxAddon to see how it does that.

Android - Drawer navigation adapter

I am implementing a navigation Drawer as per: http://developer.android.com/training/implementing-navigation/nav-drawer.html
The tutorial only shows a single TextView with ID android:id="#android:id/text1" and this is populated for the ListView using:
mDrawerList.setAdapter(new ArrayAdapter<String>(
this,
R.layout.drawer_list_item,
mDrawerItems));
Now, I want to include an ImageView inside each ListView item. This will represent the Icon for each item.
Question: Inside my xml for the list items (where the TextView text1 is located), I have included an ImageView.
What do I need to name the ID for the ImageView?
And then, do I simply add the drawable-array reference to the setAdapter like this?
mDrawerList.setAdapter(new ArrayAdapter<String>(
this,
R.layout.drawer_list_item,
mDrawerItems,
mDrawerIcons));
Thank you
I found out that creating an ArrayAdapter in the format above does not allow you to input more than one set of data to the Adapter. For instance, I can only use my list of Drawer Navigation names contained in the Array<String>: mDrawerItems. To pass Icons and other data to the adapter, I have two option:
Simple Adapter used with a Map, or
Custom Adapter.
Examples of both can be found here: http://www.vogella.com/articles/AndroidListView/article.html, and here:
http://www.shenhengbin.wordpress.com/2012/03/17/listview-simpleadapter/

Flip from one ViewController to another iBooks Style

I'm trying to load in content from a database and allow the user to flip through it like pages, then at the end of the content, give them options to go to another section of content (probably with buttons). The content is currently just formatted with html, but how do I implement the buttons to navigate? I'm a little new to Xcode so maybe I'm not even looking in the right direction.
refer a this opensource: https://github.com/devindoty/iBooks-Flip-Animation
this is very little code and perfectly works.

how to display drop-down in iphone, like in this image

hi
I want to display drop down menu like the one you see in this image http://callingcard.marigoholdings.com/Screenshots.html#1
(below From and To)
How can i create that? Any good tutorial.
Best regards
You will have to use UIPicker for this purpose.This is used as a dropdown whereever needed in iPhone.
Please refer the link below
How to create drop down list box for an iphone app
Thanks
It looks like that app is using a combination of a UIWebView and an html select tag. To do something similar would involve a solid bit of html and javascript hackery, but in essence would be:
Create a UIWebView and inject the appropriate HTML into it to make the dropdown.
User uses dropdown as if it was in mobile safari and picks something.
When you need it, you use a javascript call with stringByEvaluatingJavaScriptFromString: to grab the value of the dropdown by id and pass it back to your code.
There are a few gotchas here, mainly with constructing the dropdown and the webview such that it's big enough to show the expanded dropdown but transparent to see under it when the dropdown is not expanded, it's not scrollable, and that sort of thing.
I wonder if a UIActionsheet might be better ... you could easy make a button to call the sheet. Adding multiple buttons to the sheet transforms it into a table that you can scroll.

Best approach for adding non-web links to UITextView

I am creating a dictionary-style app that presents a tableview full of words, and when a word is selected, a UITextView is displayed that shows the definition of the word. What I would like to do is add a line that says "See also: synonym1, synonym2" where synonym1 and synonym2 are links that will take the user to the definition for the synonym that is touched.
What is the best way to add these dynamic links? Buttons? Somehow add a small UIWebView a UItable on the fly?
Thanks!
I would replace your UITextView with a UIWebView and use that contain your description text and your links. It's fairly trivial to generate HTML on the fly for something like that.
You could register a custom URL scheme for your app, or you could intercept links as they're clicked.
If your links are always grouped together there's no reason why you couldn't use a bunch of UIButtons inside a custom view, but then you'd have to handle layout and wrapping on your own. It seems a lot easier to do it in HTML.