Grey text appear white with outline in android device - android

anyone has had this issue?
I am making an android app and my text within textview is a light grey. It is not very visible, but that is the effect I want.
When I look at my emulator it is fine, but when i upload the app to my android device, the text is corrected and now appears as white with a black outline.
I don't want this. I want the light grey color...
here is the actual code for the full layout for those asking:
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/activity_splash_screen"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="20dp"
android:layout_gravity="center"
android:background="#ffffff"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="some text here"
android:textColor="#888888" /> </RelativeLayout>

In the comments, #Ma3x asked in the comments:
Since also your battery level and your clock display text are white with a black outline, I assume this is something at your system's level. Do you have some high contrast accessibility turned ON or any custom system-wide UI modifications? Or is it just a default theme like that? –
That gave me the hint I needed. In Settings > accessibility > High Contrast.

Related

Xamarin Android - white text in TextView appears gray not white

I am using a TextView and specifying the text to be white, but it always shows up gray both in the VS preview window and on the device.
Why is this and what needs to change to make it show white?
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="10dp"
>
<TextView
android:id="#+id/textviewLatLonEtc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:layout_gravity="top"
android:background="#00000000"
android:textColor="#FFFFFFFF"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="UTC Latitude Longitude Altitude Grid HorizontalVariance"
/>
</LinearLayout>
Note - I did notice that if I made the ending LinearLayout tag misspelled, for example /Blah, that the Visual Studio preview window then displayed the text as white, not gray.
Is some weird setting getting inherited too much ? Looking forward for a solution to this.
OK, oops, found the problem. After reconstructing my page piece by piece, I found out that I had a secondary View with transparency of #80000000 (half transparency) so half the value was getting through.
I changed this to #00000000 and the full brightness of White is showing.

Unwanted button text outline only in MotoG5

I have simple button
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#d22d2d"
android:text="Proceed"
android:textSize="35sp"
/>
On MotoG5 it shows unwanted outline on Button text, while it is okay in other devices.
This text outline does not appear in TextView. I tested it.
I checked another app in mobile, all apps (Gmail, Contacts etc.) having same behaviour.
I think there should be some theme fix to remove this unwanted outline in MotoG5.
You can disable it from Settings > Accessibility > Set off to High-contrast text
Your problem will solve.

Using bluejamesbond DocumentView

I'm trying to use the bluejamesbond DocumentView to display a bit of justified text. I'm unable to get text to display even in the simplest of cases;
<com.bluejamesbond.text.DocumentView xmlns:ext="http://schemas.android.com/apk/res-auto"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
ext:documentView_text="test"
android:background="#android:color/background_light" />
I've tried both a light and a dark background in case the default colour is one of them and hence invisible.
I've obtained the library by adding the following to the module's build.gradle;
compile 'com.github.bluejamesbond:textjustify-android:2.1.1'
The only indication of any problem is a fidelity warning from the Android Studio preview, but running on the real device (4.4.2) gives the same lack of text in each case.
I'd initially tried the more complicated example, removing the progress bar and changing the text to just some simple inline text to get rid of other dependencies. That didn't work either, again with different backgrounds.
To rule out the possibility of something else in the layout affecting it, I've also created a new layout as follows. Again, with either a light or dark background the expected text "test" is not to be seen.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<com.bluejamesbond.text.DocumentView xmlns:ext="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
ext:documentView_text="test"
android:background="#android:color/background_dark" />
</LinearLayout>
There is a (working) demo of the library on Play Store which gives an indication that this library is of decent quality and well maintained, so how can I move on from here?

Difference for Widget.ProgressBar.Small and Widget.ProgressBar.Small.Inverse

I try out two different progress bar styles for action bar button, through
refreshMenuItem.setActionView(R.layout.actionbar_indeterminate_progress);
actionbar_indeterminate_progress.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?attr/actionButtonStyle" >
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="#android:style/Widget.ProgressBar.Small" />
</LinearLayout>
I had tried Widget.ProgressBar.Small and Widget.ProgressBar.Small.Inverse. However, I do not see any visual difference.
Widget.ProgressBar.Small
Widget.ProgressBar.Small.Inverse
I expect there is an inverse in color but there isn't. Am I missing something?
There is a slight difference, but it's difficult to notice at first.
The Widget.ProgressBar.Small style version is intended to be placed over dark backgrounds while the Widget.ProgressBar.Small.Inverse style version is intended to be placed over light backgrounds.
Normally you would probably not notice this. The best way to check it is to put the combinations of the two progress bars on black and white backgrounds and display it a on good display, then you can notice differences on the edges.

how to make a View tranparent to see background statusbar in Android

i have created an app which has a TextView which contain some text.
i made it transparent by this code
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/Label"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Credit Balance 52$"
android:background = "#00000000"
/>
i want my application to be full screen but at the same time user will be able to see device statusbar behind TextView at top.
Please suggest me some solution of this problem.
Thanks
try using android.R.style.Theme_Translucent theme for your activity

Categories

Resources