About 1,010,000 results
Open links in new tab
  1. java - how to make a textview invisible - Stack Overflow

    Nov 23, 2013 · to make it invisible by changing its opacity msg.setalpha(0.0f); and to make it visible by changing its opacity msg.setalpha(1.0f);

  2. How to show/hide TextView in android xml file and java file?

    TextView tv = (TextView)findViewById(R.id.textAuthorSign); tv.setVisibility(View.VISIBLE); Will make your view visible and View.INVISIBLE will make your view invisible. You can also do View.GONE and then the TextView won't take any space on the layout...

  3. Android development toggling TextView visibility - Stack Overflow

    Jul 2, 2011 · I would make it with an XML file then when the Activity runs change the property. Be sure to use setContentView(R.layout.main); before you try to get the TextView with findViewById(...) . Call .setVisibility(View.GONE); on the TextView to hide it.

  4. How to Show or Hide a TextView in Android Using XML and Java

    In the XML layout file, set the default visibility using the `android:visibility` attribute. Use `View.VISIBLE`, `View.GONE`, or `View.INVISIBLE` in Java to control the visibility of the TextView programmatically. Ensure that the TextView is correctly initialized before altering its …

  5. TextView in Kotlin - GeeksforGeeks

    Feb 24, 2025 · Open MainActivity.kt file and get the reference of TextView defined in the layout file. Setting the on click listener to the button. Output: Different attributes of TextView Widgets. Use this attribute to make cursor visible or invisible. Default value is visible. Sets images or other graphic assets to below of the Textview.

  6. How to Show and Hide TextView in Android: XML and Java …

    Using the visibility attribute in XML allows you to set the initial state, while Java code lets you change the visibility at runtime based on user interactions or other triggers. Now, you can dynamically show and hide any TextView in your Android application effectively!

  7. Hidden TextView Behind ImageView: A Solution in XML - Try / …

    Mar 1, 2024 · By placing a TextView behind an ImageView, you can make the text hidden while still allowing it to be selectable or copied. Here's an example XML layout that demonstrates this technique:

  8. CodingTechRoom - How to Make an Android TextView Invisible

    To achieve the functionality of making a TextView invisible until a button is pressed in your Android application, you can follow these steps: 1. Initialize Your Layout : Create a simple layout XML file that includes a TextView and a Button.

  9. Information Heap: How to Make TextView Invisible? - Blogger

    Mar 8, 2016 · TextView is a view that displays text. Now, the question is how do we make this text disappear and then reappear only when a particular condition is fulfilled? Well, it's easy, here is an example. Visibility is an view attribute and is written as "android:visibility" in xml. There are three options that you get visible, invisible and gone.

  10. Go through XML and set all TextView to be invisible

    Mar 5, 2011 · I'm trying to go through the XML layout file and set all TextView 's to be INVISIBLE. When the following method is called I get a NullPointerException. public void numPlayerSetup(){ for(int i = 3; i <= 6; i++) . for(int z = 2; z <= 10; z++){

  11. Some results have been removed
Refresh