Sunday 15 June 2014

android - Make button visible if string visible? -


I have some text in the string, and when you swipe your screen, they will change. That's why I want to make a button visible only, if 3. The text is visible.

  & lt; Item & gt; Free & lt; / Item & gt; & Lt; Item & gt; Easy to use & lt; / Item & gt; & Lt; Item & gt; Start & lt; / Item & gt;  

When the "let's start" appears on the screen, I want to show my button on the screen too, but only when this string appears, it "starts".

These strings are in a text view, and they have been coded to change for swipe.

How to do this?

I know that we have to set up a set visibility in some way and maybe add a listener?

How about comparing existing text view text?

  if (yourTextView.getText () .toString (.) Equal ("let's start")) {yourButton.setVisibility (see Visual.); }  

If I am deemed correctly, that should work.


No comments:

Post a Comment