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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:48:08+00:00 2026-06-11T22:48:08+00:00

I have an app that retrieves data from a webservice in the form of

  • 0

I have an app that retrieves data from a webservice in the form of an array. In the getView() of the adapter i set the TextViews to the elements in the array. The array is called recordItem and has various elements one of which is “status”. Status is a String that can be either completed, ncr, or waiting. if i set the TextView in the listview directly with the value completed, ncr or waiting there’s no problem.

I don’t want to display the full string in the textview but rather display a C, NCR or W instead. I have a series of “if statements” that check the array element and then sets the textview to the respective character.

The problem is that no character is being displayed. why?

@Override
        public View getView(int position, View convertView, ViewGroup parent) {


            LayoutInflater inflater = (LayoutInflater) context
                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);

            View rowView = inflater.inflate(R.layout.rotarowlayout, parent,
                    false);

            TextView startTime = (TextView) rowView
                    .findViewById(R.id.rowstarttime);
            TextView duration = (TextView) rowView
                    .findViewById(R.id.rowduration);
            TextView status = (TextView) rowView.findViewById(R.id.rowstatus);
            TextView name = (TextView) rowView.findViewById(R.id.rowclientname);

            String record = list.get(position).toString();
            String[] itemsInRecord = record.split(",");
            Log.e(TAG, "itemin record = " + itemsInRecord.length);
            String[] recordItem = new String[itemsInRecord.length];

            for (int x = 0; x < itemsInRecord.length; x++) {

                recordItem[x] = itemsInRecord[x];
                Log.e(TAG, "x = " + x);
            }

            String withoutBraket = recordItem[0].substring(11);
            String withoutSecs = withoutBraket.substring(0, 6);

            Log.e(TAG, "recordItem = " + recordItem[2]);


            if(recordItem[2].toString().equalsIgnoreCase("Completed")){

                statusField = "c";

            }else if(recordItem[2].toString().equalsIgnoreCase("NCR")){

                statusField = "NCR";

            }else if(recordItem[2].toString().equalsIgnoreCase("Waiting")){

                statusField = "W";
            }

            Log.e(TAG, "statusField = " + statusField);

            startTime.setText(withoutSecs );
            duration.setText( recordItem[1]);
            status.setText( statusField);
            name.setText( recordItem[3] + recordItem[4]);
            callID = recordItem[5];
            needName = recordItem[6];

            return rowView;

        }

.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingTop="5dp" >

        <TextView
            android:id="@+id/rowstarttime"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1" />

        <TextView
            android:id="@+id/rowduration"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="10dp" >

        <TextView
            android:id="@+id/rowstatus"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1" />

        <TextView
            android:id="@+id/rowclientname"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </LinearLayout>

</LinearLayout>
  • 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-11T22:48:10+00:00Added an answer on June 11, 2026 at 10:48 pm

    recordItem[2] needed trim() calling on it. .equals not picking the strings up because of this.

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

Sidebar

Related Questions

I have an iphone app that sends and retrieves data from a php script.
I have common module on my app that retrieves data from remote server and
I have an app that relies heavily on JSON responses from a webservice. All
My app has a background thread that periodically retrieves data from an external source,
Greetings! I have an ASP.NET app that scrapes data from a handful of external
I am developing an MVC app that retrieves data from a table in SQL
i have a php page that connects to a database and retrieves data from
I have multiple app processes that each connect to servers and receive data from
I have to develop a tool in C# that retrieves some data from an
I have a web app in production that is used for typical data entry,retrieval,

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.