Skip to content

SpaceTech

Exploration of Information, Communication and Technology

  • Home
  • Resx Builder
  • About
  • LinkedIn
  • Github

Android Access Element In Fragment

October 11, 2012June 2, 2021 Bjarne

When you convert an Activity to Fragment there is another way for you to access your element e.g. a Textview.

Before

TextView myTextView = (TextView) findViewById(R.id.myTextView);

to

TextView myTextView = (TextView) ll.findViewById(R.id.myTextView);

Previous step.

Next step.

Posted in TechnologyTagged activity, Android, fragment, Tips and Tricks

About

Hey! Engineer here. This is my engineering diary. I enjoy creating things, whether that be websites, plugins, mobile apps. I'm currently playing around in an engineering department where I work on a wide variety of interesting and meaningful projects on a daily basis. You’re welcome to connect and say hey on LinkedIn. Enjoy!


  • How to use parameter arguments in C#
  • Fixing Windows 11 Start Menu Not Working: Easy Solutions and Troubleshooting Tips
  • How to turn off history in ChatGPT and go into incognito mode
  • Troubleshooting Windows 11 Wi-Fi Not Working: Solutions and Fixes
  • How to Count unique string values among duplicates in Excel

Copyright ©SpaceTech

Clean Theme by WPVKP