How to change underline length in TextInputLayout and make it to start with text position? - android-textinputlayout

I use TextInputLayout in my Profile screen
Profile screen
and I want to underline, text, and floating hint were align. But underline wider and I can't find easy way to line them up.
my xml:
<com.google.android.material.textfield.TextInputLayout
android:id="#+id/nameField"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed">
<com.google.android.material.textfield.TextInputEditText
android:id="#+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#android:color/transparent"
android:hint="#string/PROFILE_NAME_HINT"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
Version of material in gradle:
implementation 'com.google.android.material:material:1.5.0'
I tried to change styles, paddings, it doesn't help. I've noticed that old version of material in other expamples show needed result.

On the TextInputEditText set paddingStart to 0dp.
android:paddingStart="0dp"

Related

Can I change styling for a specific value in YAxis in recharts?

I am using recharts to create a visual in react, here is how my y-axis looks like:
<YAxis dataKey="XYZ" unit="%" yAxisId="rightY" >
<Label value="XYZ" position="insideRight" />
</YAxis>
<Line yAxisId="rightY" type="linear" dataKey="XYZ">
<LabelList dataKey="XYZ"content={this.customizedLineLabel} />
</Line>
Is it possible to change the font color of a particular value in y-axis?
For example: if this is my visual
I want to change the color of 0 in y-axis (marked in red)
I checked the API documentation, I did not find anything related to it.
Yes it is possible and very easy to implement as well.
You will need to create a customTick function which will be passed to tick property of Yaxis.
And in that function you add following code. <Text> is provided by recharts.
I hope this is what you wanted!
Visit the whole code here

Highlight react components in JSX (WebStorm IDE)

How to configure highlighting of custom/react components in JSX (render block)?
I want to configure editor color for <Home /> component in this example. Is it possible?
No, it's not currently possible.
Related feature requests: WEB-21035, WEB-330
As of PhpStorm 2022.3 Beta (EAP), the highlighting for React components differs from other elements in JSX for most color schemes by default.
This is how it looks in Darcula color scheme that you use:
And this is how it looks in IntelliJ Light color scheme (my preferred scheme):
If you don't like the default color, you can customize it in Settings (Ctrl+Alt+S) > Editor > Color Scheme > XML, select "Custom Tag Name" and change the Foreground color:
If Foreground and other options are disabled, you need to uncheck the "Inherit values from:" checkbox below these options.

Apply CSS on hintText of DatePicker Material-UI

I’m using Material-ui to build a booking system. In my DatePicker my hintText is white and barely visible and I want to change to color to black. I have used examples for my code from
https://github.com/callemall/material-ui/issues/3753 and https://github.com/callemall/material-ui/issues/5737
I have also tried the example from Material-ui website but that didn’t either work. Im not getting any errors, it’s not just working. Anybody have clue what I can do?
<div className="center-container">
<DatePicker inputStyle={{color: 'black'}} hintText="Date..."
mode="landscape" minDate={new Date()}/>
</div>
There is a property hintStyle, we can use that to set the style of hintText.
Like this:
<DatePicker
autoOk={false}
mode="landscape"
hintText='please'
hintStyle={{color:'red'}}
/>
Check the working fiddle.

Linebreak in shortdesc in tooltip in adf

I have a inputcombobox and I have its shortdesc attribute pointed to a String variable in a managed bean. The string contain line breaks but while rendering on browser, it seems to ignore it.
I tried workarounds for this by using pop up but it seems like showPopupBehaviour is not allowed inside inputComboBox. Also can't use javascript as it is mouse hover method is messing up with click event on LOV of inputcombobox.
I am using jdev 11.1.1.7.2
Any ideas
Use HTML entities in your shortDesc string.
The ones you are looking for are:
- Line Feed
- Carriage Return
Examples:
<af:outputText value="Hello StackOverFlow" shortDesc="Hallo
World"/>
<af:outputText value="Hello StackOverFlow" shortDesc="Hallo 
 World"/>
<af:outputText value="Hello StackOverFlow" shortDesc="Hallo
World"/>
These will all show a tooltip with a new line.
Edit:
It seems that the outputText component puts the tooltip in the title attribute while the inputCombobox puts the tooltip in a <div>

Including a button for a related textfield in a CQ dialog

How can I include a button with an input field, so that it looks like this (without the icon):
The purpose of this is so that if somebody enters invalid text, he can click on the button for some suggestions.
(I think this part could be achieved by a JavaScript function which calls a SlingServlet, returning some suggestions to be displayed e.g. maybe as an alert.)
Since you've clarified in comments that having them in one line is important for you, you could wrap them both in a toolbar XType:
<toolbar
jcr:primaryType="cq:Widget"
xtype="toolbar">
<items
jcr:primaryType="cq:WidgetCollection">
<input
jcr:primaryType="cq:Widget"
xtype="textfield"
name="./myInput">
</input>
<button
jcr:primaryType="cq:Widget"
xtype="button"
name="./myButton"
text="Submit">
</button>
</items>
</toolbar>
I think you can then also style the widgets further, e.g. width of the input field.
Check out the API docs too, they have some examples of a ComboBox on the toolbar page, which talks of type-ahead & suggested values — it sounds like it could be adapted to what you're looking for, if the data field came from an external JSON source (e.g. your SlingServlet), rather than coded inline.

Resources