Is there a way to hide some (but not all) of the text in a TextView? I tried setting the size to 0 with AbsoluteSizeSpan, but that doesn't have any visual effect that I see. (You can set the size to 1, and you essentially get bumpy lines instead of readable text. Cute, but not quite what I'm after.)
By hide, I mean go away, not be visible and not take up space. Drawing text with the same color as the background isn't what I'm looking for.
I realize I can just replace the text in the TextView with only the text I want to display, but I'm already using spans to do a lot more dynamic styling, and something like a HiddenSpan would be useful. Does it exist?
Hide Text messages 1 Open the Messages app on your Android. 2 Now, tap and hold the conversation you want to hide. A list of options will appear on top of the screen. 3 Click on the first icon in the row that resembles a folder with a downward pointing arrow. The selected conversation... More ...
Tap on the Lock screen preferences under the Device security section. Now, click On lock screen and select Hide sensitive content. It will hide the message preview on lockscreen, and nobody will be able to read your private texts without unlocking your phone.
Open the Messaging app on your phone. Then, tap on the three dot icon in the upper right-hand corner to access the Settings menu. Tap on Notifications. Tap on In-app notification settings. Toggle the switch next to Preview new messages so that it turns off.
Vault is a security app which in addition to protecting your text messages from prying eyes, can also protect your photos, videos, apps, and bookmarks. To hide your text messages, you will need to select SMS and Contacts. From there, you can add contacts whose text messages you wish to be protected.
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="0sp"
android:textColor="@android:color/transparent" />
Transparent text color hides the visibility of the text. Add textSize to that to remove or minimize the space it takes up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With