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

  • Home
  • SEARCH
  • 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 7181529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:34:36+00:00 2026-05-28T17:34:36+00:00

I have strange issue. My application have multiple activitys, on one activity is setting

  • 0

I have strange issue. My application have multiple activitys, on one activity is setting with two check boxes couple of spinners and save button.

When it first start, after installation I click button that bring up setting and in setting activity is this this on create:

    final CheckBox checkBox1st = (CheckBox) findViewById(R.id.checkBox1st);
    final CheckBox checkBox2nd = (CheckBox) findViewById(R.id.checkBox2nd);

    // set checkers from sharesetting

    String XX = GetPreference("lajna", "1");

    if (XX == "1") {
        checkBox1st.setChecked(true);
        checkBox2nd.setChecked(false);
        //updatneme spiner s menami podla lajn
        db.openToRead();
        updateSpiner("1"); //update appropriate spinner
        db.close();
    }  
    if (XX == "2") {
        checkBox1st.setChecked(false);
        checkBox2nd.setChecked(true);
        //updatneme spiner s menami podla lajny
        db.openToRead();
        updateSpiner("2"); //update appropriate spinner 
        db.close();
    }

so point of this is to read the shared setting and set checkbox as set … but it doesnt do it at first, and the shared preference value is set.. even if it would not it still should go with value 1 no ? but it doesn’t check any checker..

if I save the setting or use back button and than go to setting again it shows normal…

any idea why it is behave like this ?

Thanks,
Vlad

  • 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-05-28T17:34:37+00:00Added an answer on May 28, 2026 at 5:34 pm

    “1”.equals(XX), string comparison should use equals not ==.

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

Sidebar

Related Questions

I have a really strange issue. I am working on a Java SWING application
I have a very strange issue on my hands. I have two IIS websites
Hi i have a strange issue after adding my UIViewController.view to my Application Window.
I have a strange issue with an Asp.NET MVC application. Using Asp.NET MVC 3
We have a strange issue with running an Facebook IFrame application (using MVC 2).
I'm working on my first ASP.NET MVC application and have a strange issue. All
I have a navigation controller based application and I'm running into a strange issue
I have a strange issue in my GWT app. My application is working fine
I'am building simple Ajax application (via jquery). I have strange issue. I found where
I have a really strange issue with my application and I don't know why

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.