|
|
@ -28,6 +28,7 @@ import androidx.appcompat.widget.AppCompatTextView;
|
|
|
|
|
|
|
|
|
|
|
|
public class ViewTextDelayed extends AppCompatTextView {
|
|
|
|
public class ViewTextDelayed extends AppCompatTextView {
|
|
|
|
private int visibility = VISIBLE;
|
|
|
|
private int visibility = VISIBLE;
|
|
|
|
|
|
|
|
private boolean init = false;
|
|
|
|
private boolean delaying = false;
|
|
|
|
private boolean delaying = false;
|
|
|
|
|
|
|
|
|
|
|
|
private static final int VISIBILITY_DELAY = 1500; // milliseconds
|
|
|
|
private static final int VISIBILITY_DELAY = 1500; // milliseconds
|
|
|
@ -49,8 +50,9 @@ public class ViewTextDelayed extends AppCompatTextView {
|
|
|
|
this.visibility = visibility;
|
|
|
|
this.visibility = visibility;
|
|
|
|
|
|
|
|
|
|
|
|
if (visibility == VISIBLE) {
|
|
|
|
if (visibility == VISIBLE) {
|
|
|
|
if (delaying || super.getVisibility() == VISIBLE)
|
|
|
|
if (delaying || (init && super.getVisibility() == VISIBLE))
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
init = true;
|
|
|
|
delaying = true;
|
|
|
|
delaying = true;
|
|
|
|
super.setVisibility(INVISIBLE);
|
|
|
|
super.setVisibility(INVISIBLE);
|
|
|
|
ApplicationEx.getMainHandler().postDelayed(delayedShow, VISIBILITY_DELAY);
|
|
|
|
ApplicationEx.getMainHandler().postDelayed(delayedShow, VISIBILITY_DELAY);
|
|
|
|