FlipTimerView icon indicating copy to clipboard operation
FlipTimerView copied to clipboard

How to use only parts of the ui

Open PembaTamang opened this issue 4 years ago • 3 comments

PembaTamang avatar Aug 13 '20 10:08 PembaTamang

You can use this for now

timerProgramCountdown.findViewById<CountDownDigit>(R.id.firstDigitDays).visibility = GONE
timerProgramCountdown.findViewById<CountDownDigit>(R.id.secondDigitDays).visibility = GONE
timerProgramCountdown.findViewById<CountDownDigit>(R.id.firstDigitHours).visibility = GONE
timerProgramCountdown.findViewById<CountDownDigit>(R.id.secondDigitHours).visibility = GONE
(timerProgramCountdown.children.firstOrNull() as? LinearLayout)?.children?.firstOrNull()?.also {
    ((it as? RelativeLayout)?.children?.toList()?.getOrNull(2) as? TextView)?.visibility = GONE
}

shridhar-creoit avatar Sep 21 '20 05:09 shridhar-creoit

You can use this for now

timerProgramCountdown.findViewById<CountDownDigit>(R.id.firstDigitDays).visibility = GONE
timerProgramCountdown.findViewById<CountDownDigit>(R.id.secondDigitDays).visibility = GONE
timerProgramCountdown.findViewById<CountDownDigit>(R.id.firstDigitHours).visibility = GONE
timerProgramCountdown.findViewById<CountDownDigit>(R.id.secondDigitHours).visibility = GONE
(timerProgramCountdown.children.firstOrNull() as? LinearLayout)?.children?.firstOrNull()?.also {
    ((it as? RelativeLayout)?.children?.toList()?.getOrNull(2) as? TextView)?.visibility = GONE
}

Is hides the days and hours digits and only "Days" text. I need to hide the "Hours" text as well. How to do that?

jobayer avatar Jan 15 '21 19:01 jobayer

timerProgramCountdown.findViewById<TextView>(R.id.ddd).visibility = GONE

This will hide the "Hours" text

shridhar-creoit avatar Jan 15 '21 21:01 shridhar-creoit