How to add a default Text at the start of the multiline React Native TextInput - css

I'm trying to implement the replying input in React Native and I'd like to have a possibility to render the person name I want to reply to at the start of my reply text. I attached the example image. This Input will be multiline and it's important because I was thinking about adding some padding for my reply TextInput and just absolutely position the Person Name text at the padded space.
It looks like a possible solution but:
How to do it if we have multiline Text? if we add some padding for the TextInput it will affect all lines when I need only the first one
The person name text could have various width so the padding value shouldn't be hardcoded. I think it could be solved by just rendering the Person name text first, calculating its width, and the set the padding for the TextInput but even in this case we'll face the issue 1)
Is it possible to achieve this feature somehow?
Thanks for any help!

You could have a nested style.
<Text style={styles.username}>#Rosemary#9234<Text style={styles.body}>I agree with you!</Text></Text>

Related

Angular Material: Textarea with fixed height

I want to have a page which has two main components. On the upper half a textarea on the lower half some input fields. The split should be 50:50. The problem I'm facing:
I cannot tell the textarea to fill the complete height when displayed. I know I can use some cdk..MinRows or ...MaxRows but therefore I need to know the whole height before. Additionally the underline looks also quite strange, e.g.
How to fix it? Does it work with Material or should I use plain HTML textarea? My project

Material-UI change TextField color when input text is too long

I am new to Material UI and I am currently testing on TextField.
When the value is longer that the width of the field, you still can read the text with clicking on the field and drag to right.
I would like to ask if there is a way to change the font color (Or any other thing) if length of the string is longer than a certain value in order to indicate there are some texts left behind.
(Single line edit field is necessary since there are many fields required to show on screen)
Thank you very much!

telegram bot ,How to make bigger buttons with emoj caption

I'm trying to make this kind of inlineKeyboardButtons :
http://i.stack.imgur.com/sHSTA.png
Which is bigger in width and has emojis inside it.
How can I do so ?
Thanks
You should use code of emoji in button caption. For getting codes take a look at this list.
If you want bigger width then only one element should be declared in the array of InlineKeyboardButton objects.
That is a inline keyboard where the button text contains an emoji.

textinput box with inline image

Is there any way to create a textInput box for flex mobile with inline image without using textflow ?
Basically i need a text input component , so that user can just use it as normal text input box but to it images can also be entered inline with text. To enter images user can select the image from list and that image will get inserted at the current cursor position.
If you look at any platform, there is no user experience (as far as I've seen) that lets you add images in the text input box. It's always been straight text, except for android which replaces certain text with icons (like :-) becomes an android icon). I don't think your users would expect that behaviour. If you really do need it, I would recommend you create a custom skin for your textinput box and add that feature into it, but it won't be easy to do.

Ghost/translucent caption inside text input?

First, what does one call the ghost caption that appears in a text edit if that edit has no real text?
Second, has anyone invented that particular wheel for Flex text components?
Thanks
It's called a Watermark.
I'm not an expert on Flex but here is one example:
http://labs.flexperiments.nl/writing-components-in-flex-part-2/

Resources