How to use material design chips with multiline and text input? - material-components-android

I would like to use the material chips in a chips group that wraps over multiple lines.
Always after the last chip, there should be a text input field where I can enter new chips.
Is this possible? Which elements should I use?

The MDC-Android lib doesn't support your specific use case out of the box. Chipgroups only support chip objects, and it sounds like you want a multiline EditText whose inputs are replaced by ImageSpans with ChipDrawables.

Try adding an EditText to the right of the ChipGroup (use a ConstraintLayout or a RelativeLayout)

Related

Is it possible to switch between voices using SSML tags when doing text-to-speech on Windows?

I have Windows 7 with several Ivona voices (harposoftware.com) installed. I have an app that starts SpVoice from Sapi and makes it read a text. Now I also have a piece of text that I'd like to turn into a dialog between multiple voices.
Previously, to change between voices, my app had to cut a text into phrases and speak each phrase individually, selecting the required voice for it.
I was wondering if there is a better solution.
So, is it possible to embed some SSML tags in my text to enable switching between voices on the fly?
You should be able to use the <voice> element to change voices on SAPI 5.3.
Make sure the call to Speak() has the SPF_PARSE_SSML flag set.
Note that the name attribute in the <voice> tag is processor dependent, and can't have embedded spaces. (E.g., <voice required="Name=Microsoft Mark"> will definitely not do what you expect.)
This is described in the W3C specification, but it's easy to miss.
There's a much better description of how the voice tag works in this document by Claro Software.

ZPL multiple lines without wordwrap

I am trying to create a block in which a variable length of txt can be printed on a label, depending on the length of the txt, creating one or more lines of course, this is no problem using ^FB or ^TB, but here's the catch: I want to disable word-wrap. Is this somehow possible?
^FT20,130^FB550,3,,^FH^FDDescription: $_3000DE$^FS
Unfortunately the ZPL Programming Guide doesn't mention any possibility to turn of the automatic word-wrap functionality of the ^FB or ^TB command.
So the answer to your question is a simple: No, it's not possible.
However, it does allow for the wrap to happen outside of the label which is what will work.
In my example below the 999 prints the wrapped text off the label (6x4 label):
^FO65,370^A0B,40,30^FB520,2,999^FD<Company Address1 Company Address1>^FS

VGA Text display using VHDL on DE1

I am doing animation of algorithms using VHDL on Altera DE1. In this project, I have to display text to make it more informative. I am new to FPGA. But, I learned how text display works (all about allocating memory to each character and then display it). I tried to search some programs to test and see how the text display actually works. But most of them are on different boards. I wan't to understand how the actual flow is. As in, understanding just the memory and how it works is not helping me to write a complete code. Can anyone point me to right direction or explain in DEPTH how it actually works?
Thanks in advance!
If you haven't checked it out already, make sure to browse OpenCores. It looks like there are several VGA cores, some with text only and some with both text and custom graphics. You may need to register to view/download but it's free and simple.
Also many of the projects there are manufacturer-independent, making it very straightforward to integrate into your code.
What you said here is true, but the VGA controller is made out of several parts, one that creates the correct timing for the VGA signals, a memory from which the controller takes the data from and shows on the screen, a character map (the font) and a controller to read the mapping of each character and place them on the right position on the screen.
And here you have a higher level of block diagram, the previous block will replace the block markes as "Algorithm Test Pattern Generator"
You can take a look at the example on Digilinet's web site:
VGA controller reference design
Download it and modify it so it fits your need. This is just to give you an idea of the blocks necessary for what you want to do. It can be made simpler if you just want to show the same characters, or more complicated if you want to create a character based graphic controller for your design.

Highlight a value on an axis

I would like to highlight a single value on an axis; similar to the way that stock charts display the live price on the axis.
You could use an annotation tool to show a textbox with the value and a color line tool if you also want to have vertical/horizontal line highlighting the value. However, both tools are only available with the Pro version, and these are two features that would be quite easy to achieve with custom drawing techniques at OnAfterDraw event.
Yeray Alonso
Steema Support Central

Mixing graphics in NSTextView?

I thought I read somewhere that there is a way to embed drawings or other non-text in a text view, but I can't find anything about it in the Apple documentation. Can anyone point me in the right direction? I'm trying to build an editor, not just a view. I'm imagining a special character in the underlying text, and based on text attributes, it would reserves some blank space in the text layout. ? Or maybe I need to layout blocks myself, using NSTextContainers and a custom NSView to flow text around graphics?
Take a look into the NSTextAttachment and NSTextAttachmentCell. You can do your own custom drawing when you subclass the NSTextAttachmentCell.
Apple docs: Text Attachment Programming Topics

Resources