Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7945431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:51:49+00:00 2026-06-04T00:51:49+00:00

In the main view class / activity I have several checkboxes. Now in another

  • 0

In the main view class / activity I have several checkboxes. Now in another class and with another view active, I would like to check the state of the checkboxes in the ‘main’ window of my Android app. How can I do that?

Here is what I tried:

    protected String doInBackground(String... args) {
        // Building Parameters
        List<NameValuePair> params = new ArrayList<NameValuePair>();

        setContentView(R.layout.main);
        View v = findViewById(R.id.cbHasWifi);
        CheckBox check = v.findViewById(R.id.cbHasWifi);
        v.setContentView(v);

The whole code block gets me nowhere as it seems. I’m also worrying that another View context is active and may create followup problems if it is not ‘restored’ after my setContentView(), is that justified?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T00:51:50+00:00Added an answer on June 4, 2026 at 12:51 am

    You cannot do anything to the UI in any thread other than the main UI thread, so trying to set a content view from doInBackground is not going to work.

    Additionally, you haven’t made clear if you are running another activity or not. If you are running a new activity, there is no guarantee your data is still there from the first one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing an iOS 4 application. I have a main view that contains another
I am having a class that extends View. I have another class that extends
I would like to achieve this layout : my main activity layout ( main.xml
I have created a class (InputControl) which extends the view of my main class
I have two classes A and B A is main activity class and B
I have two classes which extend Activity and need to call another class method
I have a main activity class and find class. I need to access variable
I have this class: class View(object): def main_page(self, extra_placeholders = None): file = '/media/Shared/sites/www/subdomains/pypular/static/layout.tmpl'
In the main view i have this function public function lang($file, $language){ require 'languages/'.$language.'/'.
I have an application composed of a main view and a secondary view which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.