Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use only parts of the ui #14

Open
PembaTamang opened this issue Aug 13, 2020 · 3 comments
Open

How to use only parts of the ui #14

PembaTamang opened this issue Aug 13, 2020 · 3 comments

Comments

@PembaTamang
Copy link

No description provided.

@shridhar-creoit
Copy link

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
}

@jobayer
Copy link

jobayer commented Jan 15, 2021

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?

@shridhar-creoit
Copy link

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

This will hide the "Hours" text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants