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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:26:26+00:00 2026-06-11T08:26:26+00:00

I have such a activity with my list: <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent

  • 0

I have such a activity with my list:

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical">

    <ListView
        android:id="@+id/altOrderslist"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:divider="#b5b5b5"
        android:dividerHeight="1dp"
         />
 </RelativeLayout>

and I want to make custom listview with the items:

 <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:padding="5dip" >

    <!-- ListRow Left sied Thumbnail image -->

    <LinearLayout
        android:id="@+id/thumbnail"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_marginRight="5dip"
        android:padding="3dip" >

        <TextView
            android:id="@+id/altOrderId"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:text="Rihanna Love the way lie"
            android:textColor="#040404"
            android:textSize="15dip"
            android:textStyle="bold"
            android:typeface="sans" />
    </LinearLayout>

    <!-- Title Of Song -->


    <!-- Artist Name -->

    <TextView
        android:id="@+id/altOrderTitle"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="1dip"
        android:layout_toRightOf="@+id/thumbnail"
        android:text="Just gona stand there and ..."
        android:textColor="#343434"
        android:textSize="10dip" />

    <!-- Rightend Duration -->

    <TextView
        android:id="@+id/altOrderStatus"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_marginRight="5dip"
        android:gravity="right"

        android:textColor="#10bcc9"
        android:textSize="10dip"
        android:textStyle="bold" />

    <!-- Rightend Arrow -->

    <TextView
        android:id="@+id/altOrderPrice"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignTop="@+id/thumbnail"
        android:text="Rihanna Love the way lie"
        android:textColor="#040404"
        android:textSize="15dip"
        android:textStyle="bold"
        android:typeface="sans" />

</RelativeLayout>

This is my adapter class:

 public class OrderAdapter extends ArrayAdapter<Order>{


        Context context; 
        int layoutResourceId;    
        List<Order> orders = null;

        public OrderAdapter(Context context, int layoutResourceId, List<Order> orders) {
            super(context, layoutResourceId, orders);
            this.layoutResourceId = layoutResourceId;
            this.context = context;
            this.orders = orders;
        }

        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            View row = convertView;
            OrderHolder holder = null;

            if(row == null)
            {
                Log.i("I'm in OrderAdapter",Integer.toString(layoutResourceId));


                LayoutInflater inflater = ((Activity)context).getLayoutInflater();
                row = inflater.inflate(R.layout.dash_alt_item, parent, false);
                Log.i("I'm in OrderAdapter",Integer.toString(layoutResourceId));
                holder = new OrderHolder();
                holder.orderId = (TextView)row.findViewById(R.id.altOrderId);
                holder.orderTitle = (TextView)row.findViewById(R.id.altOrderTitle);
                holder.orderStatus = (TextView)row.findViewById(R.id.altOrderStatus);
                holder.orderPrice = (TextView)row.findViewById(R.id.altOrderPrice);

                //row.setTag(holder);
            }
            else
            {
                holder = (OrderHolder)row.getTag();
            }

            Order order = orders.get(position);
            holder.orderId.setText(order.getOrderid());
            holder.orderTitle.setText(order.getTitle());
            holder.orderStatus.setText(order.getProcess_status().getProccessStatusTitle());
            holder.orderPrice.setText(Float.toString(order.getPrice()));


            return row;
        }

        static class OrderHolder
        {
            TextView orderId;
            TextView orderTitle;
            TextView orderStatus;
            TextView orderPrice;
        }
    }

And how I use it in my Activity:

public class DashboardActivityAlt extends Activity{

    static List<Order> orders;
    List<Order> forPrint = new ArrayList<Order>();
    private ListView listView1;



    @Override
    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.dash_alt);
        try {
            this.getOrderList("1", "10"); **// filling the forPrint list**
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        OrderAdapter adapter = new OrderAdapter(this, 
                 R.layout.dash_alt_item, **forPrint**);
        listView1 = (ListView)findViewById(R.id.altOrderslist);
        listView1.setAdapter(adapter);
    }

And I get ResourceNotFoundException at the line holder.orderId.setText(order.getOrderid());
What is the reason of it?

  • 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-11T08:26:27+00:00Added an answer on June 11, 2026 at 8:26 am

    Make sure you are not passing an int to that method. Cast it to a String and will start to work as expected.

    The reason is setText() is overloaded it has versions:

    setText(int resId)
    setText(String text)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following application.xml <?xml version=1.0 encoding=utf-8?> <manifest xmlns:android=http://schemas.android.com/apk/res/android package=com.currency.mobile.android> <uses-permission android:name=android.permission.INTERNET/> <application
I have such XML structure which was returned by SharePoint web services. <rs:data ItemCount=4
i have such function to solve some logic riddle iloczyny is list with such
I have such file and I would like to replace $GLOBALS['SERVER_MEMCACHED']='localhost'; with $GLOBALS['SERVER_MEMCACHED']='mydomain.com'; using
I have a strange problem on an android application, I have no such table
I have a ListActivity which launches another Activity based on the list selection. This
I have this error: 12-07 15:27:11.567: E/AndroidRuntime(15797): Caused by: android.database.sqlite.SQLiteException: no such column: recipient:
I have created an application for Android that has an activity that has a
have such zend query: $select = $this->_table ->select() ->where('title LIKE ?', '%'.$searchWord.'%') ->where('description LIKE
i have such code (copy paste from wiki). Its multiplication of those big numbers

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.