How to remove underline from current composing text in Android - java

Is there a way to remove the underline from the text currently being typed in an EditText?
I need to keep the suggestions area as well.

XML:
android:inputType="textNoSuggestions"
Code:
yourEditText.setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);

Related

what should i have to do to show three points after text that is to large?

I want to do something like picture below
I want to write the text in the Edittext hint and if it can't show full text write three points(...) after it I'd like it to be in just one line of code.
it's a edit text hint in android
You can check the length and if is longer than , then truncate the text....
if (myTextView.length >15){
myTextView.setText(myTextView.getText().substring(0,10)+"...");
}
Try setting the following XML attributes on your EditText:
android:maxLines="1"
android:ellipsize="end"

How to give bold shadow over normal text in android textview?

i need to give shadow over text view in android.
i have already tried using this code
android:shadowColor="#c3c3c3"
android:shadowDx="0"
android:shadowDy="0"
android:shadowRadius="15"
but not getting result the shadow is very thin.
i want exact as
.
in picture shadow is very strong shadow over text but by using above code with many values i am not getting that effect any suggestion for it.

I want the TextView to end in one Line...how to do it

i am developing an app, i would have linked an image but i don't have enough reputation to do so....my problem is The text doesn't fit in one line it goes to the second line,obviously thats because i have set the height to "wrap_content",but i want it to show the text only in one line and not 2 or more,what should i change the height to?i don't want any java code for this,my fragment is already heavy with lots of code,is there any way to do this on xml, so that it doesn't display different results for different screen size?also is there any way i can append "..." to the end of the name? like "backupRestoreConf..." or something like that?
use android:maxLines="1" (or android:singleLine="true", but it was deprecated and now it is not anymore. What to think.)
android:maxLines="1"
Use this in your XML
you need to set this in xml for your textview:
android:singleLine="true"

ListView checkboxes are over text, how to pad text and force checkbox standard color?

I have a listview checkboxes with text in a Linear Layout:
<CheckBox android:layout_width="fill_parent"
android:layout_height="wrap_content" android:id="#+id/nomeAPP" style="?listItem" />
But those checkboxes are over the text.
There's any way to pad the text a little to the right?
Also, I was testing with a AVD with 2.2 SDK. Just tested on my phone (also on 2.2), but looks like because of the phone theme (i have a cooked rom) the checkbox color is white (instead the standard grey). Is anyone way to force the checkbox color to the usual grey?
Try using the padding attribute i.e android:paddingRight to apply padding to text towards right.Please refer this link.

Disable Android ListView selector

I am trying to disable the ListView selector on my ListView. I set the List Selector color to a transparent color. This seems to do the trick, but when I select certain text, they change colors. How can I make things work ok?
In your XML where you declare the ListView use:
<ListView android:id="#+id/my_list" android:listSelector="#00000000" />
Are you looking for ListView 's setClickable(false) and setEnabled(false) method ?
It's not the best solution, but for me it worked:
You can set the text color manually (in xml or at runtime)
You can change the color of selected items to match your background. This question was asked here.
Apply below code to your list view.
android:listSelector="#android:color/transparent"

Categories

Resources