Skip to content
New issue

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

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

Already on GitHub? # to your account

refactor: Leaderboard files from java to kotlin #452

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

PruthiviRaj27
Copy link
Contributor

Changes done

  • Refactor the below files from java to kotlin
  • LeaderboardPager.kt
  • LeaderboardActivity.kt
  • LeaderboardFragment.kt
  • LeaderboardTabAdapter

Fixes #.

Comment on lines 53 to 79
carouselView = view.findViewById<LinearLayout>(R.id.fragment_carousel) as LinearLayout
viewPager = view.findViewById<ViewPager>(R.id.viewpager) as ViewPager
tabLayout = view.findViewById<TabLayout>(R.id.tab_layout) as TabLayout
emptyView = view.findViewById<LinearLayout>(R.id.empty_container) as LinearLayout
emptyViewImage = view.findViewById<ImageView>(R.id.image_view) as ImageView
emptyTitleView = view.findViewById<TextView>(R.id.empty_title) as TextView
emptyDescView = view.findViewById<TextView>(R.id.empty_description) as TextView
emptyTitleView.typeface = TestpressSdk.getRubikMediumFont(requireContext())
emptyDescView.typeface = TestpressSdk.getRubikRegularFont(requireContext())
retryButton = view.findViewById<Button>(R.id.retry_button) as Button
progressBar = view.findViewById<ProgressBar>(R.id.pb_loading) as ProgressBar
UIUtils.setIndeterminateDrawable(activity, progressBar, 4)
carouselView.visibility = View.GONE
retryButton.setOnClickListener {
emptyView.visibility = View.GONE
loadMyReputation()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use View binding

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

Successfully merging this pull request may close these issues.

2 participants