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 4058444
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:04:49+00:00 2026-05-20T15:04:49+00:00

I have a if condition for check value in textview but it still happen

  • 0

I have a if condition for check value in textview but it still happen only else condition

what I did wrong, why it doesn’t have if condition even if I have set lang=space

private void setLangTitle() {
    lang.setText(" ");
    db.open();
    Cursor cc = db.getLangAct();
    cc.moveToFirst();
    int index = cc.getColumnIndex(DBAdapter.KEY_LANG);
    while (cc.isAfterLast() == false) {

        if(lang.equals(" ")){
            lang.append("p"+cc.getString(index));
            cc.moveToNext();
        }
        else {
            lang.append("/" + cc.getString(index));
            cc.moveToNext();
        }
    }
    db.close();
}
  • 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-20T15:04:50+00:00Added an answer on May 20, 2026 at 3:04 pm

    You’re currently checking if lang is equal to a space character. If lang is a TextView, than it will not be equal to the space character because it is a TextView object, not a string. You probably want to test if the text being displayed on lang is equal to the space character, which would be something along the lines of:

    if (lang.getText().toString().equals(" ")) {
        ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im facing following problem I have created mentioned condition, but when I choose y
I have a activity am using a boolean condition to check some thing .if
I have written a LINQ query with or condition in it, but its not
I have a method. I want to check a condition and if result of
I have a DataGridView collection object and check for a particular condition. If it
All, I have coded Fast exponentiation algorithm to check if the encrypted value is
I have 10 properties where when each is set it increments the value of
I have a GridView with an anonymous type. I need to check the value
I have a dynamic big File and I want check a Boolean value and
I need set field value, not passed to Django Form constructor. I have model

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.